class OnConnect

Public Class Methods

new(api_key) click to toggle source
# File lib/onconnect.rb, line 9
def initialize(api_key)
  @api_key = api_key
  @url = 'http://data.tmsapi.com/v1.1/'
end

Public Instance Methods

get(search, dyn_params) click to toggle source
# File lib/onconnect.rb, line 14
def get(search, dyn_params)
  uri = URI(@url + search)
  uri.query = URI.encode_www_form(dyn_params)

  response = Net::HTTP.get_response(uri)
  response.body
end