The sdk-search
is a JavaScript SDK (Software Development Kit) designed to interact with
the search API.
You can install the `sdk-search
npm install @wral/sdk-search
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.
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.
-
api: (path, options = {})
: fetch wrapper for the API.