corona-warn-app
    Preparing search index...

    Class DiagnosisKeysAPI

    Index

    Constructors

    Properties

    apiClient: APIClient

    Methods

    • Get all countries for which diagnosis keys are available.

      Returns Promise<string[]>

      countries in ISO-3166 format (e.g. ["DE", "FR"])

    • Get all dates for which diagnosis keys are available.

      Parameters

      • country: string

        An ISO 3166-1 alpha-2 country key (e.g. DE).

        Gives a list of all dates for which diagnosis keys are available for a specific country. For Germany, this would return a list of dates for the past 14 days (if all of them contain diagnosis keys).

      Returns Promise<string[]>

    • Get all hours of a specific date for which diagnosis keys are available.

      Parameters

      • country: string

        An ISO 3166-1 alpha-2 country key (e.g. DE).

      • date: string

        An ISO-8601 date descriptor (e.g. 2020-05-01). Server time zone is UTC.

        Gives a list of all hours (0-23) of a specific date for which diagnosis keys are available for a specific country. For the current date, a list containing the respective numbers/hours for which data is available (e.g. 0-17) will be returned. If the date is outside of the 14-day window, or in the future, an HTTP error code will be returned.

      Returns Promise<number[]>

    • Get all diagnosis keys for a specific date.

      Parameters

      • country: string

        An ISO 3166-1 alpha-2 country key (e.g. DE).

      • date: string

        An ISO-8601 date descriptor (e.g. 2020-05-01). Server time zone is UTC.

        Gives all diagnosis keys for a specific country on a specific date. If there are no diagnosis keys available for that date (but the date is still within the 14-day window), a signed payload with an empty list of diagnosis keys will be returned. If the date is outside of the 14-day window, or in the future, an HTTP error code will be returned.

      Returns Promise<Buffer<ArrayBufferLike>>

    • Get all diagnosis keys for a specific hour on a specific date.

      Parameters

      • country: string

        An ISO 3166-1 alpha-2 country key (e.g. DE).

      • date: string
      • hour: number

        An integer number between 0 and 23. Server time zone is UTC.

        Gives all diagnosis keys for a specific country on a specific date within a specific hour. If there are no diagnosis keys available for the hour (but the date is still within the 14-day window), a signed payload with an empty list of diagnosis keys will be returned. If the date is outside of the 14-day window, or in the future, or an hour > 23 was requested, an HTTP error code will be returned.

      Returns Promise<Buffer<ArrayBufferLike>>

    • Post diagnosis keys.

      Parameters

      • keys: Buffer

        A collection of temporary exposure keys.

      • cwaAuthorization: string

        TAN code associated with this diagnosis key submission.

      • cwaFake: string

        Requests with a value of "0" will be fully processed. Any other value indicates that this request shall be handled as a "fake" request.

      Returns Promise<void>