Sha256: 0a4ced5d1a63777400e469b8b849297cb3eb20655b2bf04a0e97a53501b93574
Contents?: true
Size: 1008 Bytes
Versions: 6
Compression:
Stored size: 1008 Bytes
Contents
# ApiClient [](http://travis-ci.org/plribeiro3000/api_client) Client to make Api calls ## Installation Add this line to your application's Gemfile: gem 'api-client' And then execute: $ bundle Or install it yourself as: $ gem install api-client ## Usage Add this to your ApplicationController: rescue_from ApiClient::Exceptions::NotFound, :with => :not_found def not_found #Specify your own behavior here end You can define a more generic rescue that will work for any error: rescue_from ApiClient::Exceptions::Generic, :with => :generic_error Then, on your action, just put into it: @user = ApiClient.get("http://api.example.com/user/3") ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
api-client-0.5.0 | README.md |
api-client-0.4.1 | README.md |
api-client-0.4.0 | README.md |
api-client-0.3.0 | README.md |
api-client-0.2.0 | README.md |
api-client-0.1.0 | README.md |