Organization
An Organization
instance represents an Aragon organization and exposes methods to interact with it.
Methods
Organization#app(appFilter)
Fetch a specific app from the organization.
Name | Type | Description |
---|---|---|
|
| When a string is passed, the app will get searched by address if it starts by |
|
| Same as |
|
| Same as |
returns |
| A promise resolving to an app. |
This method can throw one of the following errors:
Error type | Description |
---|---|
No app found. | |
The data couldn’t be fetched. | |
The connection to the remote source failed. |
Organization#onApp(appFilter, callback)
Like Organization#app()
, but as a subscription.
Name | Type | Description |
---|---|---|
|
| When a string is passed, the app will get searched by address if it starts by |
|
| Same as |
|
| Same as |
|
| A callback that will get called every time the result gets updated. |
returns |
| A handler that allows to stop receiving updates. |
The error passed to callback
can be null
(no error) or one of the following:
Error type | Description |
---|---|
No app found. | |
The data couldn’t be fetched. | |
The connection to the remote source failed. |
Organization#apps(appFilter)
Fetch apps from the organization.
Name | Type | Description |
---|---|---|
|
| When a string is passed, apps will get filtered by address if it starts by |
|
| Same as |
|
| Same as |
returns |
| A promise resolving to the current list of apps. |
This method can throw one of the following errors:
Error type | Description |
---|---|
The data couldn’t be fetched. | |
The connection to the remote source failed. |
Organization#onApps(appFilter, callback)
Like Organization#apps()
, but as a subscription.
Name | Type | Description |
---|---|---|
|
| When a string is passed, apps will get filtered by address if it starts by |
|
| Same as |
|
| Same as |
|
| A callback that will get called every time the result gets updated. |
returns |
| A handler that allows to stop receiving updates. |
The error passed to callback
can be null
(no error) or one of the following:
Error type | Description |
---|---|
The data couldn’t be fetched. | |
The connection to the remote source failed. |
Organization#permissions()
Fetch the organization’s permissions.
Name | Type | Description |
---|---|---|
returns |
| A promise resolving to a |
This method can throw one of the following errors:
Error type | Description |
---|---|
The data couldn’t be fetched. | |
The connection to the remote source failed. |
Organization#onPermissions(callback)
Like Organization#permissions()
, but as a subscription.
Name | Type | Description |
---|---|---|
|
| A callback that will get called every time the result gets updated. |
returns |
| A handler that allows to stop receiving updates. |
The error passed to callback
can be null
(no error) or one of the following:
Error type | Description |
---|---|
The data couldn’t be fetched. | |
The connection to the remote source failed. |
Organization#appIntent(appAddress, funcName, funcArgs)
Execute a function on a given app.
Name | Type | Description |
---|---|---|
|
| Address of the app instance. |
|
| Name of the function to call. |
|
| Parameters to pass to the function. |
returns |
| A promise resolving to an |
Last updated