Intridea Development Blog
Beboist - A Rails Plugin for the Bebo Social API
UPDATE
Click here for the latest on Beboist
The Beboist plugin provides a Rails interface to the Bebo Social Networking API.
The plugin was designed from the ground-up to be flexible enough to accommodate any changes to the API, while at the same time providing a clean interface that will be familiar to most Rails developers.
Setup
Ensure that the json gem is installed on your system and the Beboist plugin is installed in your vendor/plugins folder:
gem install json
script/plugin install http://svn.intridea.com/svn/public/beboist
Generate your config/bebo.yml file using
<code>script/generate beboist_settings</pre> Fill in your appropriate app settings in <code>config/bebo.yml</code>. Ensure that your app name is right. Generate the first migration for your users table using: <pre><code>script/generate beboist_user_migration</pre> Migrate your database using <pre><code>rake db:migrate</pre> In your application.rb, insert the following filters: <pre><code>before_filter :reject_unadded_users before_filter :find_bebo_user</pre> Write your app, and keep an eye on your logs to catch any possible error messages. h3. API Reference The methods listed in the "Bebo API Documentation":http://www.bebo.com/docs/api/Default.jsp are mapped to Ruby classes in the following manner: <pre name="code" class="ruby">users.get_info(uids => "1,2,3", fields => "first_name, last_name") # BECOMES BeboUsers.get_info :uids => [1,2,3], :fields => ["first_name", "last_name"]</pre> h3. Notes The Beboist plugin uses Bebo's JSON API, and the 'json' gem to directly convert JSON objects to Ruby. It works with Rails 2.0+, but has not been tested on Rails 1.2. Check the "README":http://svn.intridea.com/svn/public/beboist/README for more details, and file tickets at "Intridea's Public Trac":http://trac.intridea.com/trac/public
The Intridea Blogs
Blog Archive
- January 2010 (1)
- December 2009 (1)
- November 2009 (2)
- October 2009 (1)
- September 2009 (2)
- August 2009 (2)
- July 2009 (2)
- June 2009 (2)
- May 2009 (1)
- April 2009 (3)
- March 2009 (8)
- February 2009 (9)
- January 2009 (2)
- December 2008 (1)
- November 2008 (1)
- October 2008 (2)
- July 2008 (5)
- June 2008 (8)
- April 2008 (2)
- March 2008 (1)
- February 2008 (4)
- January 2008 (4)
- December 2007 (3)
- November 2007 (3)
- October 2007 (4)
- September 2007 (2)
- August 2007 (3)
Pradeep Elankumaran