Controller/EventsController.php
public function addUsage($sessionId, MediaUsage $mediaUsage)
    {
        $parameters = [
            'query' => [],
            'body' => json_encode(['sessionId' => $sessionId, 'mediaUsage' => $mediaUsage], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

        $result = $this->post('v1/events/usage', $parameters);
        $result = new MediaUsageResponse($result);

        return $result;
    }
public function addUsage($sessionId, MediaUsage $mediaUsage)
    {
        $parameters = [
            'query' => [],
            'body' => json_encode(['sessionId' => $sessionId, 'mediaUsage' => $mediaUsage], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

        $result = $this->post('v1/events/usage', $parameters);
        $result = new MediaUsageResponse($result);

        return $result;
    }
public function addUsage ( $ sessionId , MediaUsage $ mediaUsage ) { $ parameters = [ 'query' => [ ] , 'body' => json_encode ( [ 'sessionId' => $ sessionId , 'mediaUsage' => $ mediaUsage ] , JSON_UNESCAPED_UNICODE ) , 'headers' => [ ] , ] ; $ result = $ this -> post ( 'v1/events/usage' , $ parameters ) ; $ result = new MediaUsageResponse ( $ result ) ; return $ result ; }
Register a usage of a Media.

@param  int                $sessionId  The session id to log the event on
@param  MediaUsage         $mediaUsage The MediaUsage to register
@return MediaUsageResponse
Register a usage of a Media .