npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

clang

v1.0.9

Published

Node.js api wrapper for Clang's SOAP api

Downloads

127

Readme

Build Status npm version

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!

Install

npm install clang

1.0 breaking changes

  • instantiation without new keyword is not possible anymore.
  • config.normalizeOptionFields does not default to true anymore. It doesn't default at all.
  • config.logRequests is renamed to config.logPayload and also logs raw xml output
  • customer_getById and similar methods that would normally output an object have always been wrapped in an array by this module. From 1.0 on when single objects are expected they are no longer wrapped in an array. methods that would normally output an array like customer_getAll, but output just one because of the available data (and/or filter set) continue to be wrapped in an array.

1.0 new features

  • You can supply _allPages=true 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.
const clang = new Clang({
  uuid: '12345678-1234-1234-1234-123456781234',
  platform: 'login'
})

Example

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)
})

WSDL

This is the underlying WSDL document.

https://secure.myclang.com/app/api/soap/public/index.php?wsdl