Googlowa biblioteka Ruby do OpenSocial’a
Google wypucił właśnie
opensocial-ruby-client. Bibliotek ta pozwala na kożystanie z usług
OpenSocial w języku
Ruby. Biblioteka jest na otwartym kodzie żródłowym jednak żeby coś dodać od siebie trzeba wypełnić pare dokumentów.

Przykład dla MySpace
require 'opensocial' # Loads MySpace credentials for the example gadget. consumer_key = 'http://opensocial-resources.googlecode.com/svn/samples/rest_rpc/sample.xml' consumer_secret = '6a838d107daf4d09b7d446422f5e7a81' requestor = '425505213' # Initializes a new connection MySpace. c = OpenSocial::Connection.new(:container => OpenSocial::Connection::MYSPACE, :consumer_key => consumer_key, :consumer_secret => consumer_secret, :xoauth_requestor_id => requestor) # Creates a request for profile data for 'requestor'. r = OpenSocial::FetchPersonRequest.new(c, requestor) # Loads the data, and displays it on the console, using REST with HMAC-SHA1 signing. puts r.send.inspect
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=0767ceb0-3f4d-4f74-a037-014bee2ae301)























