Class: Phoebe::Resources::Data::Observations::Geo::Recent::Notable
- Inherits:
-
Object
- Object
- Phoebe::Resources::Data::Observations::Geo::Recent::Notable
- Defined in:
- lib/phoebe/resources/data/observations/geo/recent/notable.rb
Overview
The data/obs end-points are used to fetch observations submitted to eBird in checklists. There are two categories of end-point: 1. Fetch observations for a specific country, region or location. 2. Fetch observations for nearby locations - up to a distance of 50km. Each end-point supports optional query parameters which allow you to filter the list of observations returned.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Notable
constructor
private
A new instance of Notable.
-
#list(lat:, lng:, back: nil, detail: nil, dist: nil, hotspot: nil, max_results: nil, spp_locale: nil, request_options: {}) ⇒ Array<Phoebe::Models::Data::Observation>
Get the list of notable observations (up to 30 days ago) of birds seen at locations within a radius of up to 50 kilometers, from a given set of coordinates.
Constructor Details
#initialize(client:) ⇒ Notable
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 Notable.
59 60 61 |
# File 'lib/phoebe/resources/data/observations/geo/recent/notable.rb', line 59 def initialize(client:) @client = client end |
Instance Method Details
#list(lat:, lng:, back: nil, detail: nil, dist: nil, hotspot: nil, max_results: nil, spp_locale: nil, request_options: {}) ⇒ Array<Phoebe::Models::Data::Observation>
Get the list of notable observations (up to 30 days ago) of birds seen at locations within a radius of up to 50 kilometers, from a given set of coordinates. Notable observations can be for locally or nationally rare species or are otherwise unusual, for example over-wintering birds in a species which is normally only a summer visitor.
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/phoebe/resources/data/observations/geo/recent/notable.rb', line 44 def list(params) parsed, = Phoebe::Data::Observations::Geo::Recent::NotableListParams.dump_request(params) query = Phoebe::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "data/obs/geo/recent/notable", query: query.transform_keys(max_results: "maxResults", spp_locale: "sppLocale"), model: Phoebe::Internal::Type::ArrayOf[Phoebe::Data::Observation], options: ) end |