UNPKG

quria

Version:

A user-friendly Destiny 2 API Wrapper written with TypeScript and approved by -Axis Minds- Oryx.

59 lines (55 loc) 4.09 kB
import { ITokens, APIResponse, PartnerOfferSkuHistoryResponse, PartnerRewardHistoryResponse, BungieRewardDisplay, BungieMembershipType } from "../../types"; export declare class Tokens { private url; private headers; constructor(url: string, headers: Record<string, string>); /** * Twitch Drops self-repair function - scans twitch for drops not marked as fulfilled and resyncs them. * @returns Twitch Drops self-repair function - scans twitch for drops not marked as fulfilled and resyncs them. */ ForceDropsRepair(tokens?: ITokens): Promise<APIResponse<boolean>>; /** * Claim a partner offer as the authenticated user. * @returns Claim a partner offer as the authenticated user. */ ClaimPartnerOffer(PartnerOfferId: string, BungieNetMembershipId: string, TransactionId: string, tokens?: ITokens): Promise<APIResponse<boolean>>; /** * Apply a partner offer to the targeted user. This endpoint does not claim a new offer, but any already claimed offers will be applied to the game if not already. * @param partnerApplicationId The partner application identifier. * @param targetBnetMembershipId The bungie.net user to apply missing offers to. If not self, elevated permissions are required. * @returns Apply a partner offer to the targeted user. This endpoint does not claim a new offer, but any already claimed offers will be applied to the game if not already. */ ApplyMissingPartnerOffersWithoutClaim(partnerApplicationId: number, targetBnetMembershipId: string, tokens?: ITokens): Promise<APIResponse<boolean>>; /** * Returns the partner sku and offer history of the targeted user. Elevated permissions are required to see users that are not yourself. * @param partnerApplicationId The partner application identifier. * @param targetBnetMembershipId The bungie.net user to apply missing offers to. If not self, elevated permissions are required. * @returns Returns the partner sku and offer history of the targeted user. Elevated permissions are required to see users that are not yourself. */ GetPartnerOfferSkuHistory(partnerApplicationId: number, targetBnetMembershipId: string, tokens?: ITokens): Promise<APIResponse<PartnerOfferSkuHistoryResponse[]>>; /** * Returns the partner rewards history of the targeted user, both partner offers and Twitch drops. * @param partnerApplicationId The partner application identifier. * @param targetBnetMembershipId The bungie.net user to return reward history for. * @returns Returns the partner rewards history of the targeted user, both partner offers and Twitch drops. */ GetPartnerRewardHistory(partnerApplicationId: number, targetBnetMembershipId: string, tokens?: ITokens): Promise<APIResponse<PartnerRewardHistoryResponse>>; /** * Returns the bungie rewards for the targeted user. * @param membershipId bungie.net user membershipId for requested user rewards. If not self, elevated permissions are required. * @returns Returns the bungie rewards for the targeted user. */ GetBungieRewardsForUser(membershipId: string, tokens?: ITokens): Promise<APIResponse<Record<string, BungieRewardDisplay>>>; /** * Returns the bungie rewards for the targeted user when a platform membership Id and Type are used. * @param membershipId users platform membershipId for requested user rewards. If not self, elevated permissions are required. * @param membershipType The target Destiny 2 membership type. * @returns Returns the bungie rewards for the targeted user when a platform membership Id and Type are used. */ GetBungieRewardsForPlatformUser(membershipId: string, membershipType: BungieMembershipType, tokens?: ITokens): Promise<APIResponse<Record<string, BungieRewardDisplay>>>; /** * Returns a list of the current bungie rewards * @returns Returns a list of the current bungie rewards */ GetBungieRewardsList(tokens?: ITokens): Promise<APIResponse<Record<string, BungieRewardDisplay>>>; }