Overview
Can be accessed using client.entitlements on an ApiClient instance.
Example
const api = new ApiClient({ authProvider }); const clipId = await api.entitlements.getDropsEntitlements();
Methods
getDropsEntitlementById(id)
asyncGets the drops entitlement for the given ID.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | none | The ID to fetch. |
getDropsEntitlementByIdBatched(id)
asyncGets the drops entitlement for the given ID, batching multiple calls into fewer requests as the API allows.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | none | The ID to fetch. |
getDropsEntitlements(filter, alwaysApp)
asyncGets the drops entitlements for the given filter.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| filter | HelixDropsEntitlementPaginatedFilter | none | see below | |
| filter.after | string | none | A cursor to get the following page of. | |
| filter.before | string | none | A cursor to get the previous page of. | |
| filter.fulfillmentStatus | HelixDropsEntitlementFulfillmentStatus The fulfillment status of a drop entitlement. Aliased type: "CLAIMED" | "FULFILLED" | none | The fulfillment status to find entitlements for. | |
| filter.gameId | string | none | The ID of the game to find entitlements for. | |
| filter.limit | number | none | The number of results per page. | |
| filter.user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user to find entitlements for. | |
| alwaysApp | boolean | false | Whether an app token should always be used, even if a user filter is given. |
getDropsEntitlementsByIds(ids)
asyncGets the drops entitlements for the given IDs.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| ids | string[] | none | The IDs to fetch. |
getDropsEntitlementsPaginated(filter, alwaysApp)
Creates a paginator for drops entitlements for the given filter.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| filter | HelixDropsEntitlementFilter | none | see below | |
| filter.fulfillmentStatus | HelixDropsEntitlementFulfillmentStatus The fulfillment status of a drop entitlement. Aliased type: "CLAIMED" | "FULFILLED" | none | The fulfillment status to find entitlements for. | |
| filter.gameId | string | none | The ID of the game to find entitlements for. | |
| filter.user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user to find entitlements for. | |
| alwaysApp | boolean | false | Whether an app token should always be used, even if a user filter is given. |
updateDropsEntitlements(ids, fulfillmentStatus)
asyncUpdates the status of a list of drops entitlements.
Returns a map that associates each given ID with its update status.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| ids | string[] | none | The IDs of the entitlements. | |
| fulfillmentStatus | HelixDropsEntitlementFulfillmentStatus The fulfillment status of a drop entitlement. Aliased type: "CLAIMED" | "FULFILLED" | none | The fulfillment status to set the entitlements to. |