Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

v0.5.0

Compare
Choose a tag to compare
@trinhhunganh trinhhunganh released this 13 Dec 09:22
· 268 commits to master since this release

New functions / features

Completely changed parameters of all modules' constructors and functions to single object parameters

Example: Record module

  • Previous version :
  const kintone = require('@kintone/kintone-js-sdk');

  const auth = new kintone.Auth();
  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';
  auth.setPasswordAuth(username, password);

  // Define connection that included auth
  const connection = new kintone.Connection('YOUR_DOMAIN', auth, 'YOUR_GUEST_SPACE_ID');

  const kintoneRecord = new kintone.Record(connection);
  const app = YOUR_APP_ID;
  const id = YOUR_RECORD_ID;
  kintoneRecord.getRecord(app, id).then((rsp) => {
    console.log(rsp);
  }).catch((err) => {
    console.log(err);
  });
  • v0.5.0 version:
  const kintone = require('@kintone/kintone-js-sdk');

  // Define Authentication object
  const kintoneAuth = new kintone.Auth();
  const paramsAuth = {
      username: 'YOUR_USER_NAME',
      password: 'YOUR_PASSWORD'
  };
  kintoneAuth.setPasswordAuth(paramsAuth);

  const paramsConnection = {
      domain: 'YOUR_DOMAIN',
      auth: kintoneAuth,
      guestSpaceID: GUEST_SPACE_ID
  };
  const connection = new kintone.Connection(paramsConnection);
  const kintoneRecord = new kintone.Record({connection});

  const getRecordParams = {
     app: YOUR_APP_ID,
     id: YOUR_RECORD_ID
  }
  kintoneRecord.getRecord(getRecordParams).then((rsp) => {
    console.log(rsp);
  }).catch((err) => {
    console.log(err);
  });

Updates / bug fixes