Project

ringioAPI

0.01
No commit activity in last 3 years
No release in over 3 years
IMPORTANT: this project has just started, so the functionality is not complete yet. Provides a wrapper for the Ringio API in Ruby, using ActiveResource. You can configure it for example by adding a file with this in config/initializers/ : require 'ringioAPI' RingioAPI::Base.user = 'RINGIO API TOKEN'
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Ringio API

About

IMPORTANT: this project has just started, so the functionality is not complete yet.

Provides a wrapper for the API of Ringio in Ruby, using classes that inherit from ActiveResource::Base to access it.

Available classes at the moment are:

Account, Contact, Feed, Note, Ring, User

Installing

gem install ringioAPI

Dependencies

RubyGems >= 1.3.6 , ActiveResource >= 3.0.3

Configuration

General Configuration

You can configure the API token like this:

require 'ringioAPI'
RingioAPI::Base.user = 'RINGIO API TOKEN'

Currently there is a bug in Rails 3.0.X that makes JSON objects be parsed wrong. Check the possible solutions and patches in the corresponding thread in the Rails forums for developers

Rails Configuration

In Rails, you could add a file named ringio.rb in config/initializers/ with the previous General Configuration content.

Add this line in the file named Gemfile:

gem 'ringioAPI'

In the root of the project, run:

bundle install
bundle check

Usage

For example, to get the contact with id = 14 :

contact14 = RingioAPI::Contact.find(14)

To change the title of that contact:

contact14.title = "New title"
contact14.save

To destroy that contact:

contact14.destroy

To create a Contact for the user with person_id = 78 :

newContact = RingioAPI::Contact.new(:name => 'New contact name', :userId => 78)
newContact.save

If you have problems, check Ringio API specifications for details.

License

Under the Mozilla Public License Version 1.1

Author

Álvaro Martín Fraguas - amartin@ringio.com