vs-qb-helper
v1.0.1
Published
qbHelper is a Javascript library that simplifies interaction with the [Quickbase JSON API](https://developer.quickbase.com/)
Downloads
4
Readme
vs-qb-helper
qbHelper is a Javascript library that simplifies interaction with the Quickbase JSON API
Installation
Use npm to install vs-qb-helper
npm install vs-qb-helperUsage
Initialization of vs-qb-helper
const Quickbase = require("vs-qb-helper");
const qb = new Quickbase({
realm: "xxxxxx.quickbase.com", // Required
userToken: "",
requestDelay: 10, // Optional: Default is 10
retryLimit: 3, // Optional: Default is 3
requestFailed: (err, request) => { // Optional
console.log("err: ", err)
console.log("request: ", JSON.parse(request.options.body))
}
});Quickbase Documentation: runQuery
await qb.runQuery({
tableId: 'xxxxxxxxx',
where: "{'3'.GT.'0'}",
select: [ 3, 6, 7 ],
sortBy: [{
fieldId: 3,
order: 'ASC'
}],
groupBy: [{
fieldId: 6,
by: 'same-value'
}],
options: {
skip: 200,
top: 100
}
});Quick Base Documentation: upsert
await qb.upsertRecords({
data: [{
"6": {
value: 'Record 1 Field 6'
},
"7": {
value: 'Record 1 Field 7'
}
}, {
"6": {
value: 'Record 2 Field 6'
}
"7": {
value: 'Record 2 Field 7'
}
}],
mergeFieldId: 6,
fieldsToReturn: [ 6, 7 ]
});Quick Base Documentation: getAppTables
await qb.getAppTables({
appId: 'xxxxxxxxx'
});Quick Base Documentation: deleteRecords
await qb.deleteRecords({
tableId: 'xxxxxxxxx',
where: "{'3'.GT.'0'}"
});Quick Base Documentation: runReport
await qb.runReport({
tableId: 'xxxxxxxxx',
reportId: 1,
options: {
skip: 200,
top: 100
}
});Quick Base Documentation: getReport
await qb.getReport({
tableId: 'xxxxxxxxx',
reportId: 1
});Quick Base Documentation: getFields
await qb.getFields({
tableId: 'xxxxxxxxx',
});