You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.
I'm considering adding support for pagination.
Due to the way the response is parsed and returned as part of the make_request to all the resource methods, there is no way to access the Link or X-Total-Count headers returned by onfido.
I would like to do this work and was considering adding an Onfido::Response class which is returned by make_request and in turn by the individual resources.
The class would be responsible for parsing the response from RestClient and exposing the various headers in the initial stages to at least give visibility over the total count to aid pagination, with a view to adding more complete pagination support later.
Something really bare bones would at least give access to the headers
class Onfido::Response
def initialize(response, request_options)
@results = parse(response)
@headers = response.headers
end
attr_reader :results
attr_reader :headers
def total_count
@headers[:x_total_count]
end
end
Has there been any work done so far?
Thoughts?
The text was updated successfully, but these errors were encountered:
I'm considering adding support for pagination.
Due to the way the response is parsed and returned as part of the
make_request
to all the resource methods, there is no way to access theLink
orX-Total-Count
headers returned by onfido.I would like to do this work and was considering adding an
Onfido::Response
class which is returned bymake_request
and in turn by the individual resources.The class would be responsible for parsing the response from
RestClient
and exposing the various headers in the initial stages to at least give visibility over the total count to aid pagination, with a view to adding more complete pagination support later.Something really bare bones would at least give access to the headers
Has there been any work done so far?
Thoughts?
The text was updated successfully, but these errors were encountered: