Hiveage node api client
npm install hiveageconsole
$ npm install hiveage
`
Usage
First we need to create a HiveageAPI Object:
`js
//importing Hiveage Package
const Hiveage = require("hiveage");
// Create Hiveage object using domain, API key
const HiveageAPI = new Hiveage("<< DOMAIN >>", "<< API KEY >>");
// Example : new Hiveage('john','xyzabcsded')
`
Thereafter, we can access the available methods of the HiveageAPI object:
`js
// Creating new connection
HiveageAPI.createConnection(data)
.then((response) => {
console.log(response);
})
.catch((err) => {
console.log(err);
});
`
Methods
$3
Network
- createConnection(data)
- retriveConnection(hash)
- updateConnection(hash, data)
- listAllConnections(params)
- deleteConnection(hash)
- invoiceActivities(hash, params)
- estimateActivities(hash, params)
- recurringInvoice(hash, params)
Contacts
- createContact(hash, data)
- retriveContact(hash, id)
- updateContact(hash, id, data)
- listAllContacts(hash, params)
- deleteContact(hash, id)
Invoice
- createInvoice(data)
- retriveInvoice(hash)
- updateInvoice(hash, data)
- listAllInvoices(params)
- sendInvoice(hash, data)
- sendReminder(hash, data)
- deleteInvoice(hash)
Estimates
- createEstimate(data)
- retriveEstimate(hash)
- updateEstimate(hash, data)
- listAllEstimates(params)
- sendEstimates(hash, data)
- deleteEstimate(hash)
Payment
- createPayment(hash, data)
- retrivePayment(hash, id)
- updatePayment(hash, id, data)
- listAllPayments(hash, params)
- deletePayment(hash, id)
Expense
- createExpense(data)
- retriveExpense(params)
- updateExpense(id,data)
- listAllExpenses(id)
- deleteExpense(id)
EntryExpense
- createEntryExpense(data)
- retriveEntryExpense(id)
- updateEntryExpense(id,data)
- listAllEntryExpense(data)
- deleteEntryExpense(id)
Trip
- createTrip(data)
- retriveTrip(id)
- updateTrip(id, data)
- listAllTrips(params)
- deleteTrip(id)
EntryMileage
- createEntryMileage(data)
- retriveEntryMileage(id)
- updateEntryMileage(id, data)
- listAllEntryMileage(params)
- deleteEntryMileage(id)
Task
- createTask(data)
- retriveTask(id)
- updateTask(id, data)
- listAllTasks(params)
- deleteTask(id)
Item
- createItem(data)
- retriveItem(id)
- updateItem(id, data)
- listAllItems(params)
- deleteItem(id)
Notes :
- hash : must field
- id : must field
- data : must field
- should be a JSON object
- params : optional field
- should be a JSON object
- Example :-
`js
params = { "per_page":20, "page":1, "order":"desc" }
``