Home > cobregratis

cobregratis

Cobregratis is a project mainly written in Ruby, based on the MIT license.

Ruby Wrapper around Cobre Grátis API

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

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)

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: http://github.com/tapajos

Author

Rafael Lima

Working at BielSystems

Blog: http://rafael.adm.br

Podcast: http://rafael.adm.br/voltandopracasa

Github: http://github.com/rafaelp

Twitter: http://twitter.com/rafaelp

Did you like?

Recommend me at Working With Rails

Previous:CCUIViewWrapper