ember-arcgis-portal-services:与ArcGIS Enterprise API一起使用的基于承诺的Emb

  • Z8_811565
    了解作者
  • 310.1KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-02 13:46
    上传日期
ember-arcgis-portal服务 Ember Services,可用于ArcGIS Portal /在线。 本质上是来自的函数的包装器,用于处理与身份验证集成的,和。 入门 安装 要在任何ember应用程序中使用此库: ember install ember-arcgis-portal-services 依存关系 该项目使用ember-fetch和的一些软件包,这些软件包将作为依赖项安装。 如果您使用进行oauth管理,也请npm install torii-provider-arcgis 。 更多信息。 否则,您可以使用下面描述的portalOpts参数,但是您的应用程序或
ember-arcgis-portal-services-master.zip
内容介绍
# ember-arcgis-portal-services [![npm version][npm-img]][npm-url] [![build status][travis-img]][travis-url] [![apache licensed](https://img.shields.io/badge/license-Apache-green.svg?style=flat-square)](https://raw.githubusercontent.com/Esri/ember-arcgis-portal-services/master/LICENSE) [npm-img]: https://img.shields.io/npm/v/ember-arcgis-portal-services.svg?style=flat-square [npm-url]: https://www.npmjs.com/package/ember-arcgis-portal-services [travis-img]: https://img.shields.io/travis/Esri/ember-arcgis-portal-services/master.svg?style=flat-square [travis-url]: https://travis-ci.org/Esri/ember-arcgis-portal-services Ember Services for working with ArcGIS Portal/Online. Essentially a wrapper around the functions from [arcgis-rest-js](https://esri.github.io/arcgis-rest-js/) for working with [items](https://esri.github.io/arcgis-rest-js/api/items/), [groups](https://esri.github.io/arcgis-rest-js/api/groups/), and [users](https://esri.github.io/arcgis-rest-js/api/users/) that integrates with [torii] authentication. ## Getting Started ### Installation To consume this library in any ember application: * `ember install ember-arcgis-portal-services` ### Dependencies This project uses `ember-fetch`, and a few packages from [arcgis-rest-js](https://github.com/Esri/arcgis-rest-js), which will be installed as dependencies. If you're using [torii] for oauth management, please also `npm install torii-provider-arcgis`. More information [here](https://github.com/dbouwman/torii-provider-arcgis). Otherwise, you can use the `portalOpts` parameter described below, but you need a service named `session` in your app or addon. You can generate a dummy service using `ember generate service session`. *TODO: there's probably a better way to do this...* ## ArcGIS Portal Services After adding this to your project, you will have a number of services available for injection into your routes/controllers/services. ### Shared Methods All the services expose a set of shared helper properties and methods: | Property | Returns | Description | | --- | --- | --- | | `geocodeUrl` | `string` | Return the geocode base url | **NOTE: Most public methods take an optional portalOpts parameter. This takes the form:** ```js { portalHostname: 'some.portal.com', token: 'BZSOMETOKENQJ' } // it might also look like this { portalHostname: 'https://some.portal.com', token: 'BZSOMETOKENQJ' } ``` | Method | Returns | Description | | --- | --- | --- | | `encodeForm` | `string` | This is used internally. Formats an object into a html form. In most cases, not necessary to call this.| | `request (url, options, portalOpts)` | `promise` | This is used internally. Promisified xhr that does basic handling of Portal's 400-in-a-200 errors | | `getPortalUrl()` | `string` | Get the portal url i.e. `https://org.maps.arcgis.com` | | `getPortalRestUrl()` | `string` | Get the portal rest url i.e. `https://org.maps.arcgis.com/sharing/rest` | ### Items Service | Method | Returns | Description | | --- | --- | --- | | `search(form)` | `promise` | Executes via `/sharing/rest/search`. The form is an object properties matching the [search params](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Search/02r3000000mp000000/) | | `getById(id, portalOpts)` | `promise` | Returns the Item. | | `getDataById(id, portalOpts)` | `promise` | Returns the Item-Data (`/data`). | | `update(item, portalOpts)` | `promise` | Updates an existing item. The `.owner` property must be set. | | `create(item, portalOpts)` | `promise` | Creates an item. The `.owner` property must be set. | | `move (itemId, folderId, portalOpts)` | `promise` | Move the item to a specified folder | | `remove(itemId, owner, portalOpts)` | `promise` | Delete the item. | | `protect(itemId, owner, portalOpts)` | `promise` | Protect the item (to avoid accidental deletion). | | `unprotect(itemId, owner, portalOpts)` | `promise` | Unprotect the item. | | `getRelatedItems(itemId, relationshipType, direction, portalOpts)` | `promise` | Related Items | | `addRelationship (username, itemId, destItemId, relType, portalOpts)` | `promise` | Add a relationship between items | | `removeRelationship (username, itemId, destItemId, relType, portalOpts)` | `promise` | Delete a relationship between items | | `addImageResourceFromUrl (itemId, owner, filename, url)` | `promise` | Add an image at the specified url to the item as a resource | | `export (username, itemId, title, exportOpts, portalOpts)` | `promise` | Export a service item to a file. Call getStatus for job status | | `getStatus(item, portalOpts)` | `promise` | Get item/job status | | `addPart(item, portalOpts)` | `promise` | Add an item file part | | `getParts(item, portalOpts)` | `promise` | Get a list of uploaded item file parts | ### Groups Service | Method | Returns | Description | | --- | --- | --- | | `search(form, portalOpts)` | `promise` | Executes via `/sharing/rest/community/groups`. The form is an object properties matching the [search params](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Group_Search/02r3000000m1000000/) | | `getById(id, portalOpts)` | `promise` | Returns the Group. | | `getBulk(ids, portalOpts)` | `promise` | Returns an array of Groups. | | `getItemsById(id, portalOpts)` | `promise` | Returns Items in the group. **Note:** Does not currently support paging. | | `save(group, portalOpts)` | `promise` | Creates or Updates a group. | | `rename(group, newTitle, portalOpts)` | `promise` | Renames an existing group. | | `update(group, portalOpts)` | `promise` | Updates an existing group. | | `create(group, portalOpts)` | `promise` | Creates an item. The `.owner` property must be set. | | `remove(id, portalOpts)` | `promise` | Delete the Group. | | `protect(id, portalOpts)` | `promise` | Protect the Group from deletion. | | `unprotect(id, portalOpts)` | `promise` | Unprotect the Group from deletion. | | `users(id, portalOpts)` | `promise` | Return array of users that are members of the Group. [Documentation](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Group_Users/02r30000006p000000/) | | `addUsers(id, users, portalOpts)` | `promise` | Adds users to the Group. Expects an array of usernames. | | `addAdmins(id, admins, portalOpts)` | `promise` | Adds admins to the Group. Expects an array of usernames. | | `reassign(id, username, portalOpts)` | `promise` | Reassign ownership of the group | | `remove(id, portalOpts)` | `promise` | Deletes a group from AGO | | `join(id, portalOpts)` | `promise` | Request for current user to join a group | | `leave (id, portalOpts)` | `promise` | Request for current user to leave a group | | `isUserGroupAdmin (id, username, portalOpts)` | `boolean` | User's group admin status | | `getUserMembership (id, username, portalOpts)` | `promise` | Return the type of group membership of a user | | `updateUserMemberships (id, users, type, portalOpts)` | `promise` | Updates membership(s) from user to admin or admin to user | | `ensureUniqueGroupName (title, step, portalOpts)` | `promise` | Return a group name guaranteed to be unique in the org | | `doesGroupExist` (title, portalOpts) | `promise` | Return a boolean indicating whether the group exists in the org | | `sendGroupMessage (groupId, subject, message, users, notificationChannelType, portalOpts)` (deprecated) | `promise` | Sends a notification to the group. See: http://mediawikidev.esri.com/index.php/ArcGIS.com/User_Notifications | | `sendEmailNotification (groupId, subject, message, users = [], portalOpts)` | `promise` | Sends an email notification to the specified group members | | `sendBuiltinNotification (groupId, subject, message, users = [], portalOpts)` | `promise` | Sends a "builtin" notification to the specified group members | | `sendPushNotificaiton (groupId, data, users = [], portalOpts)` | `promise` | Sends a push notification to the specified group members | ## Sharing Service The sharing service separates setting Access (private/shared/org/e
评论
    相关推荐
    • npm-install:用于npm的Cloud Native Buildpack
      Paketo NPM安装Cloud Native Buildpack NPM安装CNB利用安装在中的工具来管理应用程序依赖性。 积分 NPM安装CNB提供node_modules作为依赖项。 下游buildpack可以通过生成如下所示的文件来要求node_modules依赖项: ...
    • RAX:使用Web技术制作的开源C ++ IDE
      通过网络技术制作的开源C ++ IDE。 使用“ npm install”来获取所有依赖项。 您还应该安装g ++编译器。 使用“ npm start”预览RAX或使用“ npm run make”构建它。 随时为回购做贡献。 Imgur画廊: ://imgur....
    • car-sharing-project
      汽车共享项目 项目设置 npm install 编译和热重装以进行开发 npm run serve 编译并最小化生产 npm run build 整理和修复文件 check path in your ide npm run lint 自定义配置 请参阅。
    • identity-generator:具有控制台Web应用程序的电子邮件访问权限的高级身份生成器npm模块
      npm install --save identity-generator 用法 const identity = require ( 'identity-generator' ) identity . generate ( ) . then ( data => { console . log ( data ) } ) 这将生成一个完全随机的标识,并...
    • npm_module:粘合剂实施为NPM模块
      dhcp npm模块 将粘合剂实现为NPM模块,以用于NextJS项目。 该模块旨在用作服务器端渲染应用程序的一部分。 它获取针对所消费内容计划的广告,并将其用作Freewheel Ad Server或Google ad Manager的自定义参数。 ...
    • hexlet-ide:hexlet 的 Web IDE
      npm i --save hexlet-ide 2. require hexlet-ide frontend module var HexletIde = require("hexlet-ide/src/editor/main"); 3. Create widget var widget = HexletIde.create(document.getElementById("ide"), {...
    • tiny::upside-down_face:Npm软件包-删除字符串中的所有空格
      $ npm install @bamblehorse/tiny 用法 const tiny = require ( "@bamblehorse/tiny" ) ; tiny ( "So much space!" ) ; //=> "Somuchspace!" tiny ( 1337 ) ; //=> Uncaught TypeError: Tiny wants a string! // at ...
    • treeline, 在 Treeline IDE中,用于处理风帆应用和machinepacks的CLI工具.zip
      treeline, 在 Treeline IDE中,用于处理风帆应用和machinepacks的CLI工具 treeline( 译): 网站开始 命令行实用程序,用于在Treeline中使用帆应用程序和机器。安装 $ npm install -g treeline这将允许你在命令行中...
    • dynamic-watermark:使用npm包在图像上添加图像或文本水印,即动态水印
      动态水印是npm水印模块,用于在图像上添加水印。 它可以在给定位置添加图像以及文本水印。 在添加水印方面做得很好。 npm install dynamic-watermark --save 成功安装动态水印后,请执行以下步骤: 步骤1:包含...
    • d3-convention:D3公约编码为npm
      D3编码为npm软件包。 来自想法“分叉” 安装 d3-convention依赖d3作为对等方依赖项 npm install d3 d3-convention 例子 var c = require ( 'd3-convention' ) ( ) c . svg . append ( 'rect' ) . attr ( { width ...