observation-js Documentation - v1.14.0
    Preparing search index...

    Class Species

    Index

    Constructors

    Methods

    • Retrieves a single species by its ID. The name of the species will be returned in the language set on the client (default: 'en'). This is a public endpoint and does not require authentication.

      Parameters

      • id: number

        The unique identifier of the species.

      Returns Promise<SpeciesData>

      A promise that resolves to the species object.

      If the request fails.

    • Retrieves observations for a single species. This is a public endpoint and does not require authentication.

      Parameters

      • id: number

        The unique identifier of the species.

      • params: Record<string, string | number> = {}

        Optional query parameters to filter the observations.

      Returns Promise<Paginated<Observation>>

      A promise that resolves to a paginated list of observations for the species.

      If the request fails.

    • Retrieves species occurrence data for a given set of species IDs at a specific location. This is a public endpoint and does not require authentication.

      Parameters

      • ids: number[]

        An array of species IDs.

      • point: string

        The location, formatted as a WKT point string (e.g., 'POINT(4.895168 52.370216)').

      Returns Promise<Paginated<SpeciesOccurrence>>

      A promise that resolves to a list of species occurrences.

      If the request fails.

    • Retrieves a list of all species groups. The names of the groups will be returned in the language set on the client (default: 'en'). This is a public endpoint and does not require authentication.

      Returns Promise<SpeciesGroup[]>

      A promise that resolves to a list of species group objects.

      If the request fails.

    • Retrieves detailed information about a species including descriptions, images, and other content. This is a public endpoint and does not require authentication.

      Parameters

      • id: number

        The unique identifier of the species.

      • Optionalcoordinates: string

        Optional GPS coordinates as a string (e.g., "4.895168,52.370216").

      Returns Promise<unknown>

      A promise that resolves to detailed species information.

      If the request fails.

    • Retrieves all possible attribute values for observations across all species groups. This is a public endpoint and does not require authentication.

      Returns Promise<SpeciesGroupAttributes>

      A promise that resolves to the general attributes for all species groups.

      If the request fails.

    • Retrieves the specific observation field attributes for a given species group. This is a public endpoint and does not require authentication.

      Parameters

      • id: number

        The unique identifier of the species group.

      Returns Promise<SpeciesGroupAttributes>

      A promise that resolves to the attributes for the species group.

      If the request fails.