Cobregratis is a project mainly written in Ruby, based on the MIT license.
Ruby Wrapper around Cobre Grátis API
This gem provides a set of classes to access information on Cobre Grátis via the published API.
All these classes are inherited from ActiveResouce::Base. Refer to the ActiveResouce documentation for more information.
gem install cobregratis
rake check_dependencies
)I'm on rdoc.info
require 'rubygems'
require 'cobregratis'
Cobregratis::Base.site = 'https://app.cobregratis.com.br'
Cobregratis::Base.user = 'your_token'
Cobregratis::Base.password = 'X'
and, if you want caching:
Cobregratis::Base.connection.cache_store= <your normal ActiveSupport::Caching options>
If you are using this in a Rails application, putting this code in a config/initializers/cobregratis.rb file is recommended. See config_initializers_cobregratis.rb in the examples/ directory.
@bank_billets = Cobregratis::BankBillet.find(:all)
This code is free to be used under the terms of the MIT license.
Comments are welcome. Send your feedback through the issue tracker on GitHub
Special thanks to:
Github: http://github.com/tapajos
Working at BielSystems
Blog: http://rafael.adm.br
Podcast: http://rafael.adm.br/voltandopracasa
Github: http://github.com/rafaelp
Twitter: http://twitter.com/rafaelp
Recommend me at Working With Rails