ebird-client-0.2.0.1: Client functions for querying the eBird API.
Copyright(c) 2023 Finley McIlwaine
LicenseMIT (see LICENSE)
MaintainerFinley McIlwaine <finleymcilwaine@gmail.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.EBird.Client.Taxonomy

Description

Types and functions for taxonomy-related eBird API queries.

Synopsis

Documentation

taxonomy Source #

Arguments

:: TaxonomyParams

Optional parameters

default: defaultTaxonomyParams

-> ClientM [Taxon] 

Get any version of the eBird taxonomy, with optional filtering based on taxonomy categories and species.

For example, get the taxa for species in the "hybrid" category:

askEBird $ taxonomy (def & #categories ?~ "hybrid")

See the eBird API documentation for the corresponding endpoint.

data TaxonomyParams Source #

Optional parameters accepted by the TaxonomyAPI.

Note that defaultTaxonomyParams (or the Default instance's def value) may be used to accept the defaults of the eBird API.

Additionally, note that there are optics available for manipulating this type. For example, if you would like to just set the _taxonomyParamsSpecies field to "bohwax":

def & taxonomyParamsSpecies ?~ "bohwax"

Or, using -XOverloadedLabels:

def & #species ?~ "bohwax"

Constructors

TaxonomyParams 

Fields

Instances

Instances details
Read TaxonomyParams Source # 
Instance details

Defined in Data.EBird.Client.Taxonomy

Show TaxonomyParams Source # 
Instance details

Defined in Data.EBird.Client.Taxonomy

Default TaxonomyParams Source # 
Instance details

Defined in Data.EBird.Client.Taxonomy

Methods

def :: TaxonomyParams #

Eq TaxonomyParams Source # 
Instance details

Defined in Data.EBird.Client.Taxonomy

(k ~ A_Lens, a ~ Maybe TaxonomyCategories, b ~ Maybe TaxonomyCategories) => LabelOptic "categories" k TaxonomyParams TaxonomyParams a b Source # 
Instance details

Defined in Data.EBird.Client.Taxonomy

(k ~ A_Lens, a ~ Maybe SPPLocale, b ~ Maybe SPPLocale) => LabelOptic "locale" k TaxonomyParams TaxonomyParams a b Source # 
Instance details

Defined in Data.EBird.Client.Taxonomy

(k ~ A_Lens, a ~ Maybe SpeciesCodes, b ~ Maybe SpeciesCodes) => LabelOptic "species" k TaxonomyParams TaxonomyParams a b Source # 
Instance details

Defined in Data.EBird.Client.Taxonomy

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "version" k TaxonomyParams TaxonomyParams a b Source # 
Instance details

Defined in Data.EBird.Client.Taxonomy

defaultTaxonomyParams :: TaxonomyParams Source #

Note that this value does not actually use the eBird API default values. It simply sets every option to Nothing, which means we just don't send any of these parameters to the eBird API and they will use their own defaults.

Optics for TaxonomyParams

taxonomicForms Source #

Arguments

:: Text

eBird API key

-> SpeciesCode

The species to get subspecies of

-> ClientM SpeciesCodes 

Get the list of subspecies of a given species recognized in the eBird taxonomy.

For example, get subspecies of Canada Goose (using -XOverloadedStrings):

askEBird $ taxonomicForms key "cangoo"

Note that the endpoint for this query is simple enough that taxonomicForms is equivalent to the generated taxonomicForms_.

See the eBird API documentation for the corresponding endpoint.

taxaLocaleCodes Source #

Arguments

:: Text

eBird API key

-> TaxaLocaleCodesParams

Optional parameters

default: defaultTaxaLocaleCodesParams

-> ClientM [SPPLocaleListEntry] 

Get the supported locale codes and names for species common names, with the last time they were updated.

For example:

askEBird $ taxaLocaleCodes key def

See the eBird API documentation for the corresponding endpoint.

newtype TaxaLocaleCodesParams Source #

Optional parameters accepted by the TaxaLocaleCodesAPI.

Note that defaultTaxaLocaleCodesParams (or the Default instance's def value) may be used to accept the defaults of the eBird API.

Additionally, note that there are optics available for manipulating this type. For example, if you would like to just set the _taxaLocaleCodesParamsLocale field to Es:

def & taxaLocaleCodesParamsLocale ?~ Es

Or, using -XOverloadedLabels:

def & #locale ?~ Es

Constructors

TaxaLocaleCodesParams 

Fields

defaultTaxaLocaleCodesParams :: TaxaLocaleCodesParams Source #

Note that this value does not actually use the eBird API default values. It simply sets every option to Nothing, which means we just don't send any of these parameters to the eBird API and they will use their own defaults.

Optics for TaxaLocaleCodesParams

Taxonomy versions

taxonomyVersions :: ClientM [TaxonomyVersionListEntry] Source #

Get all versions of the taxonomy, with a flag indicating which is latest.

For example:

askEBird taxonomyVersions

Note that the endpoint for this query is simple enough that taxonomyVersions is equivalent to the generated taxonomyVersions_.

See the eBird API documentation for the corresponding endpoint.

Taxonomic groups

taxonomicGroups Source #

Arguments

:: SPPGrouping

MerlinGrouping groups like birds together, with falcons next to hawks, while EBirdGrouping groups in taxonomy order

-> TaxonomicGroupsParams

Optional parameters

default: defaultTaxonomicGroupsParams

-> ClientM [TaxonomicGroupListEntry] 

Get the list of species groups, in either Merlin or eBird grouping.

For example, get the taxonomic groups using eBird grouping order (using -XOverloadedStrings):

askEBird $ taxonomicGroups "ebird" def

See the eBird API documentation for the corresponding endpoint.

newtype TaxonomicGroupsParams Source #

Optional parameters accepted by the TaxonomicGroupsAPI.

Note that defaultTaxonomicGroupsParams (or the Default instance's def value) may be used to accept the defaults of the eBird API.

Additionally, note that there are optics available for manipulating this type. For example, if you would like to just set the _taxonomicGroupsParamsLocale field to Es:

def & taxonomicGroupsParamsLocale ?~ Es

Or, using -XOverloadedLabels:

def & #locale ?~ Es

Constructors

TaxonomicGroupsParams 

Fields

  • _taxonomicGroupsParamsLocale :: Maybe SPPLocale

    Locale to use for species group names. En is used for any locale whose translations are unavailable at this endpoint

    default: En

defaultTaxonomicGroupsParams :: TaxonomicGroupsParams Source #

Note that this value does not actually use the eBird API default values. It simply sets every option to Nothing, which means we just don't send any of these parameters to the eBird API and they will use their own defaults.

Optics for TaxonomicGroupsParams