Node.js api wrapper for Clang's SOAP api
npm install clang

node-clang
==========
Using Clang's SOAP api? Here's a module that will make your life easier. A Node.js api that wraps Clang's SOAP api. You don't need to bother with the extra resource callbacks that some methods like customer_getByObject require. Internally these resources are polled and the final dataset is returned in the callback.
I had a ton of fun building this. Node.js rocks!
``javascript`
npm install clang
in the clang.request params. Internally all pages will be fetched, normalized and concatenated into one array containing the results of all pages.
- The default platform is secure, but you can now configure it to be login.
`javascript
const clang = new Clang({
uuid: '12345678-1234-1234-1234-123456781234',
platform: 'login'
})
`Example
`javascript
const Clang = require('clang')
const clang = new Clang({
uuid: '12345678-1234-1234-1234-123456781234'
})clang.request('group_getMembers', {
groupId: 2
}, (err, result) => {
console.log(err, result)
})
// Paging using the special parameters _size and _offset. Defaults are 50 and 0
clang.request('customer_getAll', {
_size: 10
}, (err, result) => {
console.log(err, result)
})
// Let the clang request do the paging for you and get all results back
clang.request('customer_getAll', {
_allPages: true
}, (err, result) => {
console.log(err, result)
})
``https://secure.myclang.com/app/api/soap/public/index.php?wsdl