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)
asyncGets 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.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
includeDisabled | boolean | none | Whether to include disabled/expired products. |
getExtensionTransactions(extensionId, filter)
asyncGets a list of transactions for the given extension.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
extensionId | string | none | The ID of the extension to get transactions for. | |
filter | HelixExtensionTransactionsPaginatedFilter | <complex> | Additional filters. |
getExtensionTransactionsPaginated(extensionId, filter)
Creates a paginator for transactions for the given extension.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
extensionId | string | none | The ID of the extension to get transactions for. | |
filter | HelixExtensionTransactionsFilter | <complex> | Additional filters. |
getLiveChannelsWithExtension(extensionId, pagination)
asyncGets a list of channels that are currently live and have the given extension installed.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
extensionId | string | none | The ID of the extension. | |
pagination | HelixForwardPagination | none | see below | |
pagination.after | string | none | A cursor to get the following page of. | |
pagination.limit | number | none | The number of results per page. |
getLiveChannelsWithExtensionPaginated(extensionId)
Creates a paginator for channels that are currently live and have the given extension installed.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
extensionId | string | none | The ID of the extension. |
getReleasedExtension(extensionId, version)
asyncGets a released extension by ID.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
extensionId | string | none | The ID of the extension. | |
version | string | none | The version of the extension. If not given, gets the latest version. |
putExtensionBitsProduct(data)
asyncCreates 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.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
data | HelixExtensionBitsProductUpdatePayload | none | see below | |
data.broadcast | boolean | none | Whether to broadcast the product's purchases to all users. | |
data.cost | number | none | The product's cost, in bits. | |
data.displayName | string | none | The product's display name. | |
data.expirationDate | string | none | The product's expiration date. If this is not set, the product never expires. | |
data.inDevelopment | boolean | none | Whether the product is in development. | |
data.sku | string | none | 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. |