Youtube api at Glance

Post on 11-Nov-2014

1.325 views 0 download

Tags:

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

Youtube API

Ashok BasnetNepsquare Technologies Pvt. Ltd.

mail@ashokbasnet.com.np5/1/2013

Agenda

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

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.

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

Youtube APIs

• Player API

• Data API

Youtube APIs

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

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

YouTube Data API

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

• Search for Playlists– Keywords (tags)– Categories

• Search for Channels– Keywords (tags)– Categories

YouTube Data API• Retrieve

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

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

Getting Youtube Data

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

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

alt => json or xml

Gives JSON Data as

{ "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" } ],

"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" } }}

Use Case

Interface for adding videos

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

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

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

THANK YOU