@@ 123-135 (lines=13) @@ | ||
120 | /** |
|
121 | * {@inheritdoc} |
|
122 | */ |
|
123 | public function getCount($videoManagerId, VideosRequestParameters $parameters = null) |
|
124 | { |
|
125 | $options = [ |
|
126 | self::OPT_VIDEO_MANAGER_ID => $videoManagerId, |
|
127 | ]; |
|
128 | ||
129 | if ($parameters) { |
|
130 | $options['query'] = $parameters->getContainer(); |
|
131 | } |
|
132 | ||
133 | $response = $this->makeRequest('GET', 'videos', $options); |
|
134 | ||
135 | return json_decode($response->getBody()->getContents(), true)['total']; |
|
136 | } |
|
137 | ||
138 | /** |
|
@@ 224-241 (lines=18) @@ | ||
221 | /** |
|
222 | * {@inheritdoc} |
|
223 | */ |
|
224 | public function getVideo($videoManagerId, $videoId, VideoRequestParameters $parameters = null) |
|
225 | { |
|
226 | $options = [ |
|
227 | self::OPT_VIDEO_MANAGER_ID => $videoManagerId, |
|
228 | ]; |
|
229 | ||
230 | if ($parameters) { |
|
231 | $options['query'] = $parameters->getContainer(); |
|
232 | } |
|
233 | ||
234 | $response = $this->makeRequest( |
|
235 | 'GET', |
|
236 | sprintf('videos/%s', $videoId), |
|
237 | $options |
|
238 | ); |
|
239 | ||
240 | return $this->deserialize($response->getBody()->getContents(), Video::class); |
|
241 | } |
|
242 | ||
243 | /** |
|
244 | * {@inheritdoc} |