Upcoming OpenSocial Features
New OpenSocial APIs on orkut.com




Shishir Birmiwal
Software Engineer



                  ...
Recent Developments


• OpenSocial 0.8 launched on orkut
• REST/RPC on orkut
• Clients for RPC/REST [java, php, python, ru...
Albums API
access user's photos on orkut




                                Google Confidential and Proprietary   3
Albums API


• Standardized in OpenSocial 0.9 spec
• Allows an app to create, delete, get and update albums and photos
• A...
Albums API


opensocial.MediaItem extended
    represents a photo (or video) on orkut
    Title, description, thumbnailU...
Albums API: JS


opensocial.newFetchAlbumsRequest(idSpec, opt_params)
     fetches albums for a user
     opt_params to ...
Albums API: JS


req = opensocial.newDataRequest();
req.add(req.newFetchAlbumsRequest(idspec, params), 'albums');
req.send...
Albums API: REST and RPC


REST base: /social/rest/
• /albums/{userId}/{groupId}/{albumId}
• /mediaitems/{userId}/{groupId...
REST and RPC
reverse phone home




                     Google Confidential and Proprietary   9
REST and RPC


REST and RPC services now available on orkut
• backend servers can initiate actions on orkut
• backend serv...
Reverse Phone Home using OAuth




                                 Google Confidential and Proprietary
Demo time
• RPC / REST on the command line
• OpenSocial client libraries
• A gadget that shows your photos




           ...
Thank You!
make your app more engaging




                              Google Confidential and Proprietary   13
Upcoming SlideShare
Loading in...5
×

Upcoming Features on Orkut API by Shishir Birmiwal

1,366

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,366
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Upcoming Features on Orkut API by Shishir Birmiwal

  1. 1. Upcoming OpenSocial Features New OpenSocial APIs on orkut.com Shishir Birmiwal Software Engineer Google Confidential and Proprietary 1
  2. 2. Recent Developments • OpenSocial 0.8 launched on orkut • REST/RPC on orkut • Clients for RPC/REST [java, php, python, ruby]  http://code.google.com/p/opensocial-java/client/ • Spec for 0.9 frozen  http://sites.google.com/site/opensocialdraft/Home Google Confidential and Proprietary
  3. 3. Albums API access user's photos on orkut Google Confidential and Proprietary 3
  4. 4. Albums API • Standardized in OpenSocial 0.9 spec • Allows an app to create, delete, get and update albums and photos • APIs for access using REST, RPC and JS Google Confidential and Proprietary
  5. 5. Albums API opensocial.MediaItem extended  represents a photo (or video) on orkut  Title, description, thumbnailUrl, albumId.. added opensocial.Album introduced  represents a collection of MediaItems  has title, description, thumbnailUrl, ownerId, etc. Google Confidential and Proprietary
  6. 6. Albums API: JS opensocial.newFetchAlbumsRequest(idSpec, opt_params)  fetches albums for a user  opt_params to specify a particular album or for paging opensocial.newFetchMediaItemsRequest(idSpec, albumId, opt_params)  fetches mediaitems in an album for a user  opt_params to specify particular mediaitems or for paging opensocial.newCreateAlbumRequest() - create an album opensocial.newUpdateAlbumRequest() - update an album opensocial.newDeleteAlbumRequest() - delete an album similarly for MediaItems Google Confidential and Proprietary
  7. 7. Albums API: JS req = opensocial.newDataRequest(); req.add(req.newFetchAlbumsRequest(idspec, params), 'albums'); req.send(processAlbums); function processAlbums(data) { var albums = data.get('albums').getData(); albums.each(function(album) { output(album.getField(opensocial.Album.Field.ID)); output(album.getField(opensocial.Album.Field.CAPTION)); output(album.getField(opensocial.Album.Field.THUMBNAIL_URL)); }); } Google Confidential and Proprietary
  8. 8. Albums API: REST and RPC REST base: /social/rest/ • /albums/{userId}/{groupId}/{albumId} • /mediaitems/{userId}/{groupId}/{albumId}/{mediaItemId} RPC endpoint: /social/rpc • methods: albums.create, albums.delete, albums.get and albums.update; similarly for media items: mediaitems.create, mediaitems.delete, mediaitems.get and mediaitems.update Google Confidential and Proprietary
  9. 9. REST and RPC reverse phone home Google Confidential and Proprietary 9
  10. 10. REST and RPC REST and RPC services now available on orkut • backend servers can initiate actions on orkut • backend servers authenticate using OAuth • visit http://google.com/directory/gadgets/verify to get consumer key and secret for OAuth parameter signing • open-source client libraries available on Google code  php, python, java and ruby clients Google Confidential and Proprietary
  11. 11. Reverse Phone Home using OAuth Google Confidential and Proprietary
  12. 12. Demo time • RPC / REST on the command line • OpenSocial client libraries • A gadget that shows your photos Google Confidential and Proprietary 12
  13. 13. Thank You! make your app more engaging Google Confidential and Proprietary 13

×