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