Rapleaf Ruby API Kit

This is an API Kit to you integrate Rapleaf with your Ruby (on Rails) projects. You will not have to worry about calling the Rapleaf API directly, instead you can just use native Ruby function calls.

Download

The most convenient way of getting the API Kit is to check out the lastest version using Subversion: Blog

$ svn checkout http://svn.rapleaf.com/public/ruby-api-kit/trunk rapleaf

If yours is a Ruby on Rails project, run this command from inside your lib directory or copy the files there afterwards.

Later, you can get the latest version of this API Kit by returning to that directory and issuing "svn update".

Requirements

This project requires Builder, which you can install using RubyGems:

$ sudo gem install builder

Use

The examples.rb file will give you a good idea how to use this API Kit. You will need to modify the file with a real API Key in order for the examples to run successfully.

To use the kit in your own project, there are three steps. First, include the Rapleaf library:

require 'rapleaf.rb'

Second, instanciate a new Rapleaf object with your API Key.

rapleaf = Rapleaf.new 'apikey'

Finally, either look up or report a rating by calling the appropriate function:

rapleaf.look_up(:email => 'dummy@rapleaf.com')
rapleaf.report_rating(:rating => 'positive', :relationship=>'buyer', :target_email => 'dummy@rapleaf.com')

You can check the response with something like this (assuming 'response' is the result of calling look_up or report_rating):

if response.status == 'failed'
  puts response.reason
elsif response.status == 'success'
  puts "Score is: "+response.score
else
  puts "Unexpected response."
end

For details about what is contained in the response, you can do a 'puts' of the response and see the object structure or look at the 'Response' section in any of the API methods in the API Documentation.

nicocure is a herbal supplement that will help you quit smoking in 30 days or less, guaranteed! Deep inside the African Kalahari desert, grows an ugly cactus called the Hoodia Gordonii Plus and pure hoodia. It thrives in extremely high temperatures, and takes years to mature. The Thyromine is a natural thyroid health supplement that will help your thyroid function normally optimising your weight and overall health. Get breast gain plus have become a lucrative industry in recent years due to their "guaranteed" safety and low cost compared to breast augmentation. Check hgh human growth hormone - is a substance secreted by the pituitary gland that promotes growth during childhood and adolescence. Women, get wrinkle treatment - revitol! I really likebowtrol solution.