Module: Asana::Resources::ResponseHelper Private
- Included in:
- Collection, Resource, Resource
- Defined in:
- lib/asana/resources/response_helper.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
A helper to make response body parsing easier.
Instance Method Summary collapse
- #parse(response) ⇒ Object private
Instance Method Details
#parse(response) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5 6 7 8 9 10 11 |
# File 'lib/asana/resources/response_helper.rb', line 5 def parse(response) data = response.body.fetch('data') do fail("Unexpected response body: #{response.body}") end extra = response.body.reject { |k, _| k == 'data' } [data, extra] end |