25.0.0 • Published 2 years ago
jarqvi-sdk v25.0.0
@liara/sdk
The liara sdk, with TypeScript/JavaScript languages for client that utilizes fetch-api.
Development
Note: You must have Node and NPM, Docker, Docker Compose installed on the system.
First, clone the project with the following command:
git clone https://github.com/liara-cloud/node-sdk.gitSecond, run one of the following commands depending on your operating system:
windows:
npm run config:cmdLinux/Mac:
npm run config:bashThird, run one of the following commands for installing packages:
npm installFourth, run one of the following commands for build project:
npm run preparePublish new version
To publish the package, first increase the version of the package in the package.json file, then publish the package with the following command:
npm publishUsage
Note: The type argument in the package.json file must be equal to commonjs.
npm install @liara/sdkTypeScript example:
import liaraSDK from '@liara/sdk';
const { paas, dbaas, dns, mail, objectStorage } = liaraSDK('your-api-token');
paas.AppsApi.getApps()
.then((res) => console.log(res))
.catch((err) => console.log(err));JavaScript example:
const { default: liaraSDK } = require('@liara/sdk');
const { paas, dbaas, dns, mail, objectStorage } = liaraSDK('your-api-token');
paas.AppsApi.getApps()
.then((res) => console.log(res))
.catch((err) => console.log(err));