Class: Phoebe::Resources::Product::Lists::Historical
- Inherits:
-
Object
- Object
- Phoebe::Resources::Product::Lists::Historical
- Defined in:
- lib/phoebe/resources/product/lists/historical.rb
Overview
The product end-points make it easy to get the information shown in various pages on the eBird web site: 1. The Top 100 contributors on a given date. 2. The checklists submitted on a given date. 3. The most recent checklists submitted. 4. A summary of the checklists submitted on a given date. 5. The details and all the observations of a checklist.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Historical
constructor
private
A new instance of Historical.
-
#retrieve(d, region_code:, y_:, m:, max_results: nil, sort_key: nil, request_options: {}) ⇒ Array<Phoebe::Models::Product::Lists::HistoricalRetrieveResponseItem>
Some parameter documentations has been truncated, see Models::Product::Lists::HistoricalRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ Historical
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.
Returns a new instance of Historical.
65 66 67 |
# File 'lib/phoebe/resources/product/lists/historical.rb', line 65 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(d, region_code:, y_:, m:, max_results: nil, sort_key: nil, request_options: {}) ⇒ Array<Phoebe::Models::Product::Lists::HistoricalRetrieveResponseItem>
Some parameter documentations has been truncated, see Models::Product::Lists::HistoricalRetrieveParams for more details.
Get information on the checklists submitted on a given date for a country or region.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/phoebe/resources/product/lists/historical.rb', line 38 def retrieve(d, params) parsed, = Phoebe::Product::Lists::HistoricalRetrieveParams.dump_request(params) query = Phoebe::Internal::Util.encode_query_params(parsed) region_code = parsed.delete(:region_code) do raise ArgumentError.new("missing required path argument #{_1}") end y_ = parsed.delete(:y_) do raise ArgumentError.new("missing required path argument #{_1}") end m = parsed.delete(:m) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["product/lists/%1$s/%2$s/%3$s/%4$s", region_code, y_, m, d], query: query.transform_keys(max_results: "maxResults", sort_key: "sortKey"), model: Phoebe::Internal::Type::ArrayOf[Phoebe::Models::Product::Lists::HistoricalRetrieveResponseItem], options: ) end |