Class Sawyer::Response
In: lib/sawyer/response.rb
Parent: Object

Methods

inspect   new   process_data   process_rels   time   timing  

Attributes

agent  [R] 
data  [R] 
headers  [R] 
rels  [R] 
status  [R] 

Public Class methods

Builds a Response after a completed request.

agent - The Sawyer::Agent that is managing the API connection. res - A Faraday::Response.

Public Instance methods

Turns parsed contents from an API response into a Resource or collection of Resources.

data - Either an Array or Hash parsed from JSON.

Returns either a Resource or Array of Resources.

Finds link relations from ‘Link’ response header

Returns an array of Relations

[Validate]