Beboist – A Rails Plugin for the Bebo Social API
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.
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</pre></p> <p>Generate your config/bebo.yml file using <pre><code>script/generate beboist_settings</pre></p> <p>Fill in your appropriate app settings in <code>config/bebo.yml</code>. Ensure that your app name is right.</p> <p>Generate the first migration for your users table using: <pre><code>script/generate beboist_user_migration</pre></p> <p>Migrate your database using <pre><code>rake db:migrate</pre></p> <p>In your application.rb, insert the following filters: <pre><code>before_filter :reject_unadded_users before_filter :find_bebo_user</pre></p> <p>Write your app, and keep an eye on your logs to catch any possible error messages.</p> <h3><span class="caps">API</span> Reference</h3> <p>The methods listed in the <a href="http://www.bebo.com/docs/api/Default.jsp">Bebo <span class="caps">API</span> Documentation</a> are mapped to Ruby classes in the following manner:</p> <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"]
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 for more details, and file tickets at Intridea’s Public Trac