Good Day, I’m new to this Youtube GData api and i’m having trouble with accessing the list of videos of a particular playlist.
What I did first was get the list of playlist of a particular user. It returned something like this GDataEntryYouTubePlaylistLink 0x888ea20: {v:2.1 title:Playlist Title summary: contentSrc:https://gdata.youtube.com/feeds/api/playlists/PL5......92D127 etag:W/"D04N.....WhJVEU8." authors:1 categories:1 links:related,alternate,self id:tag:youtube.com,2008:user:MyYoutubeUser:playlist:PL5......92D127 countHint:7 unparsed:<media:group>}
I’ve learned that countHint is the number of videos on that playlist. Now, I want to get those videos.
I tried creating a function that would do so, but I don’t know what FeedID I’ll use:
GDataServiceGoogleYouTube *service = [self youTubeService];
NSString *feedID = kGDataYouTubeUserFeedIDPlaylists; //this was the feedID i used to get the list of playlist of a user
NSURL *feedURL = [GDataServiceGoogleYouTube youTubeURLForUserID:@"MyYoutubeUser"
userFeedID:feedID];
[service fetchFeedWithURL:feedURL
delegate:self
didFinishSelector:@selector(request:finishedLoading:error:)];
I was able to find solution to my question. And I hope it can also help you.
In my viewDidLoad, i called loadYoutube and loadYoutubePlaylist functions.
This is how the codes look like:
And here are the Youtube requests..