1.0.5 • Published 5 years ago

kingdee-k3-webapi v1.0.5

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Kingdee K3 Cloud Web API

The Kingdee K3 web api library exported as Node.js modules.

Installation

###Using npm:

$ npm i -g kingdee-k3-webapi
$ npm i --save kingdee-k3-webapi

###In Node.js:

var K3CloudApiClient = require('kingdee-k3-webapi');

var client = new K3CloudApiClient('http://your.k3.site');

client.getDataCenter()
  .then((data) => {
    console.log(data);
  });

// Log on to Kingdee K3 Cloud using a 3rd party app account.
client.login('dbId', 'user', 'appId', 'appSecret', lang)
  .then((data) => {
    console.log('Log on to K3 Cloud success.');
      
    if (data.LoginResultType == 1) {
      client.view('BD_MATERIAL', {
        // CreateOrgId: 1,
        Number: '01.01.01.001'
        // Id: ''
      })
        .then((data) => {
          console.log(data);

          client.view('ORG_Organizations', {
            Id: data.Result.Result.CreateOrgId_Id
          })
            .then((data) => {
              console.log(data);
            })
            .catch((err) => {
              console.log('view material error:' + err.message);
            });
        })
        .catch((err) => {
          console.log('view material error:' + err.message);
        });
    }
  })
  .catch((err) => {
    console.log('Log on to K3 Cloud failed.');
    console.log(err.message);
  });

See the package source for more details.

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago