UNPKG

@twurple/api

Version:

Interact with Twitch's API.

18 lines (17 loc) 571 B
import { mapOptional } from '@d-fischer/shared-utils'; import { extractUserId } from '@twurple/common'; /** @internal */ export function createDropsEntitlementQuery(filters, alwaysApp) { return { user_id: alwaysApp ? mapOptional(filters.user, extractUserId) : undefined, game_id: filters.gameId, fulfillment_status: filters.fulfillmentStatus, }; } /** @internal */ export function createDropsEntitlementUpdateBody(ids, fulfillmentStatus) { return { fulfillment_status: fulfillmentStatus, entitlement_ids: ids, }; }