bungie-net-core
Version:
An easy way to interact with the Bungie.net API
94 lines (93 loc) • 3.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.applyMissingPartnerOffersWithoutClaim = applyMissingPartnerOffersWithoutClaim;
exports.claimPartnerOffer = claimPartnerOffer;
exports.forceDropsRepair = forceDropsRepair;
exports.getBungieRewardsForPlatformUser = getBungieRewardsForPlatformUser;
exports.getBungieRewardsForUser = getBungieRewardsForUser;
exports.getBungieRewardsList = getBungieRewardsList;
exports.getPartnerOfferSkuHistory = getPartnerOfferSkuHistory;
exports.getPartnerRewardHistory = getPartnerRewardHistory;
async function forceDropsRepair(http) {
const baseUrl = `https://www.bungie.net/Platform/Tokens/Partner/ForceDropsRepair/`;
const searchParams = undefined;
return await http({
method: 'POST',
baseUrl,
searchParams,
body: undefined
});
}
async function claimPartnerOffer(http, body) {
const baseUrl = `https://www.bungie.net/Platform/Tokens/Partner/ClaimOffer/`;
const searchParams = undefined;
return await http({
method: 'POST',
baseUrl,
searchParams,
body,
contentType: 'application/json'
});
}
async function applyMissingPartnerOffersWithoutClaim(http, params) {
const baseUrl = `https://www.bungie.net/Platform/Tokens/Partner/ApplyMissingOffers/${params.partnerApplicationId}/${params.targetBnetMembershipId}/`;
const searchParams = undefined;
return await http({
method: 'POST',
baseUrl,
searchParams,
body: undefined
});
}
async function getPartnerOfferSkuHistory(http, params) {
const baseUrl = `https://www.bungie.net/Platform/Tokens/Partner/History/${params.partnerApplicationId}/${params.targetBnetMembershipId}/`;
const searchParams = undefined;
return await http({
method: 'GET',
baseUrl,
searchParams,
body: undefined
});
}
async function getPartnerRewardHistory(http, params) {
const baseUrl = `https://www.bungie.net/Platform/Tokens/Partner/History/${params.targetBnetMembershipId}/Application/${params.partnerApplicationId}/`;
const searchParams = undefined;
return await http({
method: 'GET',
baseUrl,
searchParams,
body: undefined
});
}
async function getBungieRewardsForUser(http, params) {
const baseUrl = `https://www.bungie.net/Platform/Tokens/Rewards/GetRewardsForUser/${params.membershipId}/`;
const searchParams = undefined;
return await http({
method: 'GET',
baseUrl,
searchParams,
body: undefined
});
}
async function getBungieRewardsForPlatformUser(http, params) {
const baseUrl = `https://www.bungie.net/Platform/Tokens/Rewards/GetRewardsForPlatformUser/${params.membershipId}/${params.membershipType}/`;
const searchParams = undefined;
return await http({
method: 'GET',
baseUrl,
searchParams,
body: undefined
});
}
async function getBungieRewardsList(http) {
const baseUrl = `https://www.bungie.net/Platform/Tokens/Rewards/BungieRewards/`;
const searchParams = undefined;
return await http({
method: 'GET',
baseUrl,
searchParams,
body: undefined
});
}