Skip to content

shanestillwell/stuller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stuller API

Install

npm install stuller

Available Methods

  • Most methods can take either an Array, String, or Number
  • Calling send(callback) actually fires off the request to Stuller
  • The callback function is given two arguments (err, response)
    • error any error thrown by Equella, soap, or xml2js
    • response array of JSON objects

FetchItemInfo

var Stuller = require('stuller');

var stuller = new Stuller({
                apiUrl: APIURL,
                token: TOKEN
              });

stuller
  .FetchItemInfo(['123:A', '123:B'])
  .send(function(err, response) {
    console.log(response);
});

FetchItemInfoByItemID

var Stuller = require('stuller');

var stuller = new Stuller({
                apiUrl: APIURL,
                token: TOKEN
              });

stuller.FetchItemInfoByItemID(123).send(function(err, response) {
    console.log(response);
    });

FetchItemInfoBySeries

var Stuller = require('stuller');

var stuller = new Stuller({
                apiUrl: APIURL,
                token: TOKEN
              });

stuller.FetchItemInfoBySeries(['2222', '234233']).send(function(err, response) {
    console.log(response);
    });

FetchItemPriceOnHand

var Stuller = require('stuller');

var stuller = new Stuller({
                apiUrl: APIURL,
                token: TOKEN
              });

stuller.FetchItemPriceOnHand(['123:A', '123:B']).send(function(err, response) {
    console.log(response);
    });

FetchItemPriceOnHandByItemID

var Stuller = require('stuller');

var stuller = new Stuller({
                apiUrl: APIURL,
                token: TOKEN
              });

stuller.FetchItemPriceOnHandByItemID([123, 123]).send(function(err, response) {
    console.log(response);
    });

FetchItemPriceOnHandBySeries

var Stuller = require('stuller');

var stuller = new Stuller({
                apiUrl: APIURL,
                token: TOKEN
              });

stuller.FetchItemPriceOnHandBySeries([123, 123]).send(function(err, response) {
    console.log(response);
    });

FetchItems

var Stuller = require('stuller');

var stuller = new Stuller({
                apiUrl: APIURL,
                token: TOKEN
              });

stuller.FetchItems().send(function(err, response) {
    console.log(response);
    });

FetchRTWItems

var Stuller = require('stuller');

var stuller = new Stuller({
                apiUrl: APIURL,
                token: TOKEN
              });

stuller.FetchRTWItems(1).send(function(err, response) {
    console.log(response);
    });

About

Interact with Stuller API and transform that lowly XML into JSON.

Resources

Stars

Watchers

Forks

Packages

No packages published