Method: Frontapp::Client#get

Defined in:
lib/frontapp/client.rb

#get(path) ⇒ Object



81
82
83
84
85
86
87
# File 'lib/frontapp/client.rb', line 81

def get(path)
  res = @headers.get("#{base_url}#{path}")
  if !res.status.success?
    raise Error.from_response(res)
  end
  JSON.parse(res.to_s)
end