/** * @param $url * * @return string */ public function getPlaylistIdFromUrl($url) { return YoutubeUrlParser::parsePlaylistUrl($url); }
/** * return the playlist's videos by id or by username. * * @param string $id_or_name * @param date $synced_at * * @return Vinelab\Youtube\Channel */ public function videosForPlaylist($url, $synced_at = null) { //parse the url and then return the playlist id or name $id_or_name = UrlParser::parsePlaylistUrl($url); return $this->api->playlist($id_or_name, $synced_at); }