observation-js
Version:
A fully-typed TypeScript client for the waarneming.nl API.
25 lines (24 loc) • 694 B
JavaScript
export class Lookups {
#client;
/**
* @internal
*/
constructor(client) {
this.#client = client;
}
/**
* Fetches all lookup tables from the API.
* Lookup tables contain constant values used throughout the API,
* such as validation statuses, rarities, counting methods, etc.
* This is a public endpoint and does not require authentication.
*
* @returns A promise that resolves to an object containing all lookup tables.
* @throws {ApiError} If the request fails.
*/
async get() {
return this.#client.publicRequest('lookups/', {
method: 'GET',
clientCache: true,
});
}
}