UNPKG

observation-js

Version:

A fully-typed TypeScript client for the waarneming.nl API.

27 lines (26 loc) 727 B
export class RegionSpeciesLists { #client; /** * @internal */ constructor(client) { this.#client = client; } /** * Fetches a list of all available species lists for regions. * * @returns A promise that resolves to a paginated list of region species lists. */ async list() { return this.#client.publicRequest('region-lists/'); } /** * Fetches the species for a specific region species list. * * @param id - The ID of the region species list. * @returns A promise that resolves to an array of species in the list. */ async getSpecies(id) { return this.#client.publicRequest(`region-lists/${id}/species/`); } }