Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@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 ID and key
// credentials.
const client = new CollectionsClient(
"account-id",
withKeyCredentials("key-id", "key-secret")
);
async function createCollection(id, displayName) {
// Create a new collection.
const collection = await client.createCollection({ id, 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 |
Infer schema | 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.
FAQs
[![Build status](https://github.com/sajari/sdk-node/workflows/Build/badge.svg?branch=master)](https://github.com/sajari/sdk-node/actions)
The npm package @sajari/sdk-node receives a total of 151 weekly downloads. As such, @sajari/sdk-node popularity was classified as not popular.
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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.