DOC PREVIEW
ODU CS 791 - Study Notes

This preview shows page 1-2-3-4-26-27-28-53-54-55-56 out of 56 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Google DataFeedGoogle Data APIAuthenticationSlide 6Slide 7ClientLogin AuthenticationSlide 9Slide 10AuthSub AuthenticationSlide 12Slide 13Slide 14Protocol BasicsProtocol Basics…Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Common Elements: "Kinds"Slide 25Slide 26Slide 27Batch ProcessingOverviewGoogle Base Data APISlide 31Overview…Feeds UsedFeeds Used…Slide 35Google Base data APISlide 37Slide 38QueryingQuerying…YouTube Data APIVideo Feeds and EntriesUploading VideosDirect UploadingBrowser-based UploadingSearching For VideosStandard FeedsSlide 48Slide 49Slide 50SearchingUpdating a Video EntryDeleting a Video EntrySharing VideosSubscriptionsReferences1Presented By:Nageswari Vallabhaneni Sukumar Manduva2Google DataGData provides a simple standard Protocol for reading and writing data on web.Atom or RSSAtom Publishing ProtocolHTTP GET requestHTTP PUT request.Results as an Atom or RSS feed3FeedProvides frequently updated content.Syndication of a web feed allows users to subscribe to it. A web feed is also called syndicated feed.4Google Data APIAuthentication Protocol BasicsCommon Elements: "Kinds"Batch ProcessingGoogle Base APIYou Tube API5AuthenticationClient app will act on behalf of a particular user of a Google service. Access to account specific informationRequest Contains Headers for (X-GData-Key, Authorization). X-GData-Key  Developer Key Authorization  ClientLogin (or) AuthSub6AuthenticationClient app will act on behalf of a particular user of a Google service.GData uses two different authentication systems …1. "ClientLogin" system 2. "AuthSub" system7ClientLogin Method is used for stand alone applications.Users username, password and the application are encoded in the Authentication request.After a successful authentication request, use the Auth value to create an Authorization header for each GData request: Authorization:GoogleLoginauth=yourAuthValueClientLogin Authentication8ClientLogin Authentication9ClientLogin AuthenticationIf a ClientLogin-authenticated GData request fails, you may receive any of a variety of HTTP error status codes in response 403 Account disabled403 Account deleted401 Token disabled401 Token expired10When an API Request is made the Developer Key Header Specifies on behalf of Which registered developer the request is coming. AuthSub Authentication11AuthSub Authentication "AuthSub" system Used if your client is a multi-user web application client To acquire an AuthSub token your web app must redirect the user to the AuthSubRequest URL at Google which has “NEXT” query parameter.Gets an authentication token without ever handling the user's account login information12AuthSub AuthenticationAfter you've acquired an authentication token, you use that token to create an Authorization header for each request: Authorization: AuthSub token="yourAuthToken"13AuthSub AuthenticationIf an AuthSub-authenticated GData request fails, you may receive any of a variety of HTTP error status codes in response 401 Token invalid401 Token disabled401 Token expired401 Token revoked14AuthSub Authentication Header for 401 Token Revoked Error401 Token revoked WWW-Authenticate: AuthSub realm="http://www.google.com/accounts/AuthSubRequest" Content-Type: text/html; charset=UTF-8 Expires: Wed, 26 Mar 2008 17:11:31 GMT Cache-Control: private, max-age=0 Content-Length: 149 Date: Wed, 26 Mar 2008 17:11:31 GMT Server: GFE/1.315Protocol Basics Requesting a feed or other resource:Assume there's a feed called /Newsfeed, with no entries in it....To see it, send the following request to the server:GET /Newsfeed16Protocol Basics…The server responds:200 OK<?xml version="1.0"?><feed xmlns="http://www.w3.org/2005/Atom"> <title>e-News</title> <updated>2008-03-26T16:25:00-08:00</updated> <id>http://www.cnn.com/Newsfeed</id> <author> <name>Jo March</name> </author> <link href="/Newsfeed" rel="self"/></feed>17Protocol Basics… Inserting a new entry: POST /Newsfeed<?xml version="1.0"?><entry xmlns="http://www.w3.org/2005/Atom"> <author> <name>Paul Harvey</name> <email>[email protected]</email> </author> <title type="text">HeadLines</title> <content type="text">VT Beat UVa</content></entry>18Protocol Basics…The server responds:201 CREATED<?xml version="1.0"?><entry xmlns="http://www.w3.org/2005/Atom"> <id>1</id> <link rel="edit" href="http://cnn.com/Newsfeed/1/1/"/> <updated>2008-03-26T16:26:03-08:00</updated> <author> <name>Paul Harvey</name> <email>[email protected]</email> </author> <title type="text">HeadLines</title> <content type="text">VT Beat UVa</content></entry>19Protocol Basics…Updating an entry :To update an existing entry, use PUT, with the entry's edit URI Changing entry's text from (" VT Beat UVa ") to (“VT embarrassed UVa."):PUT /myFeed/1/1/<?xml version="1.0"?><entry xmlns="http://www.w3.org/2005/Atom"> <id>1</id> <link rel="edit" href="http://cnn.com/Newsfeed/1/1/"/> <updated>2008-03-26T16:28:05-08:00</updated> <author> <name>Paul Harvey</name> <email>[email protected]</email> </author> <title type="text"> Head Lines </title> <content type="text"> VT embarrassed UVa.</content></entry>20Protocol Basics…The server responds:200 OK<?xml version="1.0"?><entry xmlns="http://www.w3.org/2005/Atom"> <id>1</id> <link rel="edit" href="http://cnn.com/Newsfeed/1/2/"/> <updated>2008-03-26T16:28:05-08:00</updated> <author> <name>Paul Harvey</name> <email>[email protected]</email> </author> <title type="text"> Head Lines </title> <content type="text"> VT embarrassed UVa.</content></entry>Edit URI has changed..It now ends with "/2/" instead of "/1/". The final number in the edit URI is a version number.21Protocol Basics…Searching for a string:To do a full-text search for a particular string , send a GET request with the q parameter.GET /Newsfeed?q=VT22Protocol Basics…The server responds with all the entries that match the search string “VT”200 OK<?xml version="1.0"?><feed xmlns="http://www.w3.org/2005/Atom"> <title>e-News</title> <updated>2008-03-26T16:26:03-08:00</updated> <id>http://www.cnn.com/Newsfeed</id> <author> <name>Jo March</name> </author> <link href="/Newsfeed" rel="self"/> <entry> <id>1</id> <link rel="edit" href="http:// www.cnn.com/Newsfeed


View Full Document

ODU CS 791 - Study Notes

Documents in this Course
Load more
Download Study Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?