TwurpleAuthenticationGetting dataExamplesFAQMigration

Main classes

HelixExtensionsApi

The Helix API methods that deal with extensions.

Overview

Can be accessed using client.extensions on an ApiClient instance.

Example

const api = new ApiClient({ authProvider });
const transactions = await api.extionsions.getExtensionTransactions('abcd');

Methods

getExtensionBitsProducts(includeDisabled)

async

Gets an extension's Bits products.

This only works if the provided token belongs to an extension's client ID, and will return the products for that extension.

ParameterTypeRequiredDefaultDescription
includeDisabledbooleannone

Whether to include disabled/expired products.

getExtensionTransactions(extensionId, filter)

async

Gets a list of transactions for the given extension.

ParameterTypeRequiredDefaultDescription
extensionIdstringnone

The ID of the extension to get transactions for.

filterHelixExtensionTransactionsPaginatedFilter<complex>

Additional filters.

getExtensionTransactionsPaginated(extensionId, filter)

Creates a paginator for transactions for the given extension.

ParameterTypeRequiredDefaultDescription
extensionIdstringnone

The ID of the extension to get transactions for.

filterHelixExtensionTransactionsFilter<complex>

Additional filters.

Return type: HelixPaginatedRequest<HelixExtensionTransactionData, HelixExtensionTransaction>

getLiveChannelsWithExtension(extensionId, pagination)

async

Gets a list of channels that are currently live and have the given extension installed.

ParameterTypeRequiredDefaultDescription
extensionIdstringnone

The ID of the extension.

paginationHelixForwardPaginationnonesee below
pagination.afterstringnone

A cursor to get the following page of.

pagination.limitnumbernone

The number of results per page.

getLiveChannelsWithExtensionPaginated(extensionId)

Creates a paginator for channels that are currently live and have the given extension installed.

ParameterTypeRequiredDefaultDescription
extensionIdstringnone

The ID of the extension.

Return type: HelixPaginatedRequest<HelixChannelReferenceData, HelixChannelReference>

getReleasedExtension(extensionId, version)

async

Gets a released extension by ID.

ParameterTypeRequiredDefaultDescription
extensionIdstringnone

The ID of the extension.

versionstringnone

The version of the extension. If not given, gets the latest version.

Return type: HelixExtension

putExtensionBitsProduct(data)

async

Creates or updates a Bits product of an extension.

This only works if the provided token belongs to an extension's client ID, and will create/update a product for that extension.

ParameterTypeRequiredDefaultDescription
dataHelixExtensionBitsProductUpdatePayloadnonesee below
data.broadcastbooleannone

Whether to broadcast the product's purchases to all users.

data.costnumbernone

The product's cost, in bits.

data.displayNamestringnone

The product's display name.

data.expirationDatestringnone

The product's expiration date. If this is not set, the product never expires.

data.inDevelopmentbooleannone

Whether the product is in development.

data.skustringnone

The product's unique identifier.

If a product with the given SKU already exists, it will be updated; otherwise, a new one will be created.