Class: DropboxApiV2::Response

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

Instance Method Summary collapse

Constructor Details

#initialize(curl_response) ⇒ Response

Returns a new instance of Response.



5
6
7
# File 'lib/dropbox_api_v2/response.rb', line 5

def initialize(curl_response)
  @curl_response = curl_response
end

Instance Method Details

#bodyObject



13
14
15
# File 'lib/dropbox_api_v2/response.rb', line 13

def body
  @curl_response.body
end

#cursorObject



17
18
19
# File 'lib/dropbox_api_v2/response.rb', line 17

def cursor
  body["cursor"]
end

#jsonObject



9
10
11
# File 'lib/dropbox_api_v2/response.rb', line 9

def json
  JSON.parse(body)
end