Entitlements
| Function | Returns |
|---|---|
getDropsEntitlements | Promise<PaginatedResult<DropsEntitlement>> |
getDropsEntitlementsByIds | Promise<Array<DropsEntitlement>> |
getDropsEntitlementById | Promise<DropsEntitlement | null> |
getDropsEntitlementByIdBatched | Promise<DropsEntitlement | null> |
updateDropsEntitlements | Promise<Record<string, DropsEntitlementUpdateStatus>> |
Functions
getDropsEntitlements
twitch.entitlement.getDropsEntitlements(filter: DropsEntitlementPaginatedFilter, alwaysApp?: boolean): Promise<PaginatedResult<DropsEntitlement>>
getDropsEntitlementsByIds
twitch.entitlement.getDropsEntitlementsByIds(dropIds: Array<string>): Promise<Array<DropsEntitlement>>
getDropsEntitlementById
twitch.entitlement.getDropsEntitlementById(dropId: string): Promise<DropsEntitlement | null>
getDropsEntitlementByIdBatched
twitch.entitlement.getDropsEntitlementByIdBatched(dropId: string): Promise<DropsEntitlement | null>
updateDropsEntitlements
twitch.entitlement.updateDropsEntitlements(dropIds: Array<string>, fulfillmentStatus: DropsEntitlementFulfillmentStatus): Promise<Record<string, DropsEntitlementUpdateStatus>>
Types
DropsEntitlement
type DropsEntitlement = {
id: string
benefitId: string
timestamp: string
userId: string
gameId: string
fulfillmentStatus: DropsEntitlementFulfillmentStatus
lastUpdated: string
}
DropsEntitlementFulfillmentStatus
type DropsEntitlementFulfillmentStatus = "FULFILLED" | "CLAIMED"
DropsEntitlementPaginatedFilter
type DropsEntitlementPaginatedFilter = {
user: UserIdResolvable
gameId: string
fulfillmentStatus: DropsEntitlementFulfillmentStatus
before?: string
limit?: number
after?: string
}
DropsEntitlementUpdateStatus
type DropsEntitlementUpdateStatus = "INVALID_ID" | "NOT_FOUND" | "SUCCESS" | "UNAUTHORIZED" | "UPDATE_FAILED"
PaginatedResult
type PaginatedResult<T> = {
data: Array<T>
cursor?: string
}
UserIdResolvable
type UserIdResolvable = string | UserIdResolvableType
UserIdResolvableType
type UserIdResolvableType = {
id: string
}