UNPKG

bungie-net-core

Version:

An easy way to interact with the Bungie.net API

50 lines (49 loc) 1.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAvailableLocales = getAvailableLocales; exports.getCommonSettings = getCommonSettings; exports.getGlobalAlerts = getGlobalAlerts; exports.getUserSystemOverrides = getUserSystemOverrides; async function getAvailableLocales(http) { const baseUrl = `https://www.bungie.net/Platform/GetAvailableLocales/`; const searchParams = undefined; return await http({ method: 'GET', baseUrl, searchParams, body: undefined }); } async function getCommonSettings(http) { const baseUrl = `https://www.bungie.net/Platform/Settings/`; const searchParams = undefined; return await http({ method: 'GET', baseUrl, searchParams, body: undefined }); } async function getUserSystemOverrides(http) { const baseUrl = `https://www.bungie.net/Platform/UserSystemOverrides/`; const searchParams = undefined; return await http({ method: 'GET', baseUrl, searchParams, body: undefined }); } async function getGlobalAlerts(http, params) { const baseUrl = `https://www.bungie.net/Platform/GlobalAlerts/`; const searchParams = new URLSearchParams(); if (params.includestreaming !== undefined) searchParams.append('includestreaming', params.includestreaming.toString()); return await http({ method: 'GET', baseUrl, searchParams, body: undefined }); }