piano-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.13.0 • Public • Published

Piano (The digital business platform) SDK for Node.js

Overview

This is an unofficial SDK for Piano API. So please do not contact Piano support with questions or concerns about this SDK. For any issues, please make an issue on GitHub.

Note: This package is incomplete and experimental. It supports only a few APIs for the moment. Please use it with the utmost care and attention.

Installation

npm install piano-sdk

Sending a Request

You must have API Token (apiToken) and Application ID (aid) to send a requests.

Also, you must pick an API environment from the followings (See "Environments" section on this page for details):

  • us
  • au - Australia
  • ap - Asia-Pacific
  • eu - Europe
  • sandbox - Sandbox

The following example demonstrates fetching a user data which has uid: abcdefg:

import Piano from "piano-sdk"

// Initialize SDK with your API Token and Application Id
const piano = new Piano({
  aid: 'xxxxxxxxxx', // Your Application ID
  apiToken: '', // Your API Token
  environment: 'us', // API environment
});

(async () => {
  try {
    const result = await piano.publisher.user.get({ uid: "abcdefg" });
    console.log(result);
  } catch (e) {
    console.log(e);
  }
})();

Or if you want to update that user:

(async () => {
  try {
    const result = await piano.publisher.user.update({
      uid: "abcdefg",
      email: "foobar@example.com",
      first_name: "Foo"
    });
  } catch (e) {
    console.log(e);
  }
})();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.13.0
    81
    • latest

Version History

Package Sidebar

Install

npm i piano-sdk

Weekly Downloads

111

Version

0.13.0

License

MIT

Unpacked Size

59.1 kB

Total Files

81

Last publish

Collaborators

  • 5t111111
  • y-nagao