* @function IPortalUser.prototype.addScene * @description 添加场景。 * @version 10.1.0 * @param {IPortalAddResourceParam} addSceneParams - 添加场景的参数。 * @returns {Promise} 返回包含添加场景结果的 Promise 对象。
(addSceneParams)
| 71 | * @returns {Promise} 返回包含添加场景结果的 Promise 对象。 |
| 72 | */ |
| 73 | addScene(addSceneParams) { |
| 74 | if (!(addSceneParams instanceof IPortalAddResourceParam)) { |
| 75 | return this.getErrMsgPromise("addSceneParams is not instanceof IPortalAddResourceParam !"); |
| 76 | } |
| 77 | let cloneAddSceneParams = { |
| 78 | rootUrl: addSceneParams.rootUrl, |
| 79 | tags: addSceneParams.tags, |
| 80 | authorizeSetting: addSceneParams.entities |
| 81 | } |
| 82 | let addSceneUrl = this.iportalUrl + "/web/scenes/batchaddscenes.json"; |
| 83 | return this.request("POST", addSceneUrl, JSON.stringify(cloneAddSceneParams)).then(function(result) { |
| 84 | return result; |
| 85 | }); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * @function IPortalUser.prototype.registerService |
no test coverage detected