Class: Phoebe::Resources::Ref::Taxonomy::Locales
- Inherits:
-
Object
- Object
- Phoebe::Resources::Ref::Taxonomy::Locales
- Defined in:
- lib/phoebe/resources/ref/taxonomy/locales.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Locales
constructor
private
A new instance of Locales.
-
#list(accept_language: nil, request_options: {}) ⇒ Array<Phoebe::Models::Ref::Taxonomy::LocaleListResponseItem>
Returns the list of supported locale codes and names for species common names, with the last time they were updated.
Constructor Details
#initialize(client:) ⇒ Locales
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 Locales.
37 38 39 |
# File 'lib/phoebe/resources/ref/taxonomy/locales.rb', line 37 def initialize(client:) @client = client end |
Instance Method Details
#list(accept_language: nil, request_options: {}) ⇒ Array<Phoebe::Models::Ref::Taxonomy::LocaleListResponseItem>
Returns the list of supported locale codes and names for species common names, with the last time they were updated. Use the accept-language header to get translated language names when available.
NOTE: The locale codes and names are stable but the other fields in this result are not yet finalized and should be used with caution.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/phoebe/resources/ref/taxonomy/locales.rb', line 23 def list(params = {}) parsed, = Phoebe::Ref::Taxonomy::LocaleListParams.dump_request(params) @client.request( method: :get, path: "ref/taxa-locales/ebird", headers: parsed.transform_keys(accept_language: "accept-language"), model: Phoebe::Internal::Type::ArrayOf[Phoebe::Models::Ref::Taxonomy::LocaleListResponseItem], options: ) end |