UNPKG

@adobe/reactor-sdk

Version:
65 lines (52 loc) 2.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createHost = createHost; exports.deleteHost = deleteHost; exports.getHost = getHost; exports.getPropertyForHost = getPropertyForHost; exports.listHostsForProperty = listHostsForProperty; exports.updateHost = updateHost; /* Copyright 2019 Adobe. All rights reserved. This file is licensed to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Hosts // https://developer.adobelaunch.com/api/hosts/ // Create a Host // https://developer.adobelaunch.com/api/hosts/create/ function createHost(propertyId, hostSpec) { return this.post("/properties/".concat(propertyId, "/hosts"), { data: hostSpec }); } // Delete a Host // https://developer.adobelaunch.com/api/hosts/delete/ function deleteHost(hostId) { return this.delete("/hosts/".concat(hostId)); } // Get a Host // https://developer.adobelaunch.com/api/hosts/fetch/ function getHost(hostId) { return this.get("/hosts/".concat(hostId)); } // Get the Property for a Host // https://developer.adobelaunch.com/api/hosts/property/ function getPropertyForHost(hostId) { return this.get("/hosts/".concat(hostId, "/property")); } // List Hosts for a Property // https://developer.adobelaunch.com/api/hosts/list/ function listHostsForProperty(propertyId, queryParams) { return this.get("/properties/".concat(propertyId, "/hosts"), queryParams); } // Update a Host // https://developer.adobelaunch.com/api/hosts/update/ function updateHost(hostPatch) { return this.patch("/hosts/".concat(hostPatch.id), { data: hostPatch }); } //# sourceMappingURL=hosts.js.map