kotak-cloud
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

KotakCloud SDK

This is the Official Browser client/library for kotak.cloud API.

Installation

To install kotakcloud in a node project:

npm install --save kotak-cloud

Usage

const { KotakCloudClient } = require("kotak-cloud");

const kotakCloud = new KotakCloudClient();

Authentication

Use kotakcloud auth services for get your token.

Register

const { user, token, error } = await kotakCloud.register({
  firstName: "Ega",
  lastName: "Radiegtya",
  email: "user@gmail.com",
  password: "password",
});

Login

const { user, token, error } = await kotakCloud.login({
  email: "user@gmail.com",
  password: "password",
});

User

const { user, error } = await kotakCloud.user();

Logout

const { user, token, error } = await kotakCloud.logout();

Files

Upload Files

async function handleFileSelect(event) {
  const files = event.target.files;
  await kotakCloud.uploadFiles(
    files, // files to upload
    "", // folder parent
    console.log // onProgress
  );
}

Create Folder

const { data, error } = await kotakCloud.createFolder({ name, parentId });

Get Files

const { data, total, error } = await kotakCloud.getFiles();

Get Breadcrumbs

const breadcrumbs = await kotakCloud.getBreadCrumbs("622e89eb384d39937fd79777");

Delete files

const { data, errors } = await kotakCloud.deleteFiles(files);

Package Sidebar

Install

npm i kotak-cloud

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

666 kB

Total Files

41

Last publish

Collaborators

  • kotakcloud