Project

api_caller

0.0
No commit activity in last 3 years
No release in over 3 years
Call APIs safely for get, post and delete HTTP methods.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

api_caller

Call APIs safely.

Usage

GET

ApiCaller.get(uri_string: 'www.my_api.com/v1/interesting_stuffs.json', logger: Rails.logger)

POST required arguments

ApiCaller.post(uri_string: 'www.my_api.com/v1/interesting_stuffs', params: '{"key": "value"}')

or with optional arguments

ApiCaller.post(uri_string: 'www.my_api.com/v1/interesting_stuffs', params: '{"key": "value"}', content_type: {'Content-Type' => 'application/json'}, logger: Rails.logger)

DELETE

ApiCaller.delete(uri_string: 'www.my_api.com/v1/resource/to-delete', logger: Rails.logger)

Install

Edit your Gemfile and add:

gem 'api_caller'

License

The gem api_caller is released under the MIT License.

Author

Team Nautilus