insomnia-plugin-valorant
Version:
Adds template tags to Insomnia with Valorant data
19 lines • 774 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEntitlement = void 0;
const node_fetch_1 = __importDefault(require("node-fetch"));
async function getEntitlement(accessToken) {
return (await (await (0, node_fetch_1.default)('https://entitlements.auth.riotgames.com/api/token/v1', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + accessToken,
'Content-Type': 'application/json',
'User-Agent': ''
},
})).json())['entitlements_token'];
}
exports.getEntitlement = getEntitlement;
//# sourceMappingURL=get-entitlement.js.map