| @@ 41-52 (lines=12) @@ | ||
| 38 | } |
|
| 39 | break; |
|
| 40 | ||
| 41 | case 'getFilter': |
|
| 42 | if (isset($_GET['counterId'], $_GET['filterId']) && $_GET['counterId'] && $_GET['filterId']) { |
|
| 43 | //GET /management/v1/counter/{counterId}/filter/{filterId} |
|
| 44 | /** |
|
| 45 | * @see http://api.yandex.ru/metrika/doc/beta/management/filters/filter.xml |
|
| 46 | */ |
|
| 47 | $result = $managementClient |
|
| 48 | ->filters() |
|
| 49 | ->getFilter($_GET['filterId'], $_GET['counterId']) |
|
| 50 | ->toArray(); |
|
| 51 | } |
|
| 52 | break; |
|
| 53 | ||
| 54 | case 'getGrant': |
|
| 55 | if (isset($_GET['userLogin'], $_GET['counterId']) && $_GET['userLogin'] && $_GET['counterId']) { |
|
| @@ 54-65 (lines=12) @@ | ||
| 51 | } |
|
| 52 | break; |
|
| 53 | ||
| 54 | case 'getGrant': |
|
| 55 | if (isset($_GET['userLogin'], $_GET['counterId']) && $_GET['userLogin'] && $_GET['counterId']) { |
|
| 56 | //GET /management/v1/counter/{counterId}/grant/{userLogin} |
|
| 57 | /** |
|
| 58 | * @see http://api.yandex.ru/metrika/doc/beta/management/grants/grantold.xml |
|
| 59 | */ |
|
| 60 | $result = $managementClient |
|
| 61 | ->grants() |
|
| 62 | ->getGrant($_GET['counterId'], $_GET['userLogin']) |
|
| 63 | ->toArray(); |
|
| 64 | } |
|
| 65 | break; |
|
| 66 | ||
| 67 | case 'getOperation': |
|
| 68 | //GET /management/v1/counter/{counterId}/operation/{operationId} |
|
| @@ 67-81 (lines=15) @@ | ||
| 64 | } |
|
| 65 | break; |
|
| 66 | ||
| 67 | case 'getOperation': |
|
| 68 | //GET /management/v1/counter/{counterId}/operation/{operationId} |
|
| 69 | /** |
|
| 70 | * @see http://api.yandex.ru/metrika/doc/beta/management/operations/operation.xml |
|
| 71 | */ |
|
| 72 | if (isset($_GET['operationId'], $_GET['counterId']) |
|
| 73 | && $_GET['operationId'] |
|
| 74 | && $_GET['counterId'] |
|
| 75 | ) { |
|
| 76 | $result = $managementClient |
|
| 77 | ->operations() |
|
| 78 | ->getOperation($_GET['operationId'], $_GET['counterId']) |
|
| 79 | ->toArray(); |
|
| 80 | } |
|
| 81 | break; |
|
| 82 | ||
| 83 | case 'getPageViewsCount': |
|
| 84 | if (isset($_GET['counterId']) && $_GET['counterId']) { |
|