Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sajari/sdk-node

Package Overview
Dependencies
Maintainers
8
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sajari/sdk-node

[![Build status](https://github.com/sajari/sdk-node/workflows/Build/badge.svg?branch=master)](https://github.com/sajari/sdk-node/actions)

  • 5.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
265
decreased by-23.19%
Maintainers
8
Weekly downloads
 
Created
Source

Search.io SDK for Node

Build status

The official Search.io Node client library.

Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence.

Table of contents

Quickstart

Before you begin

  1. Create a Search.io account
  2. Retrieve your account credentials

Install the SDK

npm install @sajari/sdk-node

Use the SDK

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 Search.io SDK.
import { CollectionsClient, withKeyCredentials } from "@sajari/sdk-node";

// Create a client for working with collections from account key credentials.
const client = new CollectionsClient(
  withKeyCredentials("account-key-id", "account-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. Remove this in your application to keep the collection.
  await client.deleteCollection(collection.id);
}

createCollection("collection-id", "Collection display name").catch(
  console.error
);

Examples

Examples are in the examples directory.

ExampleSource code
Batch create schema fieldssource code
Batch upsert recordssource code
Create collectionsource code
Create pipelinesource code
Create schema fieldsource code
Delete collectionsource code
Delete recordsource code
Generate pipelinessource code
Get collectionsource code
Get pipelinesource code
Get recordsource code
List collectionssource code
List pipelinessource code
List schema fieldssource code
Upsert recordsource code
Query collectionsource code
Set default pipelinesource code
Send eventsource code
Get default pipelinesource code
Set default pipeline versionsource code
Get default pipeline versionsource code

Contributing

Contributions are welcome. See the Contributing guide.

License

MIT

See LICENSE

FAQs

Package last updated on 20 Jul 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc