1.0.1 • Published 2 years ago

colab-sdk v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

keynamedefaulttypedescription
endpointhttps://dev-api-tego099.bcms.techstringcolab api endpoint
clienthttps://dev-tego099.bcms.techstringcoblab fe endpoint
elementcolab-injectionstringinjected element