0.6.2 • Published 11 months ago
twilix-client v0.6.2
Twilix SDK
The Twilix SDK is a TypeScript package for interacting with the TwilixClient server, allowing you to easily use its endpoints in your code.
Installation
Use the package manager npm to install the Twilix SDK.
npm i twilixsdk
Usage
First, import the SDK into your TypeScript file:
import { TwilixClientClient } from '@twilix/sdk';
Initialize the client with your TwilixClient server URL:
const client = new TwilixClientClient('http://localhost:8000');
Schema Endpoint
To get the schema of a given dataset:
const schema = await client.getSchema('your-collection-name');
console.log(schema);
Bulk Insert Endpoint
To insert objects into a given collection:
const response = await client.bulkInsert('your-collection-name', yourObjects);
console.log(response);
Delete Object Endpoint
To delete an object from a collection:
const response = await client.deleteObject('your-collection-name', 'your-object-id');
console.log(response);
Development
Just compile the code and then publish
npx tsc
npm publish