mirror of
http://forge.chapril.org/sortion/ebird.js.git
synced 2026-07-11 15:57:57 +02:00
No description
| src | ||
| test | ||
| .gitignore | ||
| .npmignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
ebird.js
Damn small node.js library to deal with v2 eBird API.
Installation
npm install --save ebird
Usage
First, get an API key from eBird.
You may use a .env file in your project's root, to store it (don't forget to add it to .gitignore):
# .env
EBIRD_API_KEY=secret
Then you could use dotenv package to retrieve your credentials from this file:
npm install dotenv
require('dotenv').config()
const ebird = require('ebird')(process.env.EBIRD_API_KEY);
Endpoints
data/obs
data/obs/{{regionCode}}/recent
ebird.data.obs.in('FR')().then((data) => {
console.log(data);
});
NB. The documentation needs further work