Youtube api at Glance

20
Youtube API Ashok Basnet Nepsquare Technologies Pvt. Ltd. [email protected] 5/1/2013

description

Youtube API at Glance. presenting different type of Yotube APIs, getting data from youtube, examples and use case as (videosanjal.com). @GDG Kathmandu Startup Weekend Bootcamp Date: Jan 5th, 2013 http://mobilenepal.net/events/gdg-kathmandu-startup-weekend-bootcamp

Transcript of Youtube api at Glance

Page 1: Youtube api at Glance

Youtube API

Ashok BasnetNepsquare Technologies Pvt. Ltd.

[email protected]/1/2013

Page 2: Youtube api at Glance

Agenda

• Introduction• Youtube APIs• Getting Youtube data• Use Case ( videosanjal.com )

Page 3: Youtube api at Glance

What is API ?

• API ( Application Programming Interface )• Protocol intended to be used as

an interface by software components to communicate with each other

• A set of routines, protocols, and tools for building software applications.

• A good API makes it easier to develop a program by providing all the building blocks.

Page 4: Youtube api at Glance

Introduction

• The YouTube APIs and Tools let you bring the YouTube experience to your webpage, application, or device.

• It is possible to search for videos, retrieve standard feeds, and see related content. A program can also authenticate as a user to upload videos, modify user playlists, and more

Page 5: Youtube api at Glance

Youtube APIs

• Player API

• Data API

Page 6: Youtube api at Glance

Youtube APIs

• Version 1• Version 2 ( Recommended )• Version 3 ( Experimental )

API for androidYouTube Android Player API ( Experimental)https://developers.google.com/youtube/android/player/

Page 7: Youtube api at Glance

YouTube Data API

• Search for Videos– Keywords (tags)– Categories– Query Params (metadata)

• Search for Playlists– Keywords (tags)– Categories

• Search for Channels– Keywords (tags)– Categories

Page 8: Youtube api at Glance

YouTube Data API• Retrieve

– Videos– Comments– Captions– Related Videos– Video Responses– Categories– Keywords– Playlists– Subscriptions– Profiles– Contacts– Messages– Activity Feeds– Insight Data Feed– Favorites

Page 9: Youtube api at Glance

YouTube Data API• Create

– Videos– Comments– Captions– Related Videos– Video Responses– Complaint– Rating– Contact– Message– Favorite– Playlist– Subscription

• Update– Video Metadata– Captions– Profiles– Playlists– Contacts

• Delete– Video– Message– Favorite– Playlist– Subscription– Contact

Page 10: Youtube api at Glance

Getting Youtube Data

http://gdata.youtube.com/feeds/api/videos/VIDEO_ID?v=2&alt=json

Page 11: Youtube api at Glance
Page 12: Youtube api at Glance

For e.g.http://gdata.youtube.com/feeds/api/videos/9bZkp7q19f0?v=2&alt=json

alt => json or xml

Gives JSON Data as

Page 13: Youtube api at Glance

{ "version": "1.0", "encoding": "UTF-8", "entry": { "published": { "$t": "2012-07-15T07:46:32.000Z" }, "title": { "$t": "PSY - GANGNAM STYLE (강남스타일) M/V" }, "media$group": { "media$category": [ { "$t": "Music", "label": "Music", "scheme": "http://gdata.youtube.com/schemas/2007/categories.cat" } ],

Page 14: Youtube api at Glance

"media$description": { "$t": "PSY - Gangnam Style (강남스타일) \n App Store: http://goo.gl/l9TU6\nGoogle Play: http://goo.gl/UiEn1\n\n© YG Entertainment Inc. All rights reserved.", }, "yt$duration": { "seconds": "253" } }, "yt$statistics": { "favoriteCount": "0", "viewCount": "1121801092" }, "yt$rating": { "numDislikes": "523231", "numLikes": "6549910" } }}

Page 15: Youtube api at Glance

Use Case

Page 16: Youtube api at Glance
Page 17: Youtube api at Glance

Interface for adding videos

http://www.youtube.com/watch?v=9bZkp7q19f0

Page 18: Youtube api at Glance
Page 19: Youtube api at Glance

• For more infohttps://developers.google.com/youtube/

• Use case example site http://videosanjal.com

Page 20: Youtube api at Glance

THANK YOU