Awesome
node-karma
An API wrapper for the anti-waste app Karma
Installation
yarn add node-karma
Usage
const Karma = require("node-karma");
const karma = new Karma({
email: "",
password: "",
});
Methods
Login
await karma.login();
Get profile
await karma.getProfile();
Get nearby locations
await karma.getLocations({ latitude, longitude }, radius = 5000);
Get nearby sales
await karma.getSales({ latitude, longitude }, radius = 5000);
Get nearby items
await karma.getItems({ latitude, longitude }, radius = 5000);
Get nearby sale items properties
await karma.getSaleItemsProperties({ latitude, longitude }, radius = 5000);
Get items by location
await karma.getItemsByLocation(locationId);
Get sales by location
await karma.getSalesByLocation(locationId);
Get sale items properties by location
await karma.getSaleItemsPropertiesByLocation(locationId);