Introduction to Google APIs                                                              August 25, 2012                  ...
http://www.ebaypartnernetworkblog.com/en/files/2011/05/api1.gif
Agenda•   What is an API?•   REST - Introduction•   Google APIs•   Demo
API“Specification intended to be used as an interfaceby software components to communicate witheach other”
Language Dependent APIs•   Python (pydoc)•   Ruby (ri)•   Perl (perldoc)•   Java (javadoc)•   Unix (man)
Language Independent APIs • RPCs • CORBA • Web Services
Evolution  • Web 2.0 & 3.0  • Web Services "A software system designed to support interoperable machine-to-machine interac...
Web APIs• HTTP, HTTP & HTTP  • XML  • JSON• Mash-ups  • Enterprise  • Consumer  • Data
Web Services• SOAP  • Heavy Weight  • Suitable for Enterprises• REST  • Light Weight  • Suitable for Web APIs
Why REST?•   Ease of Development & Deployment•   Serves the actual purpose of HTTP•   Cache Proxies•   Human readable resu...
REST - Introduction•   Architectural Style•   Uses only HTTP•   Stateless•   Clean URL (Slugs & SEO)
REST - Components• Origin Servers    • Gateways    • Proxies• Clients•   Client (Requested By)•   Server (Provided By)•   ...
REST - Methods•   GET•   PUT•   POST•   DELETEhttp://provider.com/resources/    http://provider.com/resources/entry05
REST – Methods (GET)http://provider.com/resources/http://provider.com/resources/entry05•List•Retrieve
REST – Methods (PUT & POST)   http://provider.com/resources/   http://provider.com/resources/entry05   •Replace   •Replace...
REST – Methods (DELETE) http://provider.com/resources/ http://provider.com/resources/entry05 •Delete the List •Delete the ...
PUT vs POST• Explicit URL Name in request (PUT)• Idempotent (PUT)  • No Duplicate• PUT - Same URL for (Create/Update)
PUT• /resources/<existing_resource>   (update)• /resources/<new_resource>        (Create)
POST• /resources (Create and URL will be returned)• /resources/<existing_resource>      (Update)• /resources/<new_resource...
OAuth 2.0 Flow            http://tutorials.jenkov.com/oauth2/overview.html
OAuth 2.0 Flow (Contd…)         http://www.ibm.com/developerworks/library/x-androidfacebookapi/index.html
Google APIs• Data APIs (Demo in few minutes)• Ajax APIs  • JS & HTML  • Rich dynamic web sites• Ads APIs  • Adsense  • Adw...
Google Data APIs• 46 Apps• Tools  • API Explorer  • API Console  • OAuth 2.0 Playground
Demo•   Discovery•   Books•   URL Shorter•   Tasks•   Google +• Others
Questions (?)
Thank You!             siva@sivaa.in             @sivaa_in
References•   http://en.wikipedia.org/wiki/Application_programming_interface•   http://en.wikipedia.org/wiki/Representatio...
Tweets http://1photos.com/wp-content/uploads/2011/02/wpid-web_delight_s37_15_part.jpg
Tweets
Tweets
Tweets
Tweets
Tweets
Tweets
Upcoming SlideShare
Loading in …5
×

Introduction to Google APIs

2,191 views

Published on

http://barcampbangalore.org/bcb/bcb12/google-apis-and-google-app-engine-introduction-demo

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,191
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction to Google APIs

  1. 1. Introduction to Google APIs August 25, 2012 Sivasubramaniam Arunachalamhttp://barcampbangalore.org/bcb/bcb12/google-apis-and-google-app-engine-introduction-demo
  2. 2. http://www.ebaypartnernetworkblog.com/en/files/2011/05/api1.gif
  3. 3. Agenda• What is an API?• REST - Introduction• Google APIs• Demo
  4. 4. API“Specification intended to be used as an interfaceby software components to communicate witheach other”
  5. 5. Language Dependent APIs• Python (pydoc)• Ruby (ri)• Perl (perldoc)• Java (javadoc)• Unix (man)
  6. 6. Language Independent APIs • RPCs • CORBA • Web Services
  7. 7. Evolution • Web 2.0 & 3.0 • Web Services "A software system designed to support interoperable machine-to-machine interaction over a network" (W3C)
  8. 8. Web APIs• HTTP, HTTP & HTTP • XML • JSON• Mash-ups • Enterprise • Consumer • Data
  9. 9. Web Services• SOAP • Heavy Weight • Suitable for Enterprises• REST • Light Weight • Suitable for Web APIs
  10. 10. Why REST?• Ease of Development & Deployment• Serves the actual purpose of HTTP• Cache Proxies• Human readable results• Flexile Formats• Better Performance• Better Browser Support• Social Media Authentication
  11. 11. REST - Introduction• Architectural Style• Uses only HTTP• Stateless• Clean URL (Slugs & SEO)
  12. 12. REST - Components• Origin Servers • Gateways • Proxies• Clients• Client (Requested By)• Server (Provided By)• Resource (What is being exchanged)• Representation
  13. 13. REST - Methods• GET• PUT• POST• DELETEhttp://provider.com/resources/ http://provider.com/resources/entry05
  14. 14. REST – Methods (GET)http://provider.com/resources/http://provider.com/resources/entry05•List•Retrieve
  15. 15. REST – Methods (PUT & POST) http://provider.com/resources/ http://provider.com/resources/entry05 •Replace •Replace/Create
  16. 16. REST – Methods (DELETE) http://provider.com/resources/ http://provider.com/resources/entry05 •Delete the List •Delete the Entry
  17. 17. PUT vs POST• Explicit URL Name in request (PUT)• Idempotent (PUT) • No Duplicate• PUT - Same URL for (Create/Update)
  18. 18. PUT• /resources/<existing_resource> (update)• /resources/<new_resource> (Create)
  19. 19. POST• /resources (Create and URL will be returned)• /resources/<existing_resource> (Update)• /resources/<new_resource> (Error)
  20. 20. OAuth 2.0 Flow http://tutorials.jenkov.com/oauth2/overview.html
  21. 21. OAuth 2.0 Flow (Contd…) http://www.ibm.com/developerworks/library/x-androidfacebookapi/index.html
  22. 22. Google APIs• Data APIs (Demo in few minutes)• Ajax APIs • JS & HTML • Rich dynamic web sites• Ads APIs • Adsense • Adwords • (SOAP Based)
  23. 23. Google Data APIs• 46 Apps• Tools • API Explorer • API Console • OAuth 2.0 Playground
  24. 24. Demo• Discovery• Books• URL Shorter• Tasks• Google +• Others
  25. 25. Questions (?)
  26. 26. Thank You! siva@sivaa.in @sivaa_in
  27. 27. References• http://en.wikipedia.org/wiki/Application_programming_interface• http://en.wikipedia.org/wiki/Representational_state_transfer• http://en.wikipedia.org/wiki/Google_Code• http://googlecode.blogspot.in/2009/08/well-earned-retirement-for-soap-search.html• http://stackoverflow.com/questions/6166746/why-use-soap-for-webservices• http://stackoverflow.com/questions/630453/put-vs-post-in-rest• http://stackoverflow.com/questions/3487991/why-does-oauth-v2-have-both-access-and-refresh-tokens
  28. 28. Tweets http://1photos.com/wp-content/uploads/2011/02/wpid-web_delight_s37_15_part.jpg
  29. 29. Tweets
  30. 30. Tweets
  31. 31. Tweets
  32. 32. Tweets
  33. 33. Tweets
  34. 34. Tweets

×