Introduction to Google Data

(My Original Blog Post: -*http://api-madness.com/post/introduction-to-google-data/)

Gdata Video Introduction

Attention! API Garbage (might be unreadable):

atom data Google

Him and over interested in working with Google products using the APIs more specifically the APIs are useful to the protocol so that assembled in front of amassing wealth I cannot say that I have to go to some background information I m assuming here that you re familiar already with the technologies of HTC PM XML now for longtime websites of looking at alternative ways of distributing their content in a more computer from the way computers are not very bright so they will help understanding her information as we see it so that a simple example such as on-site superoxide has a number of news articles that are displayed in the list you have a summary of title who wrote them when they wrote it since basic information might represent this in a different way while the first attempt to solve this problem with RSS but they talk about today is the Adam syndication format atom is an XML-based approach to describing data on these websites and making it easy for computers to parse this information out so that the government you have a food element that contains multiple entries in each entry will contain all the metadata associated with a post on this blog site is great because now we have this compact way of describing all the content on a blog but what if I want to create a program that adds this blog not just the ones that know I can create entire mechanism to do this and have it be drastically different than the scenic as we ve already described her to try to visit welcome to use this format that describes the course all my cynics will hire you transmit this data to the server sends these postmodern truth using a GDP that can just use HEPA to edit and delete content as well as create new account as well so we can lose what I have and just make use of other rooms in HTP like a quick post and delete and we have our fair cycling way of managing blog content by just editing the theme is well that my site doesn t have blog entries once I want one if it s something like account or a spreadsheet or represent that data will try to do it in a way where you try to use this method again with Louisiana method that s exactly what Google data tries to do so militiamen example of one atom feed looks like I m some use XML like we said before and it contains entries each food has its own metadata and as well as each entry and you also notice that each entry has a unique identifier that s makes it distinct from all other entries on the site as well as some information is edited so once we take the seminaked into a minimal form with the atom publishing protocol and the other person protocol abstracts each of these entries and turns them into resources and knowledge resources community at traditional text resource or it can be a resource such as an image file or video it also uses these HTP requests that we ve already discussed to manipulate this data that uses DHCP response codes in order to talk this operation was successful writers were ossification now this is what is usually referred to as a restful protocol that uses the restful semantics or to modify these resources and each request is therefore independently of each other request and doesn t require any additional context of a session to know what to do so here we have an example post of what it is to create entry on the blog using atom pub and the system authorization and some other bits of metadata but was I posting is to add an entry just like you get in the atom feed is posted this this bit of data we have created this entry may give back the entry as we create it with some additional members such as an edit link is one modify it may also give back some kind of registering the schedule C. there is a tag she identifies a specific revision of this post mature response code is used to indicate that this content was successfully created on the server so now we might lose Google data are values as this abstract way of looking at atom feeds while knowledge if you want to represent something that wasn t a blog post and Adam probably some aspects not described his entities and that s where kinds come in June at times are used to represent abstract ideas that come across many APIs such as those location waters of time what is a contact that you don t want to have to reinvent each time you specify new APR with a different product so it was madness this XML that fits nicely in the data model since Adam allows you to extend its XML smudging while there is something sacred language of some authentication that we have added atom pub is part of Google data who basically allows us to store the cracks between what is one atom pub tries to accomplish and what we would like to accomplish using them as is APIs as I mentioned this a vindication of a behalf in order to work with Google services and tie into Google accounts we also have some way of restricting what kinds of content that you are trying to access using this this feed and then we also need some way to handle conflicts just in case to people trying at the same information the same time never have economies to express what this information is that we re working with NASA niceties as well that are not part of the atom specification such as batch processing needs support through a query on atom feed her will see in this case will notice that world basically is just a URL that contains enough information to tell us what kinds of entries Richard Speck s first year we have a URL that describes all of the documents in someone s docs and spreadsheets accounts and that we only care about is what strategies they have the second no-hitter is very similar to the first uses a category query to restrict only the spreadsheet document types and results of Muslim Corsican Atreides each individual entry in the information associate with them by passing a URL that contained some sort of documentary that will data is that it has consistent features across all APIs such as alternative output formats like Tucson RSS in case software working with native and consumes those formats also has a loose authentication model that will talk about that allows you to authenticate users to the Google account and securely access their data we ve created a number of client libraries for many languages that parse all this XML and atom data into an easy-to-use object-oriented model that you can manipulate directly in the literature comfortable with and it also provides a portal customizations like I said the things out hasn t tackled yet such as batch processing case your new number of operations at once so as you can see there are number of Google data APIs out there for a number of popular products such as Google calendar Google spreadsheets but also need to sleep now access data in any one of those products using this the same semantics that I m describing to you so for example must go through a something that I might as a programmer interact with the Google calendar API suffers from some way of authenticating this this request that I might be making such options here one is also one of Skylark client login is meant for desktop-based applications that can no of the user input their credentials directly in the maker of SQL servers was also is intended to allow third-party websites to redirect users to Google slot login page and then redirect back to the website in question so no blues are going to give your programs and have token that you can pass along the requests and make it an authenticated request so first let s would have to do to retrieve all events zones counter was very simple overdoing is going to be passing on their credentials and making a supplicant request so you actually determine opinions this request was successful and get back atom feed that says some information about the calendar such as this is Mr. test users calendar and others was based out of the Pacific time zone as soon as she have any counter events currently on his calendar seems very lonely person solution by the lunch while I m demonstrating how we can prove intent on his calendar by using the semantics of HTP so doing is creating an atom entry and sending it to the feet says he consumed me set the start time in 1130s to the logic will visit some information about a description using this category this kind of event the people know this is an adventure presenting calendar source of good great mature uncreated response genes was at his calendar successfully return back that same entry except now notice there is an edit link inside of the atom entry which allows us to go back and make modifications and there is a long and very bad which distinct identifies a specific event announces the version string blue which represents this revision of this event which is of course the first ones to discredit but you notice in us that we forgot to set where this location was occurring in Mr. test users now is very bright for the tour where it is a bit at this thing so now remains but to edit the advantages created in us reporting to the edit link that we just saw in the previous slot so you were making this request to edit link with a specific revision string that we just used in the passing authentication information and overdoing is putting the same atom entry except now at the bottom here and blew the element of specifying that Google is based on Mountain View California so that request has gone through yet another playback and now you can see a loose form of the event as on his calendar and has all the details he needs to find us anytime you want for this great but you know you really like Mr. test users you can t talk too much and there s a reason no one ever invites him to things so what is better that I m facing is that hopefully and so she took driven on Wednesday was issued to request with the edit URI we just got back from the active form of notice I said that your only got back from his original at a URL that we edited the event was then that would already not working or since that string in the version I m using different than it is now but since it was the correct one we did back in 20 okay now seems to produce one NCAA 49 conflict there is a 200 okay which meant that there is now a new version of events on the server than the one that we are trying to delete to push a 15 minute rapidfire walk-through of how to use Google data using specific things you ve got the basic idea of what that is how it works on the basic level of XML and using cheapies but perhaps like most people you don t want to struggle Sexson on yourself and your interest in the high-level client libraries with support in your language of choice throughout you should do is go to code.google.com/APIs/data to find out more and download the client library that choice

Advertisements

~ by bitahatini on January 10, 2009.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: