@wral/sdk-search
v0.0.1
Published
A Software Development Kit for working with our federated search engine
Downloads
2
Keywords
Readme
sdk-search
The sdk-search
is a JavaScript SDK (Software Development Kit) designed to interact with
the search API.
Installation
You can install the `sdk-search
npm install @wral/sdk-search
Usage
To use the sdk-search
, you first need to import it into your JavaScript or TypeScript project:
import { createClient } from '@wral/sdk-search';
Then, you can create a client instance with your configuration:
const config = {
baseUrl: 'YOUR_BASE_URL', // Base URL of your API
apiKey: 'YOUR_API_KEY', // Optional API key
};
const client = createClient(config);
After creating the client instance, you can use its methods to interact with the API.
API
createClient(config)
Creates a new client instance with the provided configuration.
config
: An object containing API configuration parameters:baseUrl
: The base URL of the API.
Returns a client instance with methods for interacting with the API.
Methods
api: (path, options = {})
: fetch wrapper for the API.