sajari-sdk-node
Table of contents:
Quickstart
Before you begin
- Create a Sajari account
- Retrieve your account credentials
Install the SDK
npm install @sajari/sdk-node
Use the SDK
const { CollectionsClient, withKeyCredentials } = require("@sajari/sdk-node");
const client = new CollectionsClient(
"account-id",
withKeyCredentials("key-id", "key-secret")
);
async function createCollection() {
const collection = await client.createCollection({ id, displayName });
console.log(`Collection ${collection.displayName} created.`);
await client.deleteCollection(collection.id);
}
createCollection().catch(console.error);
Contributing
Contributions are welcome. See the Contributing guide.