IceHook Systems

View Original

New Ruby RouteNGN Client Library Released

We’ve made our internal Ruby RouteNGN client public.

You can get it here

Usage:

Get your API key:

Install Ruby:

\curl -sSL https://get.rvm.io | bash
rvm install ruby

Install the 'routengn_client' Gem:

gem install routengn-client

Create a source file routengn_api_test.rb:

#!/usr/bin/env ruby

require 'routengn_client'

MultiJson.use :yajl # set your prefered JSON library
Faraday.default_adapter = :excon # set your preferred HTTP adapter

RouteNGNClient.connect :uri => 'http://web.clusterX.routengn.com', :api_key => 'yourkeyfromabove'

carriers = Carrier.all #retrieve all your carriers
puts carriers.inspect #print them out

Run the Ruby script:

See this content in the original post