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

Description

Types and functions for product-related eBird API queries.

Synopsis

Recent checklists

recentChecklists Source #

Arguments

:: Text

eBird API key

-> RegionCode

Region(s) to get Checklists from

-> RecentChecklistsParams

Optional parameters

default: defaultRecentChecklistsParams

-> ClientM [ChecklistFeedEntry] 

Get a list recently submitted checklists within a region.

For example, get up to 3 recent checklists submitted in Park County, Wyoming (using -XOverloadedLabels and -XOverloadedStrings):

askEBird $
  recentChecklists key
    "US-WY-029"
    (def & #maxResults ?~ 3)

See the eBird API documentation for the corresponding endpoint.

newtype RecentChecklistsParams Source #

Optional parameters accepted by the RecentChecklistsAPI.

Note that defaultRecentChecklistsParams (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 _recentChecklistsParamsMaxResults field to 3:

def & recentChecklistsParamsMaxResults ?~ 3

Or, using -XOverloadedLabels:

def & #maxResults ?~ 3

Constructors

RecentChecklistsParams 

Fields

defaultRecentChecklistsParams :: RecentChecklistsParams 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 RecentChecklistsParams

Top 100

top100 Source #

Arguments

:: Text

eBird API key

-> Region

Region to fetch the ranking for

Note: Only country, subnational1, or location regions are supported for this endpoint of the eBird API.

-> EBirdDate

Date to get the top 100 on

-> Top100Params

Optional parameters

default: defaultTop100Params

-> ClientM [Top100ListEntry] 

Get a list of top contributors for a region on a specific date, ranked by number of species observed or number of checklists submitted.

For example, get the top 10 contributors by number of species observed on July 11th, 2023 in Wyoming (using -XOverloadedLabels and -XOverloadedStrings):

askEBird $
  top100 key
    "US-WY"
    "2023-07-11"
    (def & #maxResults ?~ 10)

See the eBird API documentation for the corresponding endpoint.

data Top100Params Source #

Optional parameters accepted by the Top100API.

Note that defaultTop100Params (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 _top100ParamsMaxResults field to 50:

def & top100ParamsMaxResults ?~ 50

Or, using -XOverloadedLabels:

def & #maxResults ?~ 50

Constructors

Top100Params 

Fields

Instances

Instances details
Read Top100Params Source # 
Instance details

Defined in Data.EBird.Client.Product

Show Top100Params Source # 
Instance details

Defined in Data.EBird.Client.Product

Default Top100Params Source # 
Instance details

Defined in Data.EBird.Client.Product

Methods

def :: Top100Params #

Eq Top100Params Source # 
Instance details

Defined in Data.EBird.Client.Product

(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "maxResults" k Top100Params Top100Params a b Source # 
Instance details

Defined in Data.EBird.Client.Product

(k ~ A_Lens, a ~ Maybe RankTop100By, b ~ Maybe RankTop100By) => LabelOptic "rankBy" k Top100Params Top100Params a b Source # 
Instance details

Defined in Data.EBird.Client.Product

defaultTop100Params :: Top100Params 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 Top100Params

Checklist feed

checklistFeed Source #

Arguments

:: Text

eBird API key

-> Region

Region to fetch the checklist feed for

-> EBirdDate

Date to get the checklist feed on

-> ChecklistFeedParams

Optional parameters

default: defaultChecklistFeedParams

-> ClientM [ChecklistFeedEntry] 

Get a list of checklists submitted within a region on a specific date.

For example, get a feed of 10 checklists submitted in Park County, Wyoming on July 11th, 2023 (using -XOverloadedLabels and -XOverloadedStrings):

askEBird $
  checklistFeed key
    "US-WY-029"
    "2023-07-11"
    (def & #maxResults ?~ 10)

See the eBird API documentation for the corresponding endpoint.

data ChecklistFeedParams Source #

Optional parameters accepted by the ChecklistFeedAPI.

Note that defaultChecklistFeedParams (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 _checklistFeedParamsMaxResults field to 50:

def & checklistFeedParamsMaxResults ?~ 50

Or, using -XOverloadedLabels:

def & #maxResults ?~ 50

Constructors

ChecklistFeedParams 

Fields

defaultChecklistFeedParams :: ChecklistFeedParams 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 ChecklistFeedParams

Regional statistics

regionalStatistics Source #

Arguments

:: Text

eBird API key

-> Region

Region to fetch the statistics for

-> EBirdDate

Date to get the statistics on

-> ClientM RegionalStatistics 

Get the RegionalStatistics for a region on a specific date.

For example, get the statistics for Wyoming on July 11th, 2023 (using -XOverloadedStrings):

askEBird $
  regionalStatistics key
    "US-WY"
    "2023-07-11"

See the eBird API documentation for the corresponding endpoint.

Species list

speciesList Source #

Arguments

:: Text

eBird API key

-> Region

Region to fetch the species list for

-> ClientM [SpeciesCode] 

Get a list of all species ever seen in a Region.

For example, get all species ever seen in Park County, Wyoming (using -XOverloadedStrings):

askEBird $ speciesList key "US-WY-029"

Note that the endpoint for this query is simple enough that speciesList is equivalent to the generated speciesList_.

See the eBird API documentation for the corresponding endpoint.

View checklist

viewChecklist Source #

Arguments

:: Text

eBird API key

-> Text

Checklist submission ID, e.g. "S144646447"

-> ClientM Checklist 

Get information about a checklist.

For example, get information for a checklist with submission ID "S144646447" (using -XOverloadedStrings):

askEBird $ viewChecklist key S144646447

Note that the endpoint for this query is simple enough that viewChecklist is equivalent to the generated viewChecklist_.

See the eBird API documentation for the corresponding endpoint.