diff --git a/CHANGELOG.md b/CHANGELOG.md index 6033e74..88de202 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Changelog +## [3.0.5] - 2019-12-11 +### Fixed +- Fixes `setUrl` method not found error.([#239](https://github.com/vimeo/vimeo.php/pull/239)) +- Adds `TusHelper` class. + ## [3.0.4] - 2019-12-02 ### Fixed - Fixes "invalid bucket" error when uploading a new video. ([#237](https://github.com/vimeo/vimeo.php/pull/237)) @@ -112,6 +117,7 @@ ### Added - This is the Vimeo library for version 3 of the Vimeo API. +[3.0.5]: https://github.com/vimeo/vimeo.php/compare/3.0.4...3.0.5 [3.0.4]: https://github.com/vimeo/vimeo.php/compare/3.0.3...3.0.4 [3.0.3]: https://github.com/vimeo/vimeo.php/compare/3.0.2...3.0.3 [3.0.2]: https://github.com/vimeo/vimeo.php/compare/3.0.1...3.0.2 diff --git a/src/Vimeo/Upload/TusClient.php b/src/Vimeo/Upload/TusClient.php new file mode 100644 index 0000000..beb4e32 --- /dev/null +++ b/src/Vimeo/Upload/TusClient.php @@ -0,0 +1,20 @@ +url = $url; + return $this; + } +} \ No newline at end of file diff --git a/src/Vimeo/Vimeo.php b/src/Vimeo/Vimeo.php index 0d4a974..5008b94 100644 --- a/src/Vimeo/Vimeo.php +++ b/src/Vimeo/Vimeo.php @@ -5,6 +5,7 @@ use Vimeo\Exceptions\VimeoException; use Vimeo\Exceptions\VimeoRequestException; use Vimeo\Exceptions\VimeoUploadException; +use Vimeo\Upload\TusClient; /** * Copyright 2013 Vimeo @@ -34,7 +35,7 @@ class Vimeo const CLIENT_CREDENTIALS_TOKEN_ENDPOINT = '/oauth/authorize/client'; const VERSIONS_ENDPOINT = '/versions'; const VERSION_STRING = 'application/vnd.vimeo.*+json; version=3.4'; - const USER_AGENT = 'vimeo.php 3.0.4; (http://developer.vimeo.com/api/docs)'; + const USER_AGENT = 'vimeo.php 3.0.5; (http://developer.vimeo.com/api/docs)'; const CERTIFICATE_PATH = '/certificates/vimeo-api.pem'; /** @var array */ @@ -590,7 +591,7 @@ private function perform_upload_tus(string $file_path, $file_size, array $attemp $failures = 0; $chunk_size = $this->getTusUploadChunkSize($default_chunk_size, (int)$file_size); - $client = new \TusPhp\Tus\Client($base_url); + $client = new TusClient($base_url); $client->setApiPath($api_path); $client->setKey($key)->file($file_path); $client->setUrl($url);