UNPKG

hcc-imageright-apis

Version:

imageright APIs

15 lines (14 loc) 685 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAttributeById = getAttributeById; exports.getAttributeByName = getAttributeByName; exports.getAttributeByObject = getAttributeByObject; function getAttributeById(api, objId, attId) { return api.get(`api/objects/${objId}/attributes/${attId}`).then((res) => Promise.resolve(res.data)); } function getAttributeByName(api, objId, attName) { return api.get(`api/objects/${objId}/attributes/name/${attName}`).then((res) => Promise.resolve(res.data)); } function getAttributeByObject(api, objId) { return api.get(`api/objects/${objId}/attributes`).then((res) => Promise.resolve(res.data)); }