Lypp ActiveResource Plugin Add voice conferencing to your Rails application easily. == License Copyright (c) 2007-2008 Gaboogie Canada Inc. See included MIT-LICENSE file. == Installation ruby script/plugin install http://lypp.googlecode.com/svn/trunk/plugins/lypp/ This plugin will only work with Rails 1.2.5 or greater. If you are not running Rails 2.0 install ActiveResource via RubyGems: gem install activeresource --source http://gems.rubyonrails.org Before using the plugin you will need to request a developer account by emailing api@lypp.com. Finally create a file in you config directory called lypp.yml and place the following into it: username: < your developer account username > password: < your developer account password > user_id: < your developer account user id > An example config file might look like: username: example@lypp.com password: mysecret user_id: 7 During testing, you'll want to point this at dev1.lypp.com by appending the following to the YAML file: site: https://dev1.lypp.com == Usage The Lypp ActiveResource plugin allows you to integrate with the Lypp.com using an API familiar to anyone who's used Rails' ActiveRecord library. The first step when using the library is to authenticate with the service: # authenticate as a user user = Lypp::User.authenticate This uses the credentials you supplied in your config/lypp.yaml file. See the Installation instructions above for more details. After authenticating with the service, you'll receive a user object on which you can update your profile information, add contacts or even schedule a conference. Below is an example of some common operations you can perform: # update your user account user.attributes = { :phone_number => '+1 555-555-5555' } user.save # list all contacts contacts = user.contacts.find :all # create a new contact contact = user.contacts.create :name => 'John Doe', :phone_number => '+1 604 555-5555' # show a contact contact = user.contacts.find(contact_id) # update a contact contact.attributes = { :phone_number => '+1 555 555-5555' } contact.save # delete a contact contact.destroy # list all conferences conferences = user.conferences.find(:all) # add a new conference conference = user.conferences.create :scheduled_to_start_at => Time.now # show a conference conference = user.conferences.find(conference_id) # update a conference conference.attributes = { :scheduled_to_start_at => 2.hours.from_now } conference.save # delete a conference conference.destroy # list all conference attendees attendees = conference.attendees.find(:all) # add a new conference attendee attendee = conference.attendees.create :phone_number => '+1 604-555-5555' # show a conference attendee attendee = conference.attendees.find(attendee_id) # update a conference attendee attendee.attributes = { :phone_number => '+1 555-555-5555' } attendee.save # delete a conference attendee attendee.destroy