Skip to content

Latest commit

 

History

History
104 lines (70 loc) · 8.71 KB

README.md

File metadata and controls

104 lines (70 loc) · 8.71 KB

Events

(events)

Overview

Work with events and the event stream.

Available Operations

list

Returns a paginated list of events that have occurred. Use the query parameters to page through results.

This is sometimes referred to as "the event stream."

Example Usage

import { Paddle } from "Paddle";

async function run() {
  const sdk = new Paddle({
    security: {
      bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
    },
  });

  const result = await sdk.events.list({});

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request operations.ListEventsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.ListEventsResponse>

Errors

Error Object Status Code Content Type
errors.ListEventsResponseBody 401 application/json
errors.ListEventsEventsResponseBody 500 application/json
errors.SDKError 4xx-5xx /

listTypes

Returns a list of event types.

The response is not paginated.

Example Usage

import { Paddle } from "Paddle";

async function run() {
  const sdk = new Paddle({
    security: {
      bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
    },
  });

  const result = await sdk.events.listTypes();

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.ListEventTypesResponse>

Errors

Error Object Status Code Content Type
errors.ListEventTypesResponseBody 401 application/json
errors.ListEventTypesEventsResponseBody 500 application/json
errors.SDKError 4xx-5xx /