Class: Phoebe::Resources::Ref::Taxonomy::SpeciesGroups

Inherits:
Object
  • Object
show all
Defined in:
lib/phoebe/resources/ref/taxonomy/species_groups.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SpeciesGroups

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 SpeciesGroups.

Parameters:



41
42
43
# File 'lib/phoebe/resources/ref/taxonomy/species_groups.rb', line 41

def initialize(client:)
  @client = client
end

Instance Method Details

#list(species_grouping, group_name_locale: nil, request_options: {}) ⇒ Array<Phoebe::Models::Ref::Taxonomy::SpeciesGroupListResponseItem>

Some parameter documentations has been truncated, see Models::Ref::Taxonomy::SpeciesGroupListParams for more details.

Get the list of species groups, e.g. terns, finches, etc. #### Notes Merlin puts like birds together, with Falcons next to Hawks, whereas eBird follows taxonomic order.

Parameters:

Returns:

See Also:



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/phoebe/resources/ref/taxonomy/species_groups.rb', line 26

def list(species_grouping, params = {})
  parsed, options = Phoebe::Ref::Taxonomy::SpeciesGroupListParams.dump_request(params)
  query = Phoebe::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["ref/sppgroup/%1$s", species_grouping],
    query: query.transform_keys(group_name_locale: "groupNameLocale"),
    model: Phoebe::Internal::Type::ArrayOf[Phoebe::Models::Ref::Taxonomy::SpeciesGroupListResponseItem],
    options: options
  )
end