lib/fitbit_api/client.rb in fitbit_api-0.17.1 vs lib/fitbit_api/client.rb in fitbit_api-1.0.0

- old
+ new

@@ -69,12 +69,13 @@ def revoke_token! body = { token: token.token } headers = default_request_headers.merge(auth_headers) response = token.post('oauth2/revoke', { headers: headers, body: body }).response + response_body = JSON.parse(response.body) unless response.body.empty? - process_keys!(MultiJson.load(response.body)) + process_keys!(response_body) end # Performs an authorized GET request to the configured API namespace. # # @param path [String] The request path @@ -171,10 +172,10 @@ deep_keys_to_camel_case!(request_options[:body]) refresh_token! if auto_refresh_token && token.expired? response = token.public_send(verb, request_path, request_options, &block).response - response_body = MultiJson.load(response.body) unless response.status == 204 + response_body = JSON.parse(response.body) unless response.status == 204 process_keys!(response_body) end def auth_headers