php - Get most popular videos of a channel by its name -
I am trying to list the most popular (or latest) video of a channel using the YouTube 3.0 API. I have already implemented it, just not sure that this is the right way to do this, therefore advice is needed. First of all, I get the Channel ID by name (for example, instead of TEDxTalks> {Channel_name} ): https: // www .googleapis.com / youtube / v3 / search? Part = snippet & type = channel & amp; q = {channel_name} & amp; ; Key = {API_KEY} Then I get a video of this channel ID, which is ordered by viewCount (or date ) The list of videos that is completely: https://www.googleapis.com/youtube/v3/search?part=snippet&channelId= {channel_id} and command = viewcount & Amp; Type = Video & amp; Key = {API_KEY} How reliable is the first request? If the name is the exact match of the channel URL slug or username (such as tdstalk), will he always bring this channel back? Or is there a more reliable way to get Channel ID by its name? Thank you. ...