Skip to content

Latest commit

 

History

History
161 lines (112 loc) · 11.3 KB

README.md

File metadata and controls

161 lines (112 loc) · 11.3 KB

Event

(checkins.event)

Overview

Available Operations

  • get - Get Event Checkin Details
  • list - List Event Checkins

get

Get the checkin details for event including event details and checkin time

Example Usage

import { PushPress } from "@pushpress/pushpress";

const pushPress = new PushPress({
  apiKey: process.env["PUSHPRESS_API_KEY"] ?? "",
});

async function run() {
  const result = await pushPress.checkins.event.get({
    uuid: "b888f774-3e7c-4135-a18c-6b985523c4bc",
  });

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

run();

Standalone function

The standalone function version of this method:

import { PushPressCore } from "@pushpress/pushpress/core.js";
import { checkinsEventGet } from "@pushpress/pushpress/funcs/checkinsEventGet.js";

// Use `PushPressCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const pushPress = new PushPressCore({
  apiKey: process.env["PUSHPRESS_API_KEY"] ?? "",
});

async function run() {
  const res = await checkinsEventGet(pushPress, {
    uuid: "b888f774-3e7c-4135-a18c-6b985523c4bc",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

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

run();

Parameters

Parameter Type Required Description
request operations.GetEventCheckinRequest ✔️ 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.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<components.EventCheckin>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

list

List event checkins. Includes details about the event

Example Usage

import { PushPress } from "@pushpress/pushpress";

const pushPress = new PushPress({
  apiKey: process.env["PUSHPRESS_API_KEY"] ?? "",
});

async function run() {
  const result = await pushPress.checkins.event.list({});

  for await (const page of result) {
    // Handle the page
    console.log(page);
  }
}

run();

Standalone function

The standalone function version of this method:

import { PushPressCore } from "@pushpress/pushpress/core.js";
import { checkinsEventList } from "@pushpress/pushpress/funcs/checkinsEventList.js";

// Use `PushPressCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const pushPress = new PushPressCore({
  apiKey: process.env["PUSHPRESS_API_KEY"] ?? "",
});

async function run() {
  const res = await checkinsEventList(pushPress, {});

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  for await (const page of result) {
    // Handle the page
    console.log(page);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.ListEventCheckinsRequest ✔️ 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.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ListEventCheckinsResponse>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*