CEEJAYDocs

ceejay.programs

List the community programs on your server, to find the one to grant program XP in.

The function takes the same last argument as every other, options: signal, timeoutMs and maxRetries, for that one call. It can also raise the errors any request can raise, such as a bad key or the rate limit. See Errors and retries.

To grant and deduct XP inside a program, see ceejay.xp.program.grant and ceejay.xp.program.deduct on XP.

ceejay.programs.list

Lists your community's programs, such as an ambassador program, a page at a time.

GET /v1/programs · requires programs:read · API reference: List programs

Retried by the SDK: Yes. It is a read

Parameters: one object, which can be left out, then options.

Prop

Type

Returns the full response, typed as Schemas['ListProgramsResponse']. The programs are in data, lowest programId first, and the pagination details are in page.

Prop

Type

Each program, typed as Schemas['Program']:

Prop

Type

The response never includes who created a program, its application form, requirements, rewards or settings, or anything about its members except how many there are.

Errors

StatuscodeWhen
400bad_requeststatus is not one of the listed values, limit is not a whole number of 0 or more, or cursor is not one this function returned
404not_availablePrograms are not available on this instance

Example

ceejay.programs.list
let cursor: string | null = null
do {
  const page = await ceejay.programs.list({ limit: 50, ...(cursor ? { cursor } : {}) })
  for (const program of page.data) {
    console.log(program.programId, program.name, program.memberCount)
  }
  cursor = page.page.nextCursor
} while (cursor)

On this page

Community StudiosPrivacyTerms