class Tracky::BaseAPI
Constants
- URI
Public Class Methods
get(path)
click to toggle source
# File lib/tracky/base_api.rb, line 9 def self.get(path) response = HTTP.get(path) json = JSON.parse(response.to_s) if json.has_key? "error" raise "#{json["error"]["type"]}: #{json["error"]["message"]}" end end
url(path)
click to toggle source
# File lib/tracky/base_api.rb, line 5 def self.url(path) [URI, "#{path}.json"].join('/') end