This provides a gem client library to use the Liverail API.
Created by Lucas Nogueira.
edit your Gemfile
gem 'liverails_api', '~> 0.0.4'
install gem
bundle install
update gem
bundle update live-rails-api
LIVE_RAIL_USERNAME -> liverail account username
LIVE_RAIL_PASSWORD -> liverail password username
LIVE_RAIL_ENVIRONMENT-> environment that you need to use. Values: "production" to access ("http://api4.liverail.com") or "development" to access ("http://api4.int.liverail.com")
manual authentication
require('liverails_api');
response = LiverailsApi.instance.login "username","password"
response = LiverailsApi.instance.partner_list
ENV authentication (automatic login)
export [email protected]
export LIVE_RAIL_PASSWORD=myaccountpassword
require('liverails_api');
LiverailsApi.instance.login
response = LiverailsApi.instance.partner_list
All endpoints exposed by http://test.api.liverail.com/
Replace the route / with _ to get your method name. like: "/partner/add" => LiverailsApi.instance.partner_add Args need to be a HASH like LiverailsApi.instance.partner_list { name:"my_partner_name" }