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

1.0.1 • Public • Published

Colab sdk

A simple way to connection to colab from frontend

Installation

<!-- you will need to create this tag for your html project -->
<body>
    <!-- Need this below id  or change it with -->
    <div id="colab-injection">
</body>
import { ColabSDK } from "colab-sdk";

const colabAppId = "123";

const colabTenantId = "123";

/**
 * Your getcode implementation
 * @return {string} // generated code by using sdk
 */
async function GetCode() {
	return axios.get("example.endpoint/colab/code").then((res) => res.data);
}
const options = {};
ColabSDK(colabAppId, colabTenantId, callback, options).setup();
// without option
ColabSDK(colabAppId, colabTenantId, callback).setup();

SDK Options

keyname default type description
endpoint https://dev-api-tego099.bcms.tech string colab api endpoint
client https://dev-tego099.bcms.tech string coblab fe endpoint
element colab-injection string injected element

Readme

Keywords

none

Package Sidebar

Install

npm i colab-sdk

Weekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

9.09 kB

Total Files

5

Last publish

Collaborators

  • hotrungnhan