iphone - get elements using youtube API on objective C -


i have gone through documentation, used sample project , have retrieval of youtube feed working on app unable individual elements displays desire.

i able example first video using objectatindex:0 don't know how title, id, url, etc. here nslog of firs video in feed.

entry: gdataentryyoutubevideo 0x9eb8d50: {v:2.0 title:evolution of dance - judson laipply contentsrc:http://www.youtube.com/v/dmh0bheirng?f=standard&d=avezc5trxmdfhc6pnaqxlmio88hsqjpe1a8d1gxqngdm&app=youtube_gdata etag:w/"a0chq347ecp7ima9wx9uguo." authors:1 categories:4 links:alternate,video.responses,video.ratings,video.complaints,video.related,self id:tag:youtube.com,2008:video:dmh0bheirng rating:+706815/-62385 comment:gdatacomment 0x9ebeb50: {feedlink:gdatafeedlink 0x9ebf2c0: {href:http://gdata.youtube.com/feeds/api/videos/dmh0bheirng/comments counthint:500786 href:http://gdata.youtube.com/feeds/api/videos/dmh0bheirng/comments counthint:500786}} stats:gdatayoutubestatistics 0x9ebfeb0: {viewcount:164922648 favoritecount:1010039} mediagroup:gdatayoutubemediagroup 0x9ec0e10: {categories:(     "gdatamediacategory 0x9ec41f0: {label:comedy scheme:http://gdata.youtube.com/schemas/2007/categories.cat content:comedy}" ) contents:(     "gdatamediacontent 0x9ec2df0: {url:http://www.youtube.com/v/dmh0bheirng?f=standard&d=avezc5trxmdfhc6pnaqxlmio88hsqjpe1a8d1gxqngdm&app=youtube_gdata type:application/x-shockwave-flash medium:video isdefault:true expression:full duration:360}",     "gdatamediacontent 0x9ec3620: {url:rtsp://v5.cache7.c.youtube.com/ckcleny73wiapgnyrkj3bptbdbmydsanfeggughzdgfuzgfyzhihavezc5trxmdfhc6pnaqxlmio88hsqjpe1a8d1gxqngdmda==/0/0/0/video.3gp type:video/3gpp medium:video expression:full duration:360}",     "gdatamediacontent 0x9ec39b0: {url:rtsp://v3.cache8.c.youtube.com/ckcleny73wiapgnyrkj3bptbdbmyesarfeggughzdgfuzgfyzhihavezc5trxmdfhc6pnaqxlmio88hsqjpe1a8d1gxqngdmda==/0/0/0/video.3gp type:video/3gpp medium:video expression:full duration:360}" ) credits:(     "gdatamediacredit 0x9ec4730: {role:uploader scheme:urn:youtube content:judsonlaipply}" ) thumbnails:(     "gdatamediathumbnail 0x9ec4fb0: {url:http://i.ytimg.com/vi/dmh0bheirng/default.jpg height:90 width:120 time:00:03:00 unparsedattr:yt:name}",     "gdatamediathumbnail 0x9ec5820: {url:http://i.ytimg.com/vi/dmh0bheirng/hqdefault.jpg height:360 width:480 unparsedattr:yt:name}",     "gdatamediathumbnail 0x9ec5bc0: {url:http://i.ytimg.com/vi/dmh0bheirng/1.jpg height:90 width:120 time:00:01:30 unparsedattr:yt:name}",     "gdatamediathumbnail 0x9ec5ea0: {url:http://i.ytimg.com/vi/dmh0bheirng/2.jpg height:90 width:120 time:00:03:00 unparsedattr:yt:name}",     "gdatamediathumbnail 0x9ec6140: {url:http://i.ytimg.com/vi/dmh0bheirng/3.jpg height:90 width:120 time:00:04:30 unparsedattr:yt:name}" ) keywords:gdatamediakeywords 0x9ec66f0: {content:dancing, comedy keywords:dancing, comedy} description:gdatamediadescription 0x9ec4e10: {type:plain content:for more visit http://www.mightaswelldance.com} players:(     "gdatamediaplayer 0x9ec2e40: {url:http://www.youtube.com/watch?v=dmh0bheirng&feature=youtube_gdata_player}" ) title:gdatamediatitle 0x9ec6aa0: {type:plain content:evolution of dance - judson laipply} duration:360 videoid:dmh0bheirng uploaded:gdatadatetime 0x7359b80: {2006-04-06t21:30:53z}} accesscontrols:(     "gdatayoutubeaccesscontrol 0x9ec0500: {action:comment permission:allowed content:}",     "gdatayoutubeaccesscontrol 0x9ec0930: {action:commentvote permission:allowed content:}",     "gdatayoutubeaccesscontrol 0x9ec09f0: {action:videorespond permission:moderated content:}",     "gdatayoutubeaccesscontrol 0x9ebeba0: {action:rate permission:allowed content:}",     "gdatayoutubeaccesscontrol 0x9ebf9f0: {action:embed permission:allowed content:}",     "gdatayoutubeaccesscontrol 0x9ec0620: {action:list permission:allowed content:}",     "gdatayoutubeaccesscontrol 0x9ec0b50: {action:syndicate permission:allowed content:}" ) unparsed:<gd:rating>} 

resolved, compare calls xml above may use on other gdata feeds

gdataentrybase *entry = [[feed entries] objectatindex:indexpath.row];         nsstring *title = [[entry title] stringvalue];         nsarray *thumbnails = [[(gdataentryyoutubevideo *)entry mediagroup] mediathumbnails];          cell.textlabel.text = title;          nsdata *data = [nsdata datawithcontentsofurl:[nsurl urlwithstring:[[thumbnails objectatindex:0] urlstring]]];         cell.imageview.image = [uiimage imagewithdata:data]; 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -