Copyright | (c) 2023 Finley McIlwaine |
---|---|
License | MIT (see LICENSE) |
Maintainer | Finley McIlwaine <finleymcilwaine@gmail.com> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Client functions generated using
servant-client. The
queries here match exactly the schemas defined in
ebird-api, and are therefore
potentially a bit more clunky to use. See the wrappers in Client
for
more convenient options.
Synopsis
- recentObservations_ :: Text -> RegionCode -> Maybe Integer -> Maybe TaxonomyCategories -> Maybe Bool -> Maybe Bool -> Maybe Integer -> Maybe RegionCode -> Maybe SPPLocale -> ClientM [Observation 'Simple]
- recentNotableObservations_ :: Text -> RegionCode -> Maybe Integer -> Maybe DetailLevel -> Maybe Bool -> Maybe Integer -> Maybe RegionCode -> Maybe SPPLocale -> ClientM [SomeObservation]
- recentSpeciesObservations_ :: Text -> RegionCode -> SpeciesCode -> Maybe Integer -> Maybe Bool -> Maybe Bool -> Maybe Integer -> Maybe RegionCode -> Maybe SPPLocale -> ClientM [Observation 'Simple]
- recentNearbyObservations_ :: Text -> Double -> Double -> Maybe Integer -> Maybe Integer -> Maybe TaxonomyCategories -> Maybe Bool -> Maybe Bool -> Maybe Integer -> Maybe SortObservationsBy -> Maybe SPPLocale -> ClientM [Observation 'Simple]
- recentNearbySpeciesObservations_ :: Text -> SpeciesCode -> Double -> Double -> Maybe Integer -> Maybe Integer -> Maybe TaxonomyCategories -> Maybe Bool -> Maybe Bool -> Maybe Integer -> Maybe SortObservationsBy -> Maybe SPPLocale -> ClientM [Observation 'Simple]
- recentNearestSpeciesObservations_ :: Text -> SpeciesCode -> Double -> Double -> Maybe Integer -> Maybe Integer -> Maybe Bool -> Maybe Bool -> Maybe Integer -> Maybe SPPLocale -> ClientM [Observation 'Simple]
- recentNearbyNotableObservations_ :: Text -> Double -> Double -> Maybe Integer -> Maybe DetailLevel -> Maybe Integer -> Maybe Bool -> Maybe Integer -> Maybe SPPLocale -> ClientM [SomeObservation]
- historicalObservations_ :: Text -> RegionCode -> Integer -> Integer -> Integer -> Maybe TaxonomyCategories -> Maybe DetailLevel -> Maybe Bool -> Maybe Bool -> Maybe Integer -> Maybe SelectObservation -> Maybe RegionCode -> Maybe SPPLocale -> ClientM [SomeObservation]
- recentChecklists_ :: Text -> RegionCode -> Maybe Integer -> ClientM [ChecklistFeedEntry]
- top100_ :: Text -> Region -> Integer -> Integer -> Integer -> Maybe RankTop100By -> Maybe Integer -> ClientM [Top100ListEntry]
- checklistFeed_ :: Text -> Region -> Integer -> Integer -> Integer -> Maybe SortChecklistsBy -> Maybe Integer -> ClientM [ChecklistFeedEntry]
- regionalStatistics_ :: Text -> Region -> Integer -> Integer -> Integer -> ClientM RegionalStatistics
- speciesList_ :: Text -> Region -> ClientM [SpeciesCode]
- viewChecklist_ :: Text -> Text -> ClientM Checklist
- regionHotspots_ :: RegionCode -> Maybe Integer -> Maybe CSVOrJSONFormat -> ClientM [Hotspot]
- nearbyHotspots_ :: Double -> Double -> Maybe Integer -> Maybe Integer -> Maybe CSVOrJSONFormat -> ClientM [Hotspot]
- hotspotInfo_ :: Text -> ClientM LocationData
- taxonomy_ :: Maybe TaxonomyCategories -> Maybe CSVOrJSONFormat -> Maybe SPPLocale -> Maybe SpeciesCodes -> Maybe Text -> ClientM [Taxon]
- taxonomicForms_ :: Text -> SpeciesCode -> ClientM SpeciesCodes
- taxaLocaleCodes_ :: Text -> Maybe SPPLocale -> ClientM [SPPLocaleListEntry]
- taxonomyVersions_ :: ClientM [TaxonomyVersionListEntry]
- taxonomicGroups_ :: SPPGrouping -> Maybe SPPLocale -> ClientM [TaxonomicGroupListEntry]
- regionInfo_ :: Text -> Region -> Maybe RegionNameFormat -> ClientM RegionInfo
- subRegionList_ :: Text -> RegionType -> RegionCode -> ClientM [RegionListEntry]
- adjacentRegions_ :: Text -> Region -> ClientM [RegionListEntry]
Generated eBird API client functions
Generated directly from the definition of the API in ebird-api.
Observations queries
:: Text | eBird API key |
-> RegionCode | Region(s) to get observations from |
-> Maybe Integer | How many days back to look for observations 1 - 30, default: 14 |
-> Maybe TaxonomyCategories | Only include observations in these taxonomy categories default: all categories |
-> Maybe Bool | Only get observations from hotspots default: |
-> Maybe Bool | Include observations which have not been reviewed default: |
-> Maybe Integer | Maximum number of observations to get 1 - 10000, default: all |
-> Maybe RegionCode | Up to 10 extra regions to get observations from default: none |
-> Maybe SPPLocale | Return observations with common names in this locale default: |
-> ClientM [Observation 'Simple] |
Get a list of recent observations within a region. Results only include the most recent observation for each species in the region.
See the eBird API documentation for the corresponding endpoint.
recentNotableObservations_ Source #
:: Text | eBird API key |
-> RegionCode | Region(s) to get observations from |
-> Maybe Integer | How many days back to look for observations 1 - 30, default: 14 |
-> Maybe DetailLevel | Detail level for the resulting observations default: |
-> Maybe Bool | Only get observations from hotspots default: |
-> Maybe Integer | Maximum number of observations to get 1 - 10000, default: all |
-> Maybe RegionCode | Up to 10 extra regions to get observations from default: none |
-> Maybe SPPLocale | Return observations with common names in this locale default: |
-> ClientM [SomeObservation] |
Get a list of recent notable observations within a region. Results only include the most recent observation for each species in the region.
See the eBird API documentation for the corresponding endpoint.
recentSpeciesObservations_ Source #
:: Text | eBird API key |
-> RegionCode | Region(s) to get observations from |
-> SpeciesCode | Species to get observations of (e.g. "barswa" for Barn Swallow) |
-> Maybe Integer | How many days back to look for observations 1 - 30, default: 14 |
-> Maybe Bool | Only get observations from hotspots default: |
-> Maybe Bool | Include observations which have not been reviewed default: |
-> Maybe Integer | Maximum number of observations to get 1 - 10000, default: all |
-> Maybe RegionCode | Up to 10 extra regions to get observations from default: none |
-> Maybe SPPLocale | Return observations with common names in this locale default: |
-> ClientM [Observation 'Simple] |
Get a list of recent observations of a specific species within a region.
See the eBird API documentation for the corresponding endpoint.
recentNearbyObservations_ Source #
:: Text | eBird API key |
-> Double | Latitude of the location to get observations near |
-> Double | Longitude of the location to get observations near |
-> Maybe Integer | Search radius from the given latitude/longitude in kilometers 0 - 50, default: 25 |
-> Maybe Integer | How many days back to look for observations 1 - 30, default: 14 |
-> Maybe TaxonomyCategories | Only include observations in these taxonomy categories default: all |
-> Maybe Bool | Only get observations from hotspots default: |
-> Maybe Bool | Include observations which have not been reviewed default: |
-> Maybe Integer | Maximum number of observations to get 1 - 10000, default: all |
-> Maybe SortObservationsBy | Sort observations by taxonomy ( default: |
-> Maybe SPPLocale | Return observations with common names in this locale default: |
-> ClientM [Observation 'Simple] |
Get a list of recent observations within some radius of some latitude/longitude.
See the eBird API documentation for the corresponding endpoint.
recentNearbySpeciesObservations_ Source #
:: Text | eBird API key |
-> SpeciesCode | Species to get observations of (e.g. "bohwax" for Bohemian Waxwing) |
-> Double | Latitude of the location to get observations near |
-> Double | Longitude of the location to get observations near |
-> Maybe Integer | Search radius from the given latitude/longitude in kilometers 0 - 50, default: 25 |
-> Maybe Integer | How many days back to look for observations 1 - 30, default: 14 |
-> Maybe TaxonomyCategories | Only include observations in these taxonomy categories default: all |
-> Maybe Bool | Only get observations from hotspots default: |
-> Maybe Bool | Include observations which have not been reviewed default: |
-> Maybe Integer | Maximum number of observations to get 1 - 10000, default: all |
-> Maybe SortObservationsBy | Sort observations by taxonomy ( default: |
-> Maybe SPPLocale | Return observations with common names in this locale default: |
-> ClientM [Observation 'Simple] |
Get a list of recent observations of a species within some radius of some latitude/longitude.
See the eBird API documentation for the corresponding endpoint.
recentNearestSpeciesObservations_ Source #
:: Text | eBird API key |
-> SpeciesCode | Species to get observations of |
-> Double | Latitude of the location to get observations near |
-> Double | Longitude of the location to get observations near |
-> Maybe Integer | Search radius from the given latitude/longitude in kilometers 0 - 50, default: 25 |
-> Maybe Integer | How many days back to look for observations 0 - 30, default: 14 |
-> Maybe Bool | Only get observations from hotspots default: |
-> Maybe Bool | Include observations which have not been reviewed default: |
-> Maybe Integer | Maximum number of observations to get 1 - 10000, default: all |
-> Maybe SPPLocale | Return observations with common names in this locale default: |
-> ClientM [Observation 'Simple] |
Get a list of recent observations of some species nearest to some latitude/longitude.
See the eBird API documentation for the corresponding endpoint.
recentNearbyNotableObservations_ Source #
:: Text | eBird API key |
-> Double | Latitude of the location to get observations near |
-> Double | Longitude of the location to get observations near |
-> Maybe Integer | Search radius from the given latitude/longitude in kilometers 0 - 50, default: 25 |
-> Maybe DetailLevel | Detail level for the resulting observations default: |
-> Maybe Integer | How many days back to look for observations 0 - 30, default: 14 |
-> Maybe Bool | Only get observations from hotspots default: |
-> Maybe Integer | Maximum number of observations to get 1 - 10000, default: all |
-> Maybe SPPLocale | Return observations with common names in this locale default: |
-> ClientM [SomeObservation] |
Get a list of recent notable observations of some near some latitude/longitude.
See the eBird API documentation for the corresponding endpoint.
historicalObservations_ Source #
:: Text | eBird API key |
-> RegionCode | Region(s) to get observation from |
-> Integer | Year, from 1800 to present |
-> Integer | Month (1 - 12) |
-> Integer | Day in the month |
-> Maybe TaxonomyCategories | Only include observations in these taxonomy categories default: all |
-> Maybe DetailLevel | Detail level for the resulting observations default: |
-> Maybe Bool | Only get observations from hotspots default: |
-> Maybe Bool | Include observations which have not been reviewed default: |
-> Maybe Integer | Maximum number of observations to get 1 - 10000, default: all |
-> Maybe SelectObservation | Whether to display the first or last observation of a species on the date, in the case that there are multiple observations of the same species on the date default: |
-> Maybe RegionCode | Up to 50 extra regions to get observations from default: none |
-> Maybe SPPLocale | Return observations with common names in this locale default: |
-> ClientM [SomeObservation] |
Get a list of observations for each species seen on a specific date. The
specific observations returned are determined by the SelectObservation
parameter - first observation of the species (SelectFirstObservation
) or
last observation (SelectLastObservation
, default).
See the eBird API documentation for the corresponding endpoint.
Product queries
:: Text | eBird API key |
-> RegionCode | Region(s) to get checklists from |
-> Maybe Integer | Maximum number of checklists to fetch 1 - 200, default: 10 |
-> ClientM [ChecklistFeedEntry] |
Get a list recently submitted checklists within a region.
See the eBird API documentation for the corresponding endpoint.
:: Text | eBird API key |
-> Region | Region to fetch the ranking for |
-> Integer | Year, from 1800 to present |
-> Integer | Month (1 - 12) |
-> Integer | Day in the month |
-> Maybe RankTop100By | Rank the resulting list by number of species observed or by number of checklists completed default: |
-> Maybe Integer | Maximum number of entries to fetch 1 - 100, default: 100 |
-> 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.
See the eBird API documentation for the corresponding endpoint.
:: Text | eBird API key |
-> Region | Region to fetch the checklist feed for |
-> Integer | Year, from 1800 to present |
-> Integer | Month (1 - 12) |
-> Integer | Day in the month |
-> Maybe SortChecklistsBy | Sort the resulting list by date of checklist submission or date of checklist creation default: |
-> Maybe Integer | Maximum number of checklists to fetch 1 - 200, default: 10 |
-> ClientM [ChecklistFeedEntry] |
Get a list of checklists submitted within a region on a specific date.
See the eBird API documentation for the corresponding endpoint.
:: Text | eBird API key |
-> Region | Region to fetch the statistics for |
-> Integer | Year, from 1800 to present |
-> Integer | Month (1 - 12) |
-> Integer | Day in the month |
-> ClientM RegionalStatistics |
Get the RegionalStatistics
for a region on a specific date.
See the eBird API documentation for the corresponding endpoint.
:: 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.
See the eBird API documentation for the corresponding endpoint.
Get information about a checklist.
See the eBird API documentation for the corresponding endpoint.
Hotspot queries
:: RegionCode | Region(s) to get hotspots in |
-> Maybe Integer | Only fetch hotspots that have been visited within this many days ago 1 - 30, default: no limit |
-> Maybe CSVOrJSONFormat | Format results in CSV or JSON format NOTE: This argument should always be hardcoded to default: |
-> ClientM [Hotspot] |
Get all hotspots in a list of one or more regions (RegionCode
).
See the eBird API documentation for the corresponding endpoint.
NOTE: The eBird API is broken. Always hardcode the CSVOrJSONFormat
argument to JSONFormat
.
:: Double | Latitude of the location to get hotspots near |
-> Double | Longitude of the location to get hotspots near |
-> Maybe Integer | Only fetch hotspots that have been visited within this many days ago 1 - 30, default: no limit |
-> Maybe Integer | Search radius in kilometers 0 - 50, default: 25 |
-> Maybe CSVOrJSONFormat | Format results in CSV or JSON format NOTE: This argument should always be hardcoded to default: |
-> ClientM [Hotspot] |
Get all hotspots within a radius of some latitude/longitude.
See the eBird API documentation for the corresponding endpoint.
NOTE: The eBird API is broken. Always hardcode the CSVOrJSONFormat
argument to JSONFormat
.
:: Text | Location ID of the hotspot (e.g. "L2373040") |
-> ClientM LocationData |
Get information about a hotspot.
See the eBird API documentation for the corresponding endpoint.
Taxonomy queries
:: Maybe TaxonomyCategories | Only include species of these default: all categories |
-> Maybe CSVOrJSONFormat | Format the taxonomy in CSV or JSON NOTE: This argument should always be hardcoded to default: |
-> Maybe SPPLocale | Use this locale for common names default: |
-> Maybe SpeciesCodes | Only fetch records for these species default: all |
-> Maybe Text | Fetch this version of the eBird taxonomy default: latest |
-> ClientM [Taxon] |
Get any version of the eBird taxonomy, with optional filtering based on taxonomy categories and species.
See the eBird API documentation for the corresponding endpoint.
NOTE: The eBird API is broken. Always hardcode the CSVOrJSONFormat
argument to JSONFormat
.
:: Text | eBird API key |
-> SpeciesCode | Species to get the sub species of |
-> ClientM SpeciesCodes |
Get the list of sub species of a given species recognized in the eBird taxonomy.
See the eBird API documentation for the corresponding endpoint.
:: Text | eBird API key |
-> Maybe SPPLocale | Value for the "Accept-Language" header, for translated language names, when available default: |
-> ClientM [SPPLocaleListEntry] |
Get the supported locale codes and names for species common names, with the last time they were updated.
See the eBird API documentation for the corresponding endpoint.
taxonomyVersions_ :: ClientM [TaxonomyVersionListEntry] Source #
Get all versions of the taxonomy, with a flag indicating which is latest.
See the eBird API documentation for the corresponding endpoint.
:: SPPGrouping |
|
-> Maybe SPPLocale | Locale to use for species group names. default: |
-> ClientM [TaxonomicGroupListEntry] |
Get the list of species groups, in either Merlin or eBird grouping.
See the eBird API documentation for the corresponding endpoint.
Region queries
:: Text | eBird API key |
-> Region | Region to get information for |
-> Maybe RegionNameFormat | How to format the region name in the response default: |
-> ClientM RegionInfo |
Get a RegionInfo
for an eBird region.
See the eBird API documentation for the corresponding endpoint.
:: Text | eBird API key |
-> RegionType | Type of subregions to fetch |
-> RegionCode | Parent |
-> ClientM [RegionListEntry] |
Get a list of sub-regions of a given region type within a given region.
Keep in mind that many combinations of sub region and parent region are
invalid, e.g. CountryType
regions within "US-WY".
See the eBird API documentation for the corresponding endpoint.
:: Text | eBird API key |
-> Region | Region to fetch the adjacent regions of |
-> ClientM [RegionListEntry] |
Get a list of regions adjacent to a given region. Only Subnational2
region codes in the United States, New Zealand, or Mexico are currently
supported.
See the eBird API documentation for the corresponding endpoint.