Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MR414N-ID
GitHub Repository: MR414N-ID/botku2
Path: blob/master/node_modules/@bochilteam/scraper/lib/cjs/others/idff.js
1126 views
1
"use strict";
2
var __importDefault = (this && this.__importDefault) || function (mod) {
3
return (mod && mod.__esModule) ? mod : { "default": mod };
4
};
5
Object.defineProperty(exports, "__esModule", { value: true });
6
const got_1 = __importDefault(require("got"));
7
const utils_js_1 = require("../utils.js");
8
async function nameFreeFire(id) {
9
id = id.toString();
10
const json = await (0, got_1.default)('https://api.duniagames.co.id/api/transaction/v1/top-up/inquiry/store', {
11
headers: {
12
accept: 'application/json, text/plain, */*',
13
'content-type': 'application/json',
14
origin: 'https://duniagames.co.id',
15
referer: 'https://duniagames.co.id/',
16
'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'
17
},
18
body: JSON.stringify({
19
catalogId: 66,
20
gameId: id,
21
itemId: 11,
22
paymentId: 750,
23
productId: 3,
24
product_ref: 'AE',
25
product_ref_denom: 'AE'
26
}),
27
method: 'POST'
28
}).json();
29
if (json.status.message !== 'success')
30
throw new utils_js_1.ScraperError(`Can't get nameFreeFire for id ${id}\n${JSON.stringify(json, null, 2)}`);
31
return {
32
id: json.data.gameId,
33
username: json.data.userNameGame
34
};
35
}
36
exports.default = nameFreeFire;
37
//# sourceMappingURL=idff.js.map
38