Skip to content

Reports api #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
autoformat
  • Loading branch information
cyriltata committed Jul 8, 2015
commit bd90317c075025d979a20d6466ef3221d839eafc
57 changes: 29 additions & 28 deletions Services/Zencoder/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,40 @@
*/
class Services_Zencoder_Report extends Services_Zencoder_Object {

/**
* Statistics of a report
*
* @var object
*/
public $statistics;
/**
* Statistics of a report
*
* @var object
*/
public $statistics;

/**
* Totals of a of report
*
* @var object
*/
public $total;
/**
* Totals of a of report
*
* @var object
*/
public $total;

/**
* A copy of the raw API response for debug purposes
*
* @var mixed
*/
protected $raw_response;
/**
* A copy of the raw API response for debug purposes
*
* @var mixed
*/
protected $raw_response;

/**
* Create a new Services_Zencoder_Report object.
/**
* Create a new Services_Zencoder_Report object.
* For attributes of the various kinds of reports, see
* @link https://app.zencoder.com/docs/api/reports/vod
* @link https://app.zencoder.com/docs/api/reports/live
* @link https://app.zencoder.com/docs/api/reports/all
*
* @param mixed $params API response
* @param string $type The type of statistic we are fetching
*/
public function __construct($params) {
$this->raw_response = $params;
parent::__construct($params);
}
*
* @param mixed $params API response
* @param string $type The type of statistic we are fetching
*/
public function __construct($params) {
$this->raw_response = $params;
parent::__construct($params);
}

}
28 changes: 14 additions & 14 deletions Services/Zencoder/Reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
* @license http://creativecommons.org/licenses/MIT/MIT
* @link http://github.com/zencoder/zencoder-php
*/
class Services_Zencoder_Reports extends Services_Zencoder_Base
{
class Services_Zencoder_Reports extends Services_Zencoder_Base {

/**
* Get details about different types of reports
*
* @link https://app.zencoder.com/docs/api/reports
*
* @param string $report_type The type of report to get. The following are currently supported over the api
* - 'all' : Returns all reports, both VOD and LIVE
* - 'vod' : Returns VOD reports
* - 'live': Return LIVE reports
* @param array $params An associated array of optional query parameters per requested report type
* Get details about different types of reports
*
* @link https://app.zencoder.com/docs/api/reports
*
* @param string $report_type The type of report to get. The following are currently supported over the api
* - 'all' : Returns all reports, both VOD and LIVE
* - 'vod' : Returns VOD reports
* - 'live': Return LIVE reports
* @param array $params An associated array of optional query parameters per requested report type
* @param array $opts Optional overrides
*
* @return Services_Zencoder_Report The object representation of the resource
*/
*
* @return Services_Zencoder_Report The object representation of the resource
*/
public function details($report_type, $params = array(), $opts = array()) {
return new Services_Zencoder_Report($this->proxy->retrieveData("reports/$report_type", $params, $opts));
}
Expand Down