goodwaygroup / intacct-api Goto Github PK
View Code? Open in Web Editor NEWNode.js library to interact with Intacct's XML API
License: MIT License
Node.js library to interact with Intacct's XML API
License: MIT License
this.log(level, message)
when following the Intacct API to query all objects (e.g. IntacctAPI.inspect({object: '*'}), the '*' does not seem to work. Is there a way to query all objects when using your module or to add support for the '*' query? Also relevant to the inspect method, can you inspect with details via this api? There is an example of this in intacct's documentation, but I am unsure how to achieve this via intacct-api module. Thanks for your work!
Question since I am just beginning with these API's, but why are you parsing the response XML to JSON and not just setting the returnFormat to JSON?
This readyByQuery
call:
const projectControlFunc = IntacctApi.readByQuery({
object: "PROJECT",
fields: "PROJECTID,RSEGMENT,NAME",
query: "RSEGMENT IS NOT NULL",
pagesize: 2
});
Returns 2 projects and the projects are accessible at the locator projectControlFunc.data.project
:
ControlFunction {
name: 'readByQuery',
parse: [Function: read],
parameters:
{ query: 'RSEGMENT IS NOT NULL',
fields: 'PROJECTID,RSEGMENT,NAME',
pagesize: 2,
returnFormat: 'xml',
docparid: '',
object: 'PROJECT' },
controlId: 'f4e487f0-0a3d-11e7-8bc2-7dc14e8dce03',
result:
{ status: 'success',
function: 'readByQuery',
controlid: 'f4e487f0-0a3d-11e7-8bc2-7dc14e8dce03' },
data:
{ '$':
{ listtype: 'project',
count: '2',
totalcount: '3075',
numremaining: '3073',
resultId: '7765623338WMp6r8CoA4oAAAdYmU4AAAAC5' },
project: [ [Object], [Object] ] } }
This subsequent readMore
call:
const nextFunc = IntacctApi.readMore({object: 'PROJECT'});
Only returns 1 project (expected the same pagesize of 2) and the locator of the project data is now nested in an array like projectControlFunc.data[0].project
:
ControlFunction {
name: 'readMore',
parse: null,
parameters: { object: 'PROJECT' },
controlId: 'f5c59920-0a3d-11e7-8bc2-7dc14e8dce03',
result:
{ status: 'success',
function: 'readMore',
controlid: 'f5c59920-0a3d-11e7-8bc2-7dc14e8dce03' },
data: [ { '$': [Object], project: [Object] } ] }
Is this expected? Am I using it properly?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.