jarqvi-sdk
v25.0.0
Published
OpenAPI client for
Downloads
10
Maintainers
Readme
@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.git
Second, run one of the following commands depending on your operating system:
windows:
npm run config:cmd
Linux/Mac:
npm run config:bash
Third, run one of the following commands for installing packages:
npm install
Fourth, run one of the following commands for build project:
npm run prepare
Publish 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 publish
Usage
Note: The type argument in the package.json file must be equal to commonjs.
npm install @liara/sdk
TypeScript 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));