src/BaiduBce/Services/Vod/VodClient.php
public function getMediaStatistic($mediaId,
                                      $startTime,
                                      $endTime,
                                      $aggregate,
                                      $options = array())
    {
        list($config) = $this->parseOptions($options, 'config');
        if (empty($mediaId)) {
            throw new BceClientException("The parameter mediaId should NOT be null or empty string");
        }
        $params = array();
        if (!empty($startTime)) {
            $params['startTime'] = $startTime;
        }
        if (!empty($endTime)) {
            $params['endTime'] = $endTime;
        }
        if (!empty($aggregate)) {
            $params['aggregate'] = $aggregate;
        }

        return $this->sendRequest(
            HttpMethod::GET,
            array(
                'config' => $config,
                'params' => $params,
            ),
            "/statistic/media/$mediaId"
        );
    }
public function getMediaStatistic($mediaId,
                                      $startTime,
                                      $endTime,
                                      $aggregate,
                                      $options = array())
    {
        list($config) = $this->parseOptions($options, 'config');
        if (empty($mediaId)) {
            throw new BceClientException("The parameter mediaId should NOT be null or empty string");
        }
        $params = array();
        if (!empty($startTime)) {
            $params['startTime'] = $startTime;
        }
        if (!empty($endTime)) {
            $params['endTime'] = $endTime;
        }
        if (!empty($aggregate)) {
            $params['aggregate'] = $aggregate;
        }

        return $this->sendRequest(
            HttpMethod::GET,
            array(
                'config' => $config,
                'params' => $params,
            ),
            "/statistic/media/$mediaId"
        );
    }
public function getMediaStatistic ( $ mediaId , $ startTime , $ endTime , $ aggregate , $ options = array ( ) ) { list ( $ config ) = $ this -> parseOptions ( $ options , 'config' ) ; if ( empty ( $ mediaId ) ) { throw new BceClientException ( "The parameter mediaId should NOT be null or empty string" ) ; } $ params = array ( ) ; if ( ! empty ( $ startTime ) ) { $ params [ 'startTime' ] = $ startTime ; } if ( ! empty ( $ endTime ) ) { $ params [ 'endTime' ] = $ endTime ; } if ( ! empty ( $ aggregate ) ) { $ params [ 'aggregate' ] = $ aggregate ; } return $ this -> sendRequest ( HttpMethod :: GET , array ( 'config' => $ config , 'params' => $ params , ) , "/statistic/media/$mediaId" ) ; }
get the statistic of a vod media

@param $mediaId string, mediaId of the media
@param $startTime string
@param $endTime string
@param $aggregate string, 'true' or 'false'
@param array $options Supported options:
{
config: the optional bce configuration, which will overwrite the
default vod client configuration that was passed in constructor.
}
@return mixed the result of publishing
@throws BceClientException
get the statistic of a vod media