diff --git a/Nextras/YoutubeApi/Reader.php b/Nextras/YoutubeApi/Reader.php index b3de8f9..7912a0a 100644 --- a/Nextras/YoutubeApi/Reader.php +++ b/Nextras/YoutubeApi/Reader.php @@ -8,7 +8,6 @@ namespace Nextras\YoutubeApi; -use Composer\CaBundle\CaBundle; use DateInterval; use GuzzleHttp\Client; use Nette; @@ -17,7 +16,6 @@ class Reader { use Nette\SmartObject; - /** @var string */ const FETCH_URL = 'https://www.googleapis.com/youtube/v3/videos?key=%s&part=snippet,contentDetails&id=%s'; @@ -32,9 +30,7 @@ public function __construct($apiKey, Client $httpClient = null) { $this->apiKey = $apiKey; if ($httpClient === null) { - $httpClient = new Client([ - 'verify' => CaBundle::getSystemCaRootBundlePath(), - ]); + $httpClient = new Client(); } $this->httpClient = $httpClient; } @@ -42,7 +38,7 @@ public function __construct($apiKey, Client $httpClient = null) /** * Fetches video data by youtube url - * @param string $videoUrl YouTube url + * @param string $videoUrl YouTube url * @return Video */ public function getVideoByUrl($videoUrl) @@ -62,10 +58,9 @@ public function getVideoByUrl($videoUrl) } - /** * Fetchs video data - * @param string $videoId + * @param string $videoId * @return Video */ public function getVideo($videoId) @@ -74,7 +69,6 @@ public function getVideo($videoId) } - protected function getData($videoId) { $url = sprintf(self::FETCH_URL, $this->apiKey, $videoId); @@ -90,7 +84,6 @@ protected function getData($videoId) } - protected function parseData($data, $videoId) { $data = Nette\Utils\Json::decode($data); diff --git a/composer.json b/composer.json index 446438e..c07b06c 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,6 @@ "php": ">=5.6", "nette/utils": "~2.4", "nette/http": "~2.2", - "composer/ca-bundle": "~1.0", "guzzlehttp/guzzle": "~6.2" }, "require-dev": {