Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: get filtered details for current app and all apps #371

Merged
merged 3 commits into from Sep 1, 2019

Conversation

@sohkai
Copy link
Member

commented Sep 1, 2019

Fixes #312.

  • I have updated the associated documentation with my changes

See potential breaking changes below (for getApps()). @topocount @Schwartz10 this has been made backwards compatible with the current released beta version of aragonAPI that includes api.getApps(), but ideally you'll be able to migrate to the new version without too much pain.

Please let me know if there's anything you're missing in the returned app objects for getApps() and if it'd be OK to remove the backwards compatibility! I'd like to restrict the API size as much as possible.


Allows a running app to get details about itself, most useful of which is its own proxy address (from there it can pretty much do anything).

The returned object for the current app is only a subset of the available information, since most of the app object should be known to the app frontend already (e.g. details in manifest.json, artifact.json). In fact, only the app's address is necessary for a frontend to start finding out more information about itself, but a few more details are included:

{
  appAddress: '0x...',  // currently running app's address (either proxy or full app contract)
  appId: '0x...',  // app's appId
  appImplementationAddress: '0x...',  // base implementation address (only available if running is a proxy contract)
  identifier: '...',  // self-declared app identifier
  isForwarder: bool,  // whether this app is a forwarder or not
  kernelAddress: '0x...',  // kernel the app is installed on
  name: '...',  // name of the app (if available)
}

(Updated with identifier and name in #373)

Breaking change: this new app object has also been adopted for the getApps() call, if using the new version of aragonAPI. Old versions of aragonAPI will still receive the full app object, unfiltered.

sohkai added 2 commits Sep 1, 2019
Wrapper: update get-apps handler
Adds the ability to filter for just the current context's connected app
and a 'get' operation to avoid subscribing.

@auto-assign auto-assign bot requested a review from 2color Sep 1, 2019

@sohkai sohkai changed the title API: get current app details API: get current app details and filter getApps()'s returned details Sep 1, 2019

@sohkai sohkai changed the title API: get current app details and filter getApps()'s returned details API: get filtered details for current app and all apps Sep 1, 2019

@sohkai sohkai merged commit 785ec57 into master Sep 1, 2019

12 checks passed

bootstrap bootstrap
Details
build build
Details
install install
Details
lint lint
Details
size size
Details
test test
Details
License Compliance All checks passed.
Details
WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.7%) to 55.562%
Details
license/cla Contributor License Agreement is signed.
Details

@sohkai sohkai deleted the get-current-app branch Sep 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.