biz2credit-harshit-party-invitation
v1.0.2
Published
Coding Challenge
Downloads
7
Readme
Require
const PartyInvitation = require('biz2credit-harshit-party-invitation');
Usage
const PartyInvitation = require('biz2credit-harshit-party-invitation');
const invitiationInstance = new PartyInvitation();
// To get filtered results with default configuration
// (100 KM range from { latitude: "53.339428", longitude: "-6.257664" } in Ascending order and sorted by user_id)
invitiationInstance.getCustomerListWithDefaultData().then(result => {
console.log(result);
}).catch(e => {
console.log(e);
});
// To get filtered results with custom configuration
const defaultConfig = {
'sourceCoordinates': { latitude: "53.339428", longitude: "-6.257664" },
'sortingLogic': 'ASC',
'sortOnProperty': 'user_id',
'filePath': './static/Customers_Assignment_Coding_Challenge.txt',
'range': 100,
'rangeUnit': 'KM'
};
invitiationInstance.getCustomerListWithOptions(options).then(result => {
console.log(result);
}).catch(e => {
console.log(e);
});