Skip to content

Commit e2e92fb

Browse files
authored
3.14.0 (#83)
1 parent f9626ae commit e2e92fb

27 files changed

+972
-124
lines changed

MuxPhp/Api/DimensionsApi.php

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,16 @@ public function getConfig()
124124
* @param int $limit Number of items to include in the response (optional, default to 25)
125125
* @param int $page Offset by this many pages, of the size of `limit` (optional, default to 1)
126126
* @param string[] $filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` (optional)
127+
* @param string[] $metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional)
127128
* @param string[] $timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` (optional)
128129
*
129130
* @throws \MuxPhp\ApiException on non-2xx response
130131
* @throws \InvalidArgumentException
131132
* @return \MuxPhp\Models\ListDimensionValuesResponse
132133
*/
133-
public function listDimensionValues($dimension_id, $limit = 25, $page = 1, $filters = null, $timeframe = null)
134+
public function listDimensionValues($dimension_id, $limit = 25, $page = 1, $filters = null, $metric_filters = null, $timeframe = null)
134135
{
135-
list($response) = $this->listDimensionValuesWithHttpInfo($dimension_id, $limit, $page, $filters, $timeframe);
136+
list($response) = $this->listDimensionValuesWithHttpInfo($dimension_id, $limit, $page, $filters, $metric_filters, $timeframe);
136137
return $response;
137138
}
138139

@@ -145,15 +146,16 @@ public function listDimensionValues($dimension_id, $limit = 25, $page = 1, $filt
145146
* @param int $limit Number of items to include in the response (optional, default to 25)
146147
* @param int $page Offset by this many pages, of the size of `limit` (optional, default to 1)
147148
* @param string[] $filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` (optional)
149+
* @param string[] $metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional)
148150
* @param string[] $timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` (optional)
149151
*
150152
* @throws \MuxPhp\ApiException on non-2xx response
151153
* @throws \InvalidArgumentException
152154
* @return array of \MuxPhp\Models\ListDimensionValuesResponse, HTTP status code, HTTP response headers (array of strings)
153155
*/
154-
public function listDimensionValuesWithHttpInfo($dimension_id, $limit = 25, $page = 1, $filters = null, $timeframe = null)
156+
public function listDimensionValuesWithHttpInfo($dimension_id, $limit = 25, $page = 1, $filters = null, $metric_filters = null, $timeframe = null)
155157
{
156-
$request = $this->listDimensionValuesRequest($dimension_id, $limit, $page, $filters, $timeframe);
158+
$request = $this->listDimensionValuesRequest($dimension_id, $limit, $page, $filters, $metric_filters, $timeframe);
157159

158160
try {
159161
$options = $this->createHttpClientOption();
@@ -237,14 +239,15 @@ public function listDimensionValuesWithHttpInfo($dimension_id, $limit = 25, $pag
237239
* @param int $limit Number of items to include in the response (optional, default to 25)
238240
* @param int $page Offset by this many pages, of the size of `limit` (optional, default to 1)
239241
* @param string[] $filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` (optional)
242+
* @param string[] $metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional)
240243
* @param string[] $timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` (optional)
241244
*
242245
* @throws \InvalidArgumentException
243246
* @return \GuzzleHttp\Promise\PromiseInterface
244247
*/
245-
public function listDimensionValuesAsync($dimension_id, $limit = 25, $page = 1, $filters = null, $timeframe = null)
248+
public function listDimensionValuesAsync($dimension_id, $limit = 25, $page = 1, $filters = null, $metric_filters = null, $timeframe = null)
246249
{
247-
return $this->listDimensionValuesAsyncWithHttpInfo($dimension_id, $limit, $page, $filters, $timeframe)
250+
return $this->listDimensionValuesAsyncWithHttpInfo($dimension_id, $limit, $page, $filters, $metric_filters, $timeframe)
248251
->then(
249252
function ($response) {
250253
return $response[0];
@@ -261,15 +264,16 @@ function ($response) {
261264
* @param int $limit Number of items to include in the response (optional, default to 25)
262265
* @param int $page Offset by this many pages, of the size of `limit` (optional, default to 1)
263266
* @param string[] $filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` (optional)
267+
* @param string[] $metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional)
264268
* @param string[] $timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` (optional)
265269
*
266270
* @throws \InvalidArgumentException
267271
* @return \GuzzleHttp\Promise\PromiseInterface
268272
*/
269-
public function listDimensionValuesAsyncWithHttpInfo($dimension_id, $limit = 25, $page = 1, $filters = null, $timeframe = null)
273+
public function listDimensionValuesAsyncWithHttpInfo($dimension_id, $limit = 25, $page = 1, $filters = null, $metric_filters = null, $timeframe = null)
270274
{
271275
$returnType = '\MuxPhp\Models\ListDimensionValuesResponse';
272-
$request = $this->listDimensionValuesRequest($dimension_id, $limit, $page, $filters, $timeframe);
276+
$request = $this->listDimensionValuesRequest($dimension_id, $limit, $page, $filters, $metric_filters, $timeframe);
273277

274278
return $this->client
275279
->sendAsync($request, $this->createHttpClientOption())
@@ -312,12 +316,13 @@ function ($exception) {
312316
* @param int $limit Number of items to include in the response (optional, default to 25)
313317
* @param int $page Offset by this many pages, of the size of `limit` (optional, default to 1)
314318
* @param string[] $filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` (optional)
319+
* @param string[] $metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional)
315320
* @param string[] $timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` (optional)
316321
*
317322
* @throws \InvalidArgumentException
318323
* @return \GuzzleHttp\Psr7\Request
319324
*/
320-
public function listDimensionValuesRequest($dimension_id, $limit = 25, $page = 1, $filters = null, $timeframe = null)
325+
public function listDimensionValuesRequest($dimension_id, $limit = 25, $page = 1, $filters = null, $metric_filters = null, $timeframe = null)
321326
{
322327
// verify the required parameter 'dimension_id' is set
323328
if ($dimension_id === null || (is_array($dimension_id) && count($dimension_id) === 0)) {
@@ -367,6 +372,17 @@ public function listDimensionValuesRequest($dimension_id, $limit = 25, $page = 1
367372
}
368373
}
369374
// query params
375+
if ($metric_filters !== null) {
376+
if('form' === 'form' && is_array($metric_filters)) {
377+
foreach($metric_filters as $key => $value) {
378+
$queryParams[$key] = $value;
379+
}
380+
}
381+
else {
382+
$queryParams['metric_filters[]'] = $metric_filters;
383+
}
384+
}
385+
// query params
370386
if ($timeframe !== null) {
371387
if('form' === 'form' && is_array($timeframe)) {
372388
foreach($timeframe as $key => $value) {

0 commit comments

Comments
 (0)