UNPKG

@vanakaru/ekilex-api-client

Version:

A node api client for the Ekilex API

22 lines 685 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Sources = void 0; const http_client_1 = require("../http/http-client"); class Sources { constructor(httpClient) { this.httpClient = httpClient; } getSearchPath(searchTerm) { const sanitizedSearchTerm = encodeURIComponent(searchTerm); return `source/search/${sanitizedSearchTerm}`; } search(searchTerm) { const request = { method: http_client_1.Method.Get, path: this.getSearchPath(searchTerm), }; return this.httpClient.request(request); } } exports.Sources = Sources; //# sourceMappingURL=sources.js.map