UNPKG

bungie-net-core

Version:

An easy way to interact with the Bungie.net API

29 lines (28 loc) 902 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getApplicationApiUsage = getApplicationApiUsage; exports.getBungieApplications = getBungieApplications; async function getApplicationApiUsage(http, params) { const baseUrl = `https://www.bungie.net/Platform/App/ApiUsage/${params.applicationId}/`; const searchParams = new URLSearchParams(); if (params.end !== undefined) searchParams.append('end', params.end.toString()); if (params.start !== undefined) searchParams.append('start', params.start.toString()); return await http({ method: 'GET', baseUrl, searchParams, body: undefined }); } async function getBungieApplications(http) { const baseUrl = `https://www.bungie.net/Platform/App/FirstParty/`; const searchParams = undefined; return await http({ method: 'GET', baseUrl, searchParams, body: undefined }); }