
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
ember-arcgis-portal-services
Advanced tools
A set of promise-based Ember Services for working with the ArcGIS Portal API.
Ember Services for working with ArcGIS Portal/Online
Note This is still a very nascent project, and things will change.
If you use this project, be sure to lock to a specific version in your package.json.
We expect this project to have many releases before the 1.0.0 "Public API" stablization.
After adding this to your project, you will have a number of services available for injection into your routes/controllers/services.
This project is now using ember-network/fetch
to enable fastboot compatibility. Please also ember install ember-network
torii-provider-arcgis
install via npm i torii-provider-arcgis
All the services expose a set of shared helper properties and methods:
Property | Returns | Description |
---|---|---|
portalRestUrl | string | Return the ArcGIS Portal Rest base url |
portalUrl | string | Return the ArcGIS Portal base url (for visiting pages etc) |
geocodeUrl | string | Return the geocode base url |
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) | promise | This is used internally. Promisified xhr that does not basic handling of Portal's 400-in-a-200 errors |
Method | Returns | Description |
---|---|---|
search(form) | promise | Executes via /sharing/rest/search . The form is an object properties matching the search params |
getById(id) | promise | Returns the Item. |
getDataById(id) | promise | Returns the Item-Data (/data ). |
update(item) | promise | Updates an existing item. The .owner property must be set. |
create(item) | promise | Creates an item. The .owner property must be set. |
destroy(itemId, owner) | promise | Delete the item. |
Method | Returns | Description |
---|---|---|
search(form) | promise | Executes via /sharing/rest/community/groups . The form is an object properties matching the search params |
getById(id) | promise | Returns the Group. |
getItemsById(id) | promise | Returns Items in the group. Note: Does not currently support paging. |
save(group) | promise | Creates or Updates a group. |
update(group) | promise | Updates an existing group. |
create(group) | promise | Creates an item. The .owner property must be set. |
destroy(id) | promise | Delete the Group. |
users(id) | promise | Return array of users that are members of the Group. Documentation |
addUsers(id, users) | promise | Adds users to the Group. Expects an array of usernames. |
reassign(id, username) | promise | Reassign ownership of the group |
Method | Returns | Description |
---|---|---|
shareItemWithEveryone(owner, itemId) | promise | Shares an item with everyone |
shareItemWithOrg(owner, itemId) | promise | Shares an item with the Organization |
shareItemsWithGroups(owner, items, groups) | promise | Shares a list of items with a list of groups. Both are arrays of ids. Owner must own all items |
shareItemsWithControl(owner, items, groups) | promise | Similar to shareItemsWithGroups except it confirms itemControl (aka edit permission conferred via group membership) |
shareItems(options) | promise | Used internally by the other methods, but could be useful in some cases |
Method | Returns | Description |
---|---|---|
search(form) | promise | Executes via /sharing/rest/community/users . The form is an object properties matching the search params |
getByName(username) | promise | Get a user object by name. |
Note: This is not used for authentication - rather its purpose is to allow Application Items to be programatically manipulated.
Method | Returns | Description |
---|---|---|
registerApp (itemId, redirectUris, appType = 'browser') | promise | Registers an App item as an actual AGO Application. Returning clientId, client secret etc |
updateApp(clientId, redirectUris) | promise | Currently just supports changing the set of valid redirect uris. PR's accepted to expand this |
Method | Returns | Description |
---|---|---|
findLocationAddress(inputString) | promise | Returns a location address based on an input string that moves through a specified or default geocode url |
Method | Returns | Description |
---|---|---|
update(portal) | promise | Update a portal. Lots of rules apply to what can be changed |
uploadResource (file) | promise | Upload a file as a portal resource |
addResource (name, content) | promise | Add a resource to a portal |
getResources () | promise | Get list of portal resources |
removeResource (resourceName) | promise | Remove a resource from a porta |
users(portalId, start = 1, num = 100) | promise | Get a portal users. |
Configuration for how to connect to the portal is managed in the torii
section. If you are using ArcGIS Online, the portalUrl
property is not needed.
// environment.js
...
torii: {
sessionServiceName: 'session',
providers: {
'arcgis-oauth-bearer': {
apiKey: 'SECRET-KEY-FOR-YOUR-APP',
portalUrl: 'https://yourawesomeportal.com'
}
}
}
...
ember install ember-arcgis-portal-services
npm install
bower install
Note: Currently there are no automated tests for this addon. PR's welcomed :)
npm test
(Runs ember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
[0.8.6]
surge
and github
environment settingsnpm run deploy
to use the github
environmentFAQs
A set of promise-based Ember Services for working with the ArcGIS Portal API.
The npm package ember-arcgis-portal-services receives a total of 5 weekly downloads. As such, ember-arcgis-portal-services popularity was classified as not popular.
We found that ember-arcgis-portal-services demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.