Skip to content

Commit

Permalink
3.14.0 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsanford8 authored Dec 19, 2023
1 parent f9626ae commit e2e92fb
Show file tree
Hide file tree
Showing 27 changed files with 972 additions and 124 deletions.
34 changes: 25 additions & 9 deletions MuxPhp/Api/DimensionsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,16 @@ public function getConfig()
* @param int $limit Number of items to include in the response (optional, default to 25)
* @param int $page Offset by this many pages, of the size of `limit` (optional, default to 1)
* @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)
* @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)
* @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)
*
* @throws \MuxPhp\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \MuxPhp\Models\ListDimensionValuesResponse
*/
public function listDimensionValues($dimension_id, $limit = 25, $page = 1, $filters = null, $timeframe = null)
public function listDimensionValues($dimension_id, $limit = 25, $page = 1, $filters = null, $metric_filters = null, $timeframe = null)
{
list($response) = $this->listDimensionValuesWithHttpInfo($dimension_id, $limit, $page, $filters, $timeframe);
list($response) = $this->listDimensionValuesWithHttpInfo($dimension_id, $limit, $page, $filters, $metric_filters, $timeframe);
return $response;
}

Expand All @@ -145,15 +146,16 @@ public function listDimensionValues($dimension_id, $limit = 25, $page = 1, $filt
* @param int $limit Number of items to include in the response (optional, default to 25)
* @param int $page Offset by this many pages, of the size of `limit` (optional, default to 1)
* @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)
* @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)
* @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)
*
* @throws \MuxPhp\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \MuxPhp\Models\ListDimensionValuesResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function listDimensionValuesWithHttpInfo($dimension_id, $limit = 25, $page = 1, $filters = null, $timeframe = null)
public function listDimensionValuesWithHttpInfo($dimension_id, $limit = 25, $page = 1, $filters = null, $metric_filters = null, $timeframe = null)
{
$request = $this->listDimensionValuesRequest($dimension_id, $limit, $page, $filters, $timeframe);
$request = $this->listDimensionValuesRequest($dimension_id, $limit, $page, $filters, $metric_filters, $timeframe);

try {
$options = $this->createHttpClientOption();
Expand Down Expand Up @@ -237,14 +239,15 @@ public function listDimensionValuesWithHttpInfo($dimension_id, $limit = 25, $pag
* @param int $limit Number of items to include in the response (optional, default to 25)
* @param int $page Offset by this many pages, of the size of `limit` (optional, default to 1)
* @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)
* @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)
* @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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function listDimensionValuesAsync($dimension_id, $limit = 25, $page = 1, $filters = null, $timeframe = null)
public function listDimensionValuesAsync($dimension_id, $limit = 25, $page = 1, $filters = null, $metric_filters = null, $timeframe = null)
{
return $this->listDimensionValuesAsyncWithHttpInfo($dimension_id, $limit, $page, $filters, $timeframe)
return $this->listDimensionValuesAsyncWithHttpInfo($dimension_id, $limit, $page, $filters, $metric_filters, $timeframe)
->then(
function ($response) {
return $response[0];
Expand All @@ -261,15 +264,16 @@ function ($response) {
* @param int $limit Number of items to include in the response (optional, default to 25)
* @param int $page Offset by this many pages, of the size of `limit` (optional, default to 1)
* @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)
* @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)
* @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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function listDimensionValuesAsyncWithHttpInfo($dimension_id, $limit = 25, $page = 1, $filters = null, $timeframe = null)
public function listDimensionValuesAsyncWithHttpInfo($dimension_id, $limit = 25, $page = 1, $filters = null, $metric_filters = null, $timeframe = null)
{
$returnType = '\MuxPhp\Models\ListDimensionValuesResponse';
$request = $this->listDimensionValuesRequest($dimension_id, $limit, $page, $filters, $timeframe);
$request = $this->listDimensionValuesRequest($dimension_id, $limit, $page, $filters, $metric_filters, $timeframe);

return $this->client
->sendAsync($request, $this->createHttpClientOption())
Expand Down Expand Up @@ -312,12 +316,13 @@ function ($exception) {
* @param int $limit Number of items to include in the response (optional, default to 25)
* @param int $page Offset by this many pages, of the size of `limit` (optional, default to 1)
* @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)
* @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)
* @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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function listDimensionValuesRequest($dimension_id, $limit = 25, $page = 1, $filters = null, $timeframe = null)
public function listDimensionValuesRequest($dimension_id, $limit = 25, $page = 1, $filters = null, $metric_filters = null, $timeframe = null)
{
// verify the required parameter 'dimension_id' is set
if ($dimension_id === null || (is_array($dimension_id) && count($dimension_id) === 0)) {
Expand Down Expand Up @@ -367,6 +372,17 @@ public function listDimensionValuesRequest($dimension_id, $limit = 25, $page = 1
}
}
// query params
if ($metric_filters !== null) {
if('form' === 'form' && is_array($metric_filters)) {
foreach($metric_filters as $key => $value) {
$queryParams[$key] = $value;
}
}
else {
$queryParams['metric_filters[]'] = $metric_filters;
}
}
// query params
if ($timeframe !== null) {
if('form' === 'form' && is_array($timeframe)) {
foreach($timeframe as $key => $value) {
Expand Down
Loading

0 comments on commit e2e92fb

Please sign in to comment.