@atechadventurer/birdweather
v1.0.1
Published
This is the OpenAPI specification for V1 of the BirdWeather API.
Downloads
10
Maintainers
Readme
BirdweatherSdk TypeScript SDK 1.0.0
Welcome to the BirdweatherSdk SDK documentation. This guide will help you get started with integrating and using the BirdweatherSdk SDK in your project.
Versions
- API version:
1.0.0 - SDK version:
1.0.0
About the API
This is the OpenAPI specification for V1 of the BirdWeather API.
Table of Contents
Setup & Configuration
Supported Language Versions
This SDK is compatible with the following versions: TypeScript >= 4.8.4
Installation
To get started with the SDK, we recommend installing using npm:
npm install @atechadventurer/birdweatherAuthentication
API Key Authentication
The BirdweatherSdk API uses API keys as a form of authentication. An API key is a unique identifier used to authenticate a user, developer, or a program that is calling the API.
Setting the API key
When you initialize the SDK, you can set the API key as follows:
const sdk = new BirdweatherSdk({ apiKey: 'YOUR_API_KEY' });If you need to set or update the API key after initializing the SDK, you can use:
const sdk = new BirdweatherSdk();
sdk.apiKey = 'YOUR_API_KEY';Setting a Custom Timeout
You can set a custom timeout for the SDK's HTTP requests as follows:
const birdweatherSdk = new BirdweatherSdk({ timeout: 10000 });Sample Usage
Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:
import { BirdweatherSdk } from '@atechadventurer/birdweather';
(async () => {
const birdweatherSdk = new BirdweatherSdk({
apiKey: 'YOUR_API_KEY',
});
const period = 'day';
const { data } = await birdweatherSdk.stations.getStationStats('1234567890', {
period: period,
since: '2023-10-01',
});
console.log(data);
})();Services
The SDK provides various services to interact with the API.
| Name | | :----------------------------------------------------------- | | StationsService | | SpeciesService |
Models
The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.
| Name | Description | | :----------------------------------------------------------------------------------------------- | :--------------------------------------------------------------- | | Period | The time period to filter detections. | | GetStationStatsOkResponse | | | ErrorResponse | | | Sort | | | Order | Sort order. Default is asc when sorting by name, otherwise desc. | | ListStationSpeciesOkResponse | | | ListStationDetectionsOkResponse | | | Detection | | | RegisterDetectionRequest | | | RegisterDetectionCreatedResponse | | | __ | | | GetStationDetectionByIdOkResponse | | | ListStationSoundscapesOkResponse | | | Soundscape | | | UploadSoundscapeCreatedResponse | | | GetStationSoundscapeByIdOkResponse | | | StationConfig | | | UpdateStationConfigOkResponse | | | Station | | | GetSpeciesByIdOkResponse | | | Species | | | ErrorResponse | | | LookupSpeciesRequest | | | LookupSpeciesOkResponse | |
