Path: blob/master/node_modules/@bochilteam/scraper/lib/cjs/others/idff.js
1126 views
"use strict";1var __importDefault = (this && this.__importDefault) || function (mod) {2return (mod && mod.__esModule) ? mod : { "default": mod };3};4Object.defineProperty(exports, "__esModule", { value: true });5const got_1 = __importDefault(require("got"));6const utils_js_1 = require("../utils.js");7async function nameFreeFire(id) {8id = id.toString();9const json = await (0, got_1.default)('https://api.duniagames.co.id/api/transaction/v1/top-up/inquiry/store', {10headers: {11accept: 'application/json, text/plain, */*',12'content-type': 'application/json',13origin: 'https://duniagames.co.id',14referer: 'https://duniagames.co.id/',15'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36'16},17body: JSON.stringify({18catalogId: 66,19gameId: id,20itemId: 11,21paymentId: 750,22productId: 3,23product_ref: 'AE',24product_ref_denom: 'AE'25}),26method: 'POST'27}).json();28if (json.status.message !== 'success')29throw new utils_js_1.ScraperError(`Can't get nameFreeFire for id ${id}\n${JSON.stringify(json, null, 2)}`);30return {31id: json.data.gameId,32username: json.data.userNameGame33};34}35exports.default = nameFreeFire;36//# sourceMappingURL=idff.js.map3738