observation-js
Version:
A fully-typed TypeScript client for the waarneming.nl API.
23 lines (22 loc) • 572 B
JavaScript
export class Languages {
#client;
/**
* @internal
*/
constructor(client) {
this.#client = client;
}
/**
* Fetches a list of all languages supported by the API.
* This is a public endpoint and does not require authentication.
*
* @returns A promise that resolves to a paginated list of language objects.
* @throws {ApiError} If the request fails.
*/
async list() {
return this.#client.publicRequest('languages/', {
method: 'GET',
clientCache: true,
});
}
}