Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Client

Client constructs a client for interacting with the Sajari API.

Hierarchy

  • Client

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Client(project: string, collection: string, opts?: Option[]): Client
  • Constructs an instance of Client for a specific project and collection.

    const client = new Client("<project>", "<collection>");
    const webPipeline = client.pipeline("website");
    // webPipeline.search(...);
    

    An optional array of Option may be given to the client constructor to set config options.

    const client = new Client("<project>", "<collection>");
    

    Parameters

    • project: string
    • collection: string
    • Default value opts: Option[] = []

    Returns Client

Properties

collection

collection: string

endpoint

endpoint: string

project

project: string

Methods

pipeline

  • pipeline returns a new Pipeline instance that inherits config from the Client.

    Parameters

    • name: string

    Returns Pipeline

Generated using TypeDoc