Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/oura_api/src/Webhook.ts>default

Typescript project to interact with v2 of the Oura Ring API
Latest
class default
import { default } from "https://deno.land/x/oura_api@1.0.1/src/Webhook.ts";

Base class for the Oura Webhook Subscription API Class containing all the methods to access the Oura Webhook Subscription API with a client id and client secret.

Constructors

new
default(clientId: string, clientSecret: string)

Creates a new Webhook API client.

Methods

createSubscription(
callbackUrl: string,
verificationToken: string,
eventType: EventType,
dataType: DataType,
): Promise<Subscription>

Creates a new webhook subscription. See setup documentation on the Oura Developer website for a detailed description of the creation workflow.

Deletes a webhook subscription.

getSubscription(id: string): Promise<Subscription>

Retrieves a specific webhook subscription by id.

Retrieves a list of current active webhook subscriptions.

renewSubscription(id: string): Promise<Subscription>

Renews the expiration time of a webhook subscription.

updateSubscription(
id: string,
verificationToken: string,
callbackUrl?: string,
eventType?: EventType,
dataType?: DataType,
): Promise<Subscription>

Updates a webhook subscription.