UNPKG

@coveo/platform-client

Version:

The main goal of this package is to provide an easy to configure and straightforward way of querying Coveo Cloud APIs using JavaScript.

26 lines 956 B
import API from '../../APICore.js'; import Resource from '../Resource.js'; /** * Hosted Pages Swagger documentation can be found at * https://platform.cloud.coveo.com/docs?urls.primaryName=Search%20Interface%20Service#/Hosted%20Page. */ export default class HostedPages extends Resource { static baseUrl = `/rest/organizations/${API.orgPlaceholder}/hostedpages`; list(options) { return this.api.get(this.buildPath(HostedPages.baseUrl, options)); } create(hostedPage) { return this.api.post(HostedPages.baseUrl, hostedPage); } delete(hostedPageId) { return this.api.delete(`${HostedPages.baseUrl}/${hostedPageId}`); } get(hostedPageId) { return this.api.get(`${HostedPages.baseUrl}/${hostedPageId}`); } update(hostedPage) { const { id, ...body } = hostedPage; return this.api.put(`${HostedPages.baseUrl}/${id}`, body); } } //# sourceMappingURL=HostedPages.js.map