ebird-client
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

ebird-client

npm License Travis

This is a client to interact with the ebird 2.0 API.

Written in TypeScript to improve usage ergonomics.

Installation

$ npm install ebird-client

Example

Example in TypeScript.

import EbirdClient, { Detail } from "ebird-client";
 
const ebird = new EbirdClient(process.env.API_KEY!); //Get your API_KEY from eBird
 
const denver = {
  latitude: 39.742043,
  longitude: -104.991531,
};
ebird.recentNearbyNotableObservations({
  lat: denver.latitude,
  lng: denver.longitude,
  maxResults: 2,
})
  .then((data) => console.log(data));
[ { "speciesCode": "lbbgul",
    "comName": "Lesser Black-backed Gull",                    
    "sciName": "Larus fuscus",
    "locId": "L2141651",
    "locName": "Valmont Overlook (Legion Park)",              
    "obsDt": "2019-03-30 18:05",
    "howMany": 1,
    "lat": 40.016268,
    "lng": -105.1891619,
    "obsValid": false,
    "obsReviewed": false,
    "locationPrivate": false },
  { "speciesCode": "easpho",
    "comName": "Eastern Phoebe",
    "sciName": "Sayornis phoebe",                             
    "locId": "L271803",
    "locName": "Stalker Lake State Wildlife Area",            
    "obsDt": "2019-03-30 17:17",
    "howMany": 1,
    "lat": 40.0853843,
    "lng": -102.2761784,
    "obsValid": false,
    "obsReviewed": false,
    "locationPrivate": false } ]
 

Documentation

Refer to the ebird 2.0 API docs for usage.

Package Sidebar

Install

npm i ebird-client

Weekly Downloads

2

Version

1.3.0

License

MIT

Unpacked Size

90.2 kB

Total Files

181

Last publish

Collaborators

  • dannyfritz