Optional
options: ObservationClientOptionsConfiguration options for the client.
Readonly
observationsReadonly
speciesReadonly
regionsReadonly
locationsReadonly
regionReadonly
usersReadonly
countriesReadonly
badgesReadonly
groupsReadonly
exportsReadonly
languagesReadonly
lookupsReadonly
niaReadonly
mediaReadonly
sessionsReadonly
challengesReadonly
interceptorsSets the language for the Accept-Language
header in all subsequent API requests.
The default language is 'en'.
The two-letter language code (e.g., 'nl', 'en', 'de').
Internal
Gets the base URL for the API.
The base URL.
Generates the authorization URL for the OAuth2 Authorization Code Grant flow. The user should be redirected to this URL to authorize the application.
A random string to protect against CSRF attacks.
An array of scopes the application is requesting.
The full authorization URL to redirect the user to.
Exchanges an authorization code for an access token using the Authorization Code Grant flow.
The authorization code received from the callback URL after user authorization.
A promise that resolves to the token response from the API.
Fetches an access token using the Resource Owner Password Credentials Grant. Use this grant type only for trusted applications.
The credentials for the password grant.
A promise that resolves to the token response.
Refreshes an expired access token using a refresh token.
A promise that resolves to the new token response.
Manually sets the access token for the client to use in subsequent authenticated requests.
The access token.
Internal
Manually sets the refresh token for the client.
The refresh token.
Checks if an access token is currently set on the client.
true
if an access token is set, false
otherwise.
Checks if a refresh token is currently set on the client.
true
if a refresh token is set, false
otherwise.
Internal
Gets the current access token.
The access token or null if not set.
Makes an authenticated request to the API.
An access token must be set via setAccessToken
or by using one of the authentication flows.
The API endpoint to request.
Optional request options, including URL parameters.
A promise that resolves to the JSON response.
Makes a public (unauthenticated) request to the API.
The API endpoint to request.
Optional request options, including URL parameters.
A promise that resolves to the JSON response.
The main client for interacting with the Waarneming.nl API.