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