UNPKG

meilisearch

Version:

The Meilisearch JS client for Node.js and the browser.

20 lines 661 B
/** * Class for handling batches. * * @see {@link https://www.meilisearch.com/docs/reference/api/batches} */ export class BatchClient { #httpRequest; constructor(httpRequests) { this.#httpRequest = httpRequests; } /** {@link https://www.meilisearch.com/docs/reference/api/batches#get-one-batch} */ async getBatch(uid) { return await this.#httpRequest.get({ path: `batches/${uid}` }); } /** {@link https://www.meilisearch.com/docs/reference/api/batches#get-batches} */ async getBatches(params) { return await this.#httpRequest.get({ path: "batches", params }); } } //# sourceMappingURL=batch.js.map