Automation API for kitabisa.com website with Puppeteer. Read more on documentation page
For example we used getBalance for get latest balance and check is available for donations. and
next we grab random getCampaign with categories on it. next we run async with for loop to run
makeDonation method. Simple right?

// ES6
import KitaBisa from "./dist/kitabisa";
const kitaBisa = new KitaBisa();
// ES5
const KitaBisa = require("./dist/kitabisa");
const kitaBisa = new KitaBisa();
// async await
await kitaBisa.initialize({
email: process.env.EMAIL,
password: process.env.PASSWD
});
// promise
kitaBisa.initialize({
email: "YOUR EMAIL/PHONE",
password: "YOUR PASSWORD"
}).then(function() {
// do after login
});
// async await
const balance = await kitaBisa.getBalance();
// async await
const campaigns = await kitaBisa.getCampaign([
KitaBisa.categories.BENCANA_ALAM,
KitaBisa.categories.RUMAH_IBADAH
]);
// example result
[ { title: 'Darurat! Alirkan Air Bersih untuk Yogyakarta ',
url: 'https://kitabisa.com/atasikrisisairgunkid',
tumbnailUrl:
'https://img.kitabisa.cc/size/368x196/1484b40a-9b7e-49a9-8b5a-5b3cb0339552.jpg',
campaigner: 'Aksi Cepat Tanggap DIY',
isOrganitaion: true,
isVerified: true,
dayLeft: 56,
total: 44538524 } ]
// async await
const statistic = await kitaBisa.getUserStatistic();
Create donation action by fill some options and you will get result and screenshot for evidance.
await kitaBisa.makeDonation({
url: 'https://m.kitabisa.com/daruratkekeringan',
amount: 1000,
comment: "Semoga bermanfaat",
isAnonymous: true
}).then((result) => {
// do something with result
}).catch(console.error)
// example result
{ title: 'DARURAT AIR BERSIH DI CIAYUMAJAKUNING !',
duration: 14.104,
url: 'https://m.kitabisa.com/daruratkekeringan',
amount: 1000,
isAnonymous: true,
comment: 'Semoga bermanfaat',
screenshot:
'PATH_TO/screenshot-donation-darurat-air-bersih-di-ciayumajakuning--1564070240601.png' }
Generated using TypeDoc