Class: ComicVine::Api::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/comic_vine/api/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status:, headers:, body:) ⇒ Response

Returns a new instance of Response.



8
9
10
11
12
13
14
# File 'lib/comic_vine/api/response.rb', line 8

def initialize(status:, headers:, body:)
  @status = status
  @headers = headers
  @body = body

  parse_body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def body
  @body
end

#errorObject (readonly)

Returns the value of attribute error.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def error
  @error
end

#headersObject (readonly)

Returns the value of attribute headers.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def headers
  @headers
end

#limitObject (readonly)

Returns the value of attribute limit.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def limit
  @limit
end

#number_of_page_resultsObject (readonly)

Returns the value of attribute number_of_page_results.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def number_of_page_results
  @number_of_page_results
end

#number_of_total_resultsObject (readonly)

Returns the value of attribute number_of_total_results.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def number_of_total_results
  @number_of_total_results
end

#offsetObject (readonly)

Returns the value of attribute offset.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def offset
  @offset
end

#raw_responseObject (readonly)

Returns the value of attribute raw_response.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def raw_response
  @raw_response
end

#resultsObject (readonly)

Returns the value of attribute results.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def results
  @results
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def status
  @status
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def status_code
  @status_code
end

#versionObject (readonly)

Returns the value of attribute version.



4
5
6
# File 'lib/comic_vine/api/response.rb', line 4

def version
  @version
end