Trakteer scraper for Trakteer website to get information account with cookies. this lib usefull if you have a community and want to get information about your donatur, and notificate them if they donate to you.
- Get Donate Balance
- Get Donatur Data
- Get Donate History
- Get Supporters Data
- Discord Webhook Notification
- Get Leaderboard Data
- Clone this repository
- type
npm install
in your terminal - type
npm run build
in your terminal - import this lib to your project in
dist/index.js
const Trakteer = require('../dist').default;
const xsrfToken = 'insert xsrf token here';
const trakteerSession = 'insert trakteer session here';
const trakteer = new Trakteer();
trakteer.init(xsrfToken, trakteerSession);
(async () => {
const saldo = await trakteer.getSaldo();
console.log(saldo);
const history = await trakteer.getHistory();
console.log(history);
const data = await trakteer.getDonaturData();
console.log(data);
const donaturDetail = await trakteer.getOrderDetail('insert order id here');
console.log(donaturDetail);
const leaderboard = await trakteer.getLeaderboard();
console.log(leaderboard);
const supporters = await trakteer.getSupporter();
console.log(supporters);
const WEBHOOK_URL = 'insert webhook url here';
const TIME_INTERVAL = 60_000; // 1 minute
trakteer.webhookNotification(true, WEBHOOK_URL, TIME_INTERVAL);
})();