colab-sdk
v1.0.1
Published
A simple way to connection to colab from frontend
Downloads
3
Readme
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 |