I am using the latest YouTube API ie https://www.googleapis.com/youtube/v3 with the PHP client library. In an earlier version, to find out if the eTag was changed or updated for a resource, we would use the following code:
$client->getIo()->setOptions(array(
CURLOPT_HTTPHEADER => array('If-None-Match:<eTag>"')));
try {
$response = $youtube->playlists->listPlaylists('snippet', array('id' => '6KzzScZSUrs'));
}catch (Google_Service_Exception $e) {
if (304 == $e->getCode()) {
$response = new EmptyResponse;
} else {
$response = null;
}
The new version is getIo()deleted. What is the alternative to using this method?
source
share