Closed j33tmane closed 3 months ago
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 ;)
This has been added to the package. Thank you both for your contribution 💯
Copy this function inside your YouTub.php to search channel by there handle name