From db0c16dac5606a579af1b7a1e2034be2bd8d5db9 Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Thu, 21 Dec 2017 13:38:54 +0100 Subject: [PATCH 01/18] added video download endpoint --- lib/ApiClient/AbstractApiClient.php | 15 +++ lib/Entity/VideoDownloadUrl.php | 136 ++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 lib/Entity/VideoDownloadUrl.php diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index adadfe6..1abf830 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -10,6 +10,7 @@ use MovingImage\Client\VMPro\Entity\EmbedCode; use MovingImage\Client\VMPro\Entity\Video; use MovingImage\Client\VMPro\Entity\Attachment; +use MovingImage\Client\VMPro\Entity\VideoDownloadUrl; use MovingImage\Client\VMPro\Entity\VideoRequestParameters; use MovingImage\Client\VMPro\Entity\VideosRequestParameters; use MovingImage\Client\VMPro\Interfaces\ApiClientInterface; @@ -150,6 +151,20 @@ public function getVideoUploadUrl($videoManagerId, $videoId) : $response->getHeader('location'); } + /** + * {@inheritdoc} + */ + public function getVideoDownloadUrls($videoManagerId, $videoId) + { + $response = $this->makeRequest('GET', sprintf('videos/%s/download-urls', $videoId), [ + self::OPT_VIDEO_MANAGER_ID => $videoManagerId, + ]); + + $response = json_decode($response->getBody()->getContents()); + + return $this->deserialize($response, 'ArrayCollection<'.VideoDownloadUrl::class.'>'); + } + /** * {@inheritdoc} */ diff --git a/lib/Entity/VideoDownloadUrl.php b/lib/Entity/VideoDownloadUrl.php new file mode 100644 index 0000000..9539aa7 --- /dev/null +++ b/lib/Entity/VideoDownloadUrl.php @@ -0,0 +1,136 @@ +quality; + } + + /** + * @param string $quality + * + * @return VideoDownloadUrl + */ + public function setQuality($quality) + { + $this->quality = $quality; + + return $this; + } + + /** + * @return string + */ + public function getProfileKey() + { + return $this->profileKey; + } + + /** + * @param string $profileKey + * + * @return VideoDownloadUrl + */ + public function setProfileKey($profileKey) + { + $this->profileKey = $profileKey; + + return $this; + } + + /** + * @return string + */ + public function getFileExtension() + { + return $this->fileExtension; + } + + /** + * @param string $fileExtension + * + * @return VideoDownloadUrl + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension = $fileExtension; + + return $this; + } + + /** + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * @param string $url + * + * @return VideoDownloadUrl + */ + public function setUrl($url) + { + $this->url = $url; + + return $this; + } + + /** + * @return int + */ + public function getFileSize() + { + return $this->fileSize; + } + + /** + * @param int $fileSize + * + * @return VideoDownloadUrl + */ + public function setFileSize($fileSize) + { + $this->fileSize = $fileSize; + + return $this; + } +} From aa072ca8a7bcdd57c4bf0fb6bb6cb7d389ef1d95 Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Thu, 21 Dec 2017 15:46:08 +0100 Subject: [PATCH 02/18] video manager meta changed to 1.5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 12602a3..ed7e194 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "namshi/jose": "^6.0 || ^7.0", "jms/serializer": "^1.0", "guzzlehttp/guzzle": "^5.0 || ^6.0", - "movingimage/video-manager-meta": "dev-master", + "movingimage/video-manager-meta": "^1.5", "psr/cache": "^1.0", "cache/void-adapter": "^1.0" }, From 9bfa0cdd0484ba37ad81e613a12b92272bfadfca Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Thu, 21 Dec 2017 16:32:19 +0100 Subject: [PATCH 03/18] Updated --- lib/ApiClient/AbstractApiClient.php | 2 +- lib/Interfaces/ApiClientInterface.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 1abf830..a112853 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -160,7 +160,7 @@ public function getVideoDownloadUrls($videoManagerId, $videoId) self::OPT_VIDEO_MANAGER_ID => $videoManagerId, ]); - $response = json_decode($response->getBody()->getContents()); + $response = $response->getBody()->getContents(); return $this->deserialize($response, 'ArrayCollection<'.VideoDownloadUrl::class.'>'); } diff --git a/lib/Interfaces/ApiClientInterface.php b/lib/Interfaces/ApiClientInterface.php index 88bd0bd..f0bd600 100644 --- a/lib/Interfaces/ApiClientInterface.php +++ b/lib/Interfaces/ApiClientInterface.php @@ -2,12 +2,14 @@ namespace MovingImage\Client\VMPro\Interfaces; +use Doctrine\Common\Collections\ArrayCollection; use MovingImage\Client\VMPro\Collection\ChannelCollection; use MovingImage\Client\VMPro\Collection\VideoCollection; use MovingImage\Client\VMPro\Entity\Attachment; use MovingImage\Client\VMPro\Entity\Channel; use MovingImage\Client\VMPro\Entity\ChannelsRequestParameters; use MovingImage\Client\VMPro\Entity\EmbedCode; +use MovingImage\Client\VMPro\Entity\VideoDownloadUrl; use MovingImage\Client\VMPro\Entity\VideoRequestParameters; use MovingImage\Client\VMPro\Entity\VideosRequestParameters; use MovingImage\Client\VMPro\Entity\Video; @@ -80,6 +82,16 @@ public function getVideos($videoManagerId, VideosRequestParameters $parameters = */ public function getVideoUploadUrl($videoManagerId, $videoId); + /** + * Get the Download URLs for a specific video. + * + * @param int $videoManagerId + * @param string $videoId + * + * @return ArrayCollection|VideoDownloadUrl[] + */ + public function getVideoDownloadUrls($videoManagerId, $videoId); + /** * Update a video with new values. * From cdb2d3236a6e894a4663559a95add9edb0b373fe Mon Sep 17 00:00:00 2001 From: "daniel.huebner" Date: Wed, 11 Apr 2018 18:38:13 +0200 Subject: [PATCH 04/18] Consuming Transcoding Status Endpoint. New Entity VideoTranscodingStatus. --- lib/ApiClient/AbstractApiClient.php | 14 ++++ lib/Entity/VideoTranscodingStatus.php | 115 ++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 lib/Entity/VideoTranscodingStatus.php diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index a112853..52d8cd1 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -299,4 +299,18 @@ public function searchChannels($videoManagerId, ChannelsRequestParameters $param return $collection; } + + /** + * {@inheritdoc} + */ + public function getTranscodingStatus($videoManagerId, $videoId) + { + $response = $this->makeRequest('GET', sprintf('videos/%s/transcoding-status', $videoId), [ + self::OPT_VIDEO_MANAGER_ID => $videoManagerId, + ]); + + $response = $response->getBody()->getContents(); + + return $this->deserialize($response, 'ArrayCollection<'.VideoTranscodingStatus::class.'>'); + } } diff --git a/lib/Entity/VideoTranscodingStatus.php b/lib/Entity/VideoTranscodingStatus.php new file mode 100644 index 0000000..f7e6948 --- /dev/null +++ b/lib/Entity/VideoTranscodingStatus.php @@ -0,0 +1,115 @@ +quality; + } + + /** + * @param string $quality + * + * @return VideoTranscodingStatus + */ + public function setQuality($quality) + { + $this->quality = $quality; + + return $this; + } + + /** + * @return string + */ + public function getProfileKey() + { + return $this->profileKey; + } + + /** + * @param string $profileKey + * + * @return VideoTranscodingStatus + */ + public function setProfileKey($profileKey) + { + $this->profileKey = $profileKey; + + return $this; + } + + /** + * @return string + */ + public function getFileExtension() + { + return $this->fileExtension; + } + + /** + * @param string $fileExtension + * + * @return VideoTranscodingStatus + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension = $fileExtension; + + return $this; + } + + /** + * @return mixed + */ + public function getTranscodingCompleted() + { + return $this->transcodingCompleted; + } + + /** + * @param mixed $transcodingCompleted + * + * @return VideoTranscodingStatus + */ + public function setTranscodingCompleted($transcodingCompleted) + { + $this->transcodingCompleted = $transcodingCompleted; + + return $this; + } +} \ No newline at end of file From 55d02d9e10d7aca44b96e814b8966f4676bd50be Mon Sep 17 00:00:00 2001 From: "daniel.huebner" Date: Thu, 12 Apr 2018 16:43:58 +0200 Subject: [PATCH 05/18] added Thumbnail Collection endpoint and respective entities --- lib/ApiClient/AbstractApiClient.php | 15 ++++ lib/Entity/VideoThumbnail.php | 87 ++++++++++++++++++++++ lib/Entity/VideoThumbnailCollection.php | 95 +++++++++++++++++++++++++ 3 files changed, 197 insertions(+) create mode 100644 lib/Entity/VideoThumbnail.php create mode 100644 lib/Entity/VideoThumbnailCollection.php diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 52d8cd1..5a55f86 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -13,6 +13,7 @@ use MovingImage\Client\VMPro\Entity\VideoDownloadUrl; use MovingImage\Client\VMPro\Entity\VideoRequestParameters; use MovingImage\Client\VMPro\Entity\VideosRequestParameters; +use MovingImage\Client\VMPro\Entity\VideoThumbnailCollection; use MovingImage\Client\VMPro\Interfaces\ApiClientInterface; use MovingImage\Client\VMPro\Util\ChannelTrait; use MovingImage\Client\VMPro\Util\Logging\Traits\LoggerAwareTrait; @@ -313,4 +314,18 @@ public function getTranscodingStatus($videoManagerId, $videoId) return $this->deserialize($response, 'ArrayCollection<'.VideoTranscodingStatus::class.'>'); } + + /** + * {@inheritdoc} + */ + public function getThumbnailCollection($videoManagerId, $videoId) + { + $response = $this->makeRequest('GET', sprintf('videos/%s/thumbnails', $videoId), [ + self::OPT_VIDEO_MANAGER_ID => $videoManagerId, + ]); + + $response = $response->getBody()->getContents(); + + return $this->deserialize($response, 'ArrayCollection<'.VideoThumbnailCollection::class.'>'); + } } diff --git a/lib/Entity/VideoThumbnail.php b/lib/Entity/VideoThumbnail.php new file mode 100644 index 0000000..9d28b8a --- /dev/null +++ b/lib/Entity/VideoThumbnail.php @@ -0,0 +1,87 @@ +") + */ + private $dimension; + + /** + * @return mixed + */ + public function getQuality() + { + return $this->quality; + } + + /** + * @param string $quality + * + * @return $this + */ + public function setQuality($quality) + { + $this->quality = $quality; + + return $this; + } + + /** + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * @param mixed $url + * + * @return $this + */ + public function setUrl($url) + { + $this->url = $url; + + return $this; + } + + /** + * @return mixed + */ + public function getDimension() + { + return $this->dimension; + } + + /** + * @param mixed $dimension + * + * @return $this + */ + public function setDimension($dimension) + { + $this->dimension = $dimension; + + return $this; + } +} \ No newline at end of file diff --git a/lib/Entity/VideoThumbnailCollection.php b/lib/Entity/VideoThumbnailCollection.php new file mode 100644 index 0000000..db6defb --- /dev/null +++ b/lib/Entity/VideoThumbnailCollection.php @@ -0,0 +1,95 @@ +") + */ + private $items; + + /** + * @return mixed + */ + public function getId() + { + return $this->id; + } + + /** + * @param mixed $id + * + * @return VideoThumbnailCollection + */ + public function setId($id) + { + $this->id = $id; + + return $this; + } + + /** + * @return mixed + */ + public function getActive() + { + return $this->active; + } + + /** + * @return bool + */ + public function isActive() + { + return $this->active; + } + + /** + * @param mixed $active + * + * @return VideoThumbnailCollection + */ + public function setActive($active) + { + $this->active = $active; + + return $this; + } + + /** + * @return mixed + */ + public function getItems() + { + return $this->items; + } + + /** + * @param mixed $items + * + * @return VideoThumbnailCollection + */ + public function setItems($items) + { + $this->items = $items; + + return $this; + } +} \ No newline at end of file From 38163d75f598a6e2b99a995abc89744a1c13eff6 Mon Sep 17 00:00:00 2001 From: "daniel.huebner" Date: Fri, 13 Apr 2018 14:23:13 +0200 Subject: [PATCH 06/18] use thumbnail upload functionality --- lib/ApiClient/AbstractApiClient.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 5a55f86..5380db9 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -328,4 +328,28 @@ public function getThumbnailCollection($videoManagerId, $videoId) return $this->deserialize($response, 'ArrayCollection<'.VideoThumbnailCollection::class.'>'); } + + /** + * {@inheritdoc} + */ + public function createThumbnailForVideo($videoManagerId, $videoId) + { + $response = $this->makeRequest('POST', sprintf('videos/%s/thumbnails', $videoId), [ + self::OPT_VIDEO_MANAGER_ID => $videoManagerId, + ]); + + return $response->getHeader('Location'); + } + + /** + * {@inheritdoc} + */ + public function getThumbnailUploadUrl($videoManagerId, $videoId, $thumbnailId) + { + $response = $this->makeRequest('GET', sprintf('videos/%s/thumbnails/%s/upload-url', $videoId, $thumbnailId), [ + self::OPT_VIDEO_MANAGER_ID => $videoManagerId, + ]); + + return $response->getHeader('Location'); + } } From 763229637668eb484ca2e20b93c266b331315aeb Mon Sep 17 00:00:00 2001 From: "daniel.huebner" Date: Sat, 14 Apr 2018 16:16:16 +0200 Subject: [PATCH 07/18] publish videos via api --- lib/ApiClient/AbstractApiClient.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 5380db9..fe82dca 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -352,4 +352,18 @@ public function getThumbnailUploadUrl($videoManagerId, $videoId, $thumbnailId) return $response->getHeader('Location'); } + + /** + * {@inheritdoc} + */ + public function publishVideoAsset($videoManagerId, $videoId) + { + $json = $this->buildJsonParameters(['published' => 'true'], ['downloadable' => 'true']); + $response = $this->makeRequest('PATCH', sprintf('videos/%s', $videoId), [ + self::OPT_VIDEO_MANAGER_ID => $videoManagerId, + 'json' => $json + ]); + + return $response->getStatusCode(); + } } From 1061f5fcec7034bf1abe4fd8e7afa772981d8988 Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Sun, 15 Apr 2018 19:01:02 +0200 Subject: [PATCH 08/18] fixed transcoding namespace --- lib/ApiClient/AbstractApiClient.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index fe82dca..98e3d8a 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -14,6 +14,7 @@ use MovingImage\Client\VMPro\Entity\VideoRequestParameters; use MovingImage\Client\VMPro\Entity\VideosRequestParameters; use MovingImage\Client\VMPro\Entity\VideoThumbnailCollection; +use MovingImage\Client\VMPro\Entity\VideoTranscodingStatus; use MovingImage\Client\VMPro\Interfaces\ApiClientInterface; use MovingImage\Client\VMPro\Util\ChannelTrait; use MovingImage\Client\VMPro\Util\Logging\Traits\LoggerAwareTrait; From e512f4909533886ea59b51effebd4c7637ed365a Mon Sep 17 00:00:00 2001 From: Daniel Huebner Date: Mon, 22 Oct 2018 15:54:30 +0200 Subject: [PATCH 09/18] added function to activate new thumbnail. ApiEndpoint Update Specific Thumbnail. --- lib/ApiClient/AbstractApiClient.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 98e3d8a..a676e76 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -367,4 +367,18 @@ public function publishVideoAsset($videoManagerId, $videoId) return $response->getStatusCode(); } + + /** + * {@inheritdoc} + */ + public function updateSpecificThumbnail($videoManagerId, $videoId, $thumbnailId) + { + $json = $this->buildJsonParameters(['active' => 'true']); + $response = $this->makeRequest('PATCH', sprintf('videos/%s/thumbnails/%s', $videoId, $thumbnailId), [ + self::OPT_VIDEO_MANAGER_ID => $videoManagerId, + 'json' => $json + ]); + + return $response->getStatusCode(); + } } From 3df9b804ad7c5fb88cf149866417b936502825a7 Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Mon, 3 Dec 2018 12:48:57 +0100 Subject: [PATCH 10/18] updated thumbnail function --- lib/ApiClient/AbstractApiClient.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index a676e76..2aa016e 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -373,7 +373,7 @@ public function publishVideoAsset($videoManagerId, $videoId) */ public function updateSpecificThumbnail($videoManagerId, $videoId, $thumbnailId) { - $json = $this->buildJsonParameters(['active' => 'true']); + $json = $this->buildJsonParameters(['active' => 'true'], []); $response = $this->makeRequest('PATCH', sprintf('videos/%s/thumbnails/%s', $videoId, $thumbnailId), [ self::OPT_VIDEO_MANAGER_ID => $videoManagerId, 'json' => $json @@ -382,3 +382,4 @@ public function updateSpecificThumbnail($videoManagerId, $videoId, $thumbnailId) return $response->getStatusCode(); } } + From 1540da15d6ca2312b971705b8663de8119aa4bb3 Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Wed, 13 Mar 2019 19:20:06 +0100 Subject: [PATCH 11/18] added ad config ep --- lib/ApiClient/AbstractApiClient.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 2aa016e..24d926b 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -381,5 +381,19 @@ public function updateSpecificThumbnail($videoManagerId, $videoId, $thumbnailId) return $response->getStatusCode(); } + + /** + * @param $videoManagerId + * @return string + * @throws \Exception + */ + public function getAdConfigurations($videoManagerId) + { + $response = $this->makeRequest('GET', 'ad_configurations', [ + self::OPT_VIDEO_MANAGER_ID => $videoManagerId, + ]); + + return $response->getBody()->getContents(); + } } From 2830480bfe228d2ddc39684c767720daa78e5fe3 Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Mon, 18 Mar 2019 12:52:52 +0100 Subject: [PATCH 12/18] added ep for update video --- lib/ApiClient/AbstractApiClient.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 24d926b..0a61495 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -15,6 +15,7 @@ use MovingImage\Client\VMPro\Entity\VideosRequestParameters; use MovingImage\Client\VMPro\Entity\VideoThumbnailCollection; use MovingImage\Client\VMPro\Entity\VideoTranscodingStatus; +use MovingImage\Client\VMPro\Exception; use MovingImage\Client\VMPro\Interfaces\ApiClientInterface; use MovingImage\Client\VMPro\Util\ChannelTrait; use MovingImage\Client\VMPro\Util\Logging\Traits\LoggerAwareTrait; @@ -395,5 +396,23 @@ public function getAdConfigurations($videoManagerId) return $response->getBody()->getContents(); } + + /** + * @param $videoManagerId + * @param $videoId + * @param array $params + * @return int + * @throws \Exception + * @throws Exception + */ + public function updateVideoData($videoManagerId, $videoId, array $params = []) + { + $response = $this->makeRequest('PATCH', sprintf('videos/%s', $videoId), [ + self::OPT_VIDEO_MANAGER_ID => $videoManagerId, + 'json' => $this->buildJsonParameters($params, []), + ]); + + return $response->getStatusCode(); + } } From 99c495c8d9616a23e2b7c8499dba8eb677fb3a05 Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Mon, 18 Mar 2019 14:21:38 +0100 Subject: [PATCH 13/18] added ep for update video --- lib/ApiClient/AbstractApiClient.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 0a61495..010bf79 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -403,13 +403,12 @@ public function getAdConfigurations($videoManagerId) * @param array $params * @return int * @throws \Exception - * @throws Exception */ public function updateVideoData($videoManagerId, $videoId, array $params = []) { $response = $this->makeRequest('PATCH', sprintf('videos/%s', $videoId), [ self::OPT_VIDEO_MANAGER_ID => $videoManagerId, - 'json' => $this->buildJsonParameters($params, []), + 'json' => $params, ]); return $response->getStatusCode(); From c051eff91449f9f6d7ced3424f507b5af2564c7e Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Mon, 18 Mar 2019 14:22:13 +0100 Subject: [PATCH 14/18] added ep for update video --- lib/ApiClient/AbstractApiClient.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 010bf79..0a61495 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -403,12 +403,13 @@ public function getAdConfigurations($videoManagerId) * @param array $params * @return int * @throws \Exception + * @throws Exception */ public function updateVideoData($videoManagerId, $videoId, array $params = []) { $response = $this->makeRequest('PATCH', sprintf('videos/%s', $videoId), [ self::OPT_VIDEO_MANAGER_ID => $videoManagerId, - 'json' => $params, + 'json' => $this->buildJsonParameters($params, []), ]); return $response->getStatusCode(); From 5c25164566b51c8ca05425d7b68215701ef71d48 Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Mon, 18 Mar 2019 14:23:24 +0100 Subject: [PATCH 15/18] added ep for update video --- lib/ApiClient/AbstractApiClient.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 0a61495..010bf79 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -403,13 +403,12 @@ public function getAdConfigurations($videoManagerId) * @param array $params * @return int * @throws \Exception - * @throws Exception */ public function updateVideoData($videoManagerId, $videoId, array $params = []) { $response = $this->makeRequest('PATCH', sprintf('videos/%s', $videoId), [ self::OPT_VIDEO_MANAGER_ID => $videoManagerId, - 'json' => $this->buildJsonParameters($params, []), + 'json' => $params, ]); return $response->getStatusCode(); From 19014ef9c6889343a236f8ef0e349d9ac477955e Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Mon, 18 Mar 2019 14:24:11 +0100 Subject: [PATCH 16/18] added ep for update video --- lib/ApiClient/AbstractApiClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index 010bf79..a86b646 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -408,7 +408,7 @@ public function updateVideoData($videoManagerId, $videoId, array $params = []) { $response = $this->makeRequest('PATCH', sprintf('videos/%s', $videoId), [ self::OPT_VIDEO_MANAGER_ID => $videoManagerId, - 'json' => $params, + 'json' => $paramsi, ]); return $response->getStatusCode(); From 80dbec0fb9c16c31223deb1ad8cfcf8f36f0fe1b Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Mon, 18 Mar 2019 14:24:52 +0100 Subject: [PATCH 17/18] added ep for update video --- lib/ApiClient/AbstractApiClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index a86b646..be84d10 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -408,7 +408,7 @@ public function updateVideoData($videoManagerId, $videoId, array $params = []) { $response = $this->makeRequest('PATCH', sprintf('videos/%s', $videoId), [ self::OPT_VIDEO_MANAGER_ID => $videoManagerId, - 'json' => $paramsi, + 'json' => [], ]); return $response->getStatusCode(); From 40e6f16f6a84bbb9f4c88ae89975ef5fe77e5f6f Mon Sep 17 00:00:00 2001 From: ilham deneri Date: Mon, 18 Mar 2019 14:25:31 +0100 Subject: [PATCH 18/18] added ep for update video --- lib/ApiClient/AbstractApiClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ApiClient/AbstractApiClient.php b/lib/ApiClient/AbstractApiClient.php index be84d10..010bf79 100644 --- a/lib/ApiClient/AbstractApiClient.php +++ b/lib/ApiClient/AbstractApiClient.php @@ -408,7 +408,7 @@ public function updateVideoData($videoManagerId, $videoId, array $params = []) { $response = $this->makeRequest('PATCH', sprintf('videos/%s', $videoId), [ self::OPT_VIDEO_MANAGER_ID => $videoManagerId, - 'json' => [], + 'json' => $params, ]); return $response->getStatusCode();