Class: Phoebe::Resources::Ref::Taxonomy::Ebird
- Inherits:
-
Object
- Object
- Phoebe::Resources::Ref::Taxonomy::Ebird
- Defined in:
- lib/phoebe/resources/ref/taxonomy/ebird.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Ebird
constructor
private
A new instance of Ebird.
-
#retrieve(cat: nil, fmt: nil, locale: nil, species: nil, version: nil, request_options: {}) ⇒ Array<Phoebe::Models::Ref::Taxonomy::EbirdRetrieveResponseItem>
Get the taxonomy used by eBird.
Constructor Details
#initialize(client:) ⇒ Ebird
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 Ebird.
45 46 47 |
# File 'lib/phoebe/resources/ref/taxonomy/ebird.rb', line 45 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(cat: nil, fmt: nil, locale: nil, species: nil, version: nil, request_options: {}) ⇒ Array<Phoebe::Models::Ref::Taxonomy::EbirdRetrieveResponseItem>
Get the taxonomy used by eBird. #### Notes Each entry in the taxonomy contains a species code for example, barswa for Barn Swallow. You can download the taxonomy for selected species using the species query parameter with a comma separating each code. Otherwise the full taxonomy is downloaded.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/phoebe/resources/ref/taxonomy/ebird.rb', line 30 def retrieve(params = {}) parsed, = Phoebe::Ref::Taxonomy::EbirdRetrieveParams.dump_request(params) query = Phoebe::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "ref/taxonomy/ebird", query: query, model: Phoebe::Internal::Type::ArrayOf[Phoebe::Models::Ref::Taxonomy::EbirdRetrieveResponseItem], options: ) end |