Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@sajari/sdk-node
Advanced tools
Table of contents:
npm install @sajari/sdk-node
The following example shows how to create a collection using the SDK.
⚠️ The function below cleans up after itself by deleting the collection immediately after creation.
// Import the Sajari SDK.
const { CollectionsClient, withKeyCredentials } = require("@sajari/sdk-node");
// Create a client for working with collections from the account key
// credentials.
const client = new CollectionsClient(
withKeyCredentials("key-id", "key-secret")
);
async function createCollection(displayName) {
// Create a new collection.
const collection = await client.createCollection({ displayName });
console.log(`Collection ${collection.displayName} created.`);
// Clean up.
await client.deleteCollection(collection.id);
}
createCollection("collection-id", "Collection display name").catch(
console.error
);
Examples are in the examples directory.
Example | Source code |
---|---|
Batch create schema fields | source code |
Batch put records | source code |
Create collection | source code |
Create pipeline | source code |
Create schema field | source code |
Delete collection | source code |
Delete record | source code |
Generate pipelines | source code |
Get collection | source code |
Get pipeline | source code |
Get record | source code |
List collections | source code |
List pipelines | source code |
List schema fields | source code |
Put record | source code |
Query collection | source code |
Set default pipeline | source code |
Set default pipeline version | source code |
Contributions are welcome. See the Contributing guide.
MIT
See LICENSE
FAQs
[![Build status](https://github.com/sajari/sdk-node/workflows/Build/badge.svg?branch=master)](https://github.com/sajari/sdk-node/actions)
We found that @sajari/sdk-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.