Youtube
Youtube copied to clipboard
Add Get Channel By Handle
Copy this function inside your YouTub.php to search channel by there handle name
public function getChannelByHandle($handleName, $optionalParams = [], $part = ['id', 'snippet', 'contentDetails', 'statistics'])
{
$API_URL = $this->getApi('channels.list');
$params = [
'forHandle' => $handleName,
'part' => implode(',', $part),
];
$params = array_merge($params, $optionalParams);
$apiData = $this->api_get($API_URL, $params);
return $this->decodeSingle($apiData);
}
@j33tmane if you found this method useful you can add it to the project, PRs are always welcome ;)