# Cobregratis
## What is it?
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.
## Installing
gem install cobregratis
### Dependencies (see the Rakefile or run rake check_dependencies)
### Documentation
I'm on [rdoc.info][rdoc]
### Configure your key
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.
## Usage
@bank_billets = Cobregratis::BankBillet.find(:all)
@bank_billet_accounts = Cobregratis::BankBilletAccount.find(:all)
@services = Cobregratis::Service.find(:all)
## License
This code is free to be used under the terms of the [MIT license].
## Bugs, Issues, Kudos and Catcalls
Comments are welcome. Send your feedback through the [issue tracker on GitHub]
## Contributors
Special thanks to:
### **Tapajós**
Github: [github.com/tapajos](http://github.com/tapajos)
## Author
### **Rafael Lima**
Working at [BielSystems](bielsystems.com.br)
Blog: [rafael.adm.br](http://rafael.adm.br)
Podcast: [rafael.adm.br/voltandopracasa](http://rafael.adm.br/voltandopracasa)
Github: [github.com/rafaelp](http://github.com/rafaelp)
Twitter: [twitter.com/rafaelp](http://twitter.com/rafaelp)
### Did you like?
[Recommend me at Working With Rails](workingwithrails.com/recommendation/new/person/14248-rafael-lima)
[api]: app.cobregratis.com.br/api [ar]: api.rubyonrails.org/classes/ActiveResource/Base.html [c]: api.rubyonrails.org/classes/ActiveSupport/Cache [cg]: cobregratis.com.br/ [i]: github.com/rafaelp/cobregratis/issues [mit]:www.opensource.org/licenses/mit-license.php [rdoc]: rdoc.info/projects/rafaelp/cobregratis