The gem rest-client is ideal when using the REST ClicRDV API.
require 'rubygems' require 'rest_client' require 'json' baseUrl = 'https://user%40clicrdv.com:[email protected]/api/v1' response = RestClient.get baseUrl+'/groups/:group_id/fiches.json' result = JSON.parse(response) puts result.inspect
ActiveResource allows automatic mapping from RESTful resources and exposes them in the form of models within a Ruby application.
Example:
class Calendar < ActiveResource::Base self.site = "https://sandbox.clicrdv.com/api/v1" self.user = "[email protected]" self.password = "test" end
For more information, see the ActiveResource documentation: http://api.rubyonrails.org/classes/ActiveResource/Base.html