After installing the npm package, load the sdk using the below snippet.
Copy
Ask AI
const sdk = SmokeballClientSdk.get();if (sdk != null) {// Interoperability with Smokeball is possible.}
A non-null sdk will indicate that interopability with Smokeball is possible and the sdk can now be be initialized with the following asynchronous call:
Copy
Ask AI
await sdk.init();
After initialization, the sdk context item will be set which can be accessed using the following call:
Copy
Ask AI
const context = sdk.context;
Other components of the api can now be utilized. Navigate through the documentation on the left hand-side for more detailed information.