Home > doofinder > Client

Client class

Class that allows interacting with the Doofinder service.

Signature:

export declare class Client 

Constructors

Constructor Modifiers Description
(constructor)({ server, secret, headers })   Constructor.

Properties

Property Modifiers Type Description
endpoint   string Returns the configured endpoint for this client.
headers   Record<string, string> Returns the headers set for this client.
secret   string Returns the secret token for this client, if any.
server   string Returns the search server for this client.

Methods

Method Modifiers Description
request(resource, params, payload, method)   Perform a request to a HTTP resource.
search(query)   Perform a search in Doofinder based on the provided parameters.
searchImage(query, image)   Perform a search through indexed images of a search engine.
stats(eventName, params, method)   Perform a request to submit stats events to Doofinder.
suggest(query)   Perform a suggestion query in Doofinder based on the provided parameters.
toString()   Return a string representation of this class.