ResourceProxy
Extends:
Direct Subclass:
Proxy for accessing resource. This will make sure that they are properly wrapped before the promise resolves.
Method Summary
Public Methods | ||
public |
get(id: Number | String | Object, deleted: String): CancelablePromise<ResourceBase> Get target resource |
|
public |
select(id: Number | String): ResourceBase Select target resource without obtaining data |
Inherited Summary
From class SimpleResourceProxy | ||
public get |
Target: Class<ResourceBase>: * Target to wrap results in |
|
public get |
api: Mapcreator: * Get api instance |
|
public get |
Proxy target url |
|
public |
list(params: Number | Object | RequestParameters): CancelablePromise<PaginatedResourceListing> List target resource |
|
public |
lister(parameters: object | RequestParameters, maxRows: number): ResourceLister Get the resource lister |
|
public |
new(data: Object<String, *>): ResourceBase Build a new instance of the target |
Public Methods
public get(id: Number | String | Object, deleted: String): CancelablePromise<ResourceBase> source
Get target resource
Throw:
If the api returns errors |
public select(id: Number | String): ResourceBase source
Select target resource without obtaining data
Example:
api.users.select('me').colors().then(doSomethingCool);