Class: Phoebe::Resources::Product::SpeciesList

Inherits:
Object
  • Object
show all
Defined in:
lib/phoebe/resources/product/species_list.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

Constructor Details

#initialize(client:) ⇒ SpeciesList

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

Parameters:



41
42
43
# File 'lib/phoebe/resources/product/species_list.rb', line 41

def initialize(client:)
  @client = client
end

Instance Method Details

#list(region_code, request_options: {}) ⇒ Array<String>

Some parameter documentations has been truncated, see Models::Product::SpeciesListListParams for more details.

Get a list of species codes ever seen in a region, in taxonomic order (species taxa only)

#### Notes The results are usually updated every 10 seconds for locations, every day for larger regions.

Parameters:

  • region_code (String)

    Any location, USFWS region, subnational2, subnational1, country, or custom regio

  • request_options (Phoebe::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (Array<String>)

See Also:



29
30
31
32
33
34
35
36
# File 'lib/phoebe/resources/product/species_list.rb', line 29

def list(region_code, params = {})
  @client.request(
    method: :get,
    path: ["product/spplist/%1$s", region_code],
    model: Phoebe::Internal::Type::ArrayOf[String],
    options: params[:request_options]
  )
end