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

Description

Types and functions for hotspot-related eBird API queries.

Synopsis

Region hotspots

regionHotspots Source #

Arguments

:: RegionCode

Region(s) to get hotspots in

-> RegionHotspotsParams

Optional parameters

default: defaultRegionHotspotsParams

-> ClientM [Hotspot] 

Get all hotspots in a list of one or more regions (RegionCode).

For example, get the hotspots in Albany County, Wyoming and Park County, Wyoming that have been visited in the last 5 days (using -XOverloadedLabels and -XOverloadedStrings):

askEBird $ regionHotspots "US-WY-001,US-WY-029" (def & #back ?~ 5)

See the eBird API documentation for the corresponding endpoint.

newtype RegionHotspotsParams Source #

Optional parameters accepted by the RegionHotspotsAPI.

Note that defaultRegionHotspotsParams (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 _regionHotspotsParamsBack field to 10:

def & regionHotspotsParamsBack ?~ 10

Or, using -XOverloadedLabels:

def & #back ?~ 10

Constructors

RegionHotspotsParams 

Fields

defaultRegionHotspotsParams :: RegionHotspotsParams 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 RegionHotspotsParams

Nearby hotspots

nearbyHotspots Source #

Arguments

:: Double

Latitude of the location to get hotspots near

-> Double

Longitude of the location to get hotspots near

-> NearbyHotspotsParams

Optional parameters

default: defaultNearbyHotspotsParams

-> ClientM [Hotspot] 

Get all hotspots within a radius of some latitude/longitude.

For example, get the hotspots within 30km of Cody, Wyoming that have been visited in the last 5 days (using -XOverloadedLabels and -XOverloadedStrings):

askEBird $
  nearbyHotspots
    44.526340 (-109.056534)
    (def & #radius ?~ 30 & #back ?~ 5)

See the eBird API documentation for the corresponding endpoint.

data NearbyHotspotsParams Source #

Optional parameters accepted by the NearbyHotspotsAPI.

Note that defaultNearbyHotspotsParams (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 _nearbyHotspotsParamsBack field to 10:

def & nearbyHotspotsParamsBack ?~ 10

Or, using -XOverloadedLabels:

def & #back ?~ 10

Constructors

NearbyHotspotsParams 

Fields

defaultNearbyHotspotsParams :: NearbyHotspotsParams 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 NearbyHotspotsParams

Hotspot info

hotspotInfo Source #

Arguments

:: Text

Hotspot location ID, e.g. "L2373040"

-> ClientM LocationData 

Get information about a hotspot.

For example, get information for a hotspot with location ID "L2373040" (using -XOverloadedStrings):

askEBird $ hotspotInfo L2373040

Note that the endpoint for this query is simple enough that hotspotInfo is equivalent to the generated hotspotInfo_.

See the eBird API documentation for the corresponding endpoint.