API Docs for: 0.2.1
Show:

RelatedProxyUtil Class

Utility for creating promise proxy objects for related resources

Methods

createProxy

(
  • resource
  • kind
)
PromiseProxy | ObjectProxy | ArrayProxy

Proxy for the requested relation, resolves w/ content from fulfilled promise

Parameters:

  • resource Resource
  • kind String

    'toMany' or 'toOne'

Returns:

PromiseProxy | ObjectProxy | ArrayProxy:

proxy instance, new resource uses mock relations

init

()

Checks for required relationship property

linksPath

(
  • relation
)
String

Parameters:

  • relation String

Returns:

String:

path to the related link

promiseFromCache

(
  • resource
  • relation
  • service
)
Promise | Null

Lookup relation from service cache and pomisify result

Parameters:

  • resource Resource
  • relation String
  • service Object

Returns:

Promise | Null:

proxyResolution

(
  • resource
)
PromiseProxy

Parameters:

  • resource Proxy

Returns:

PromiseProxy:

proxy

proxySetup

(
  • resource
  • kind
  • proxyFactory
)
PromiseProxy

Parameters:

  • resource Resource
  • kind String

    'toMany' or 'toOne'

  • proxyFactory Ember.ObjectProxy | Ember.ArrayProxy

Returns:

PromiseProxy:

proxy

proxyUrl

(
  • resource
  • relation
)
PromiseProxy

Proxy url to fetch for the resource's relation

Parameters:

Returns:

PromiseProxy:

proxy

serviceCacheLookup

(
  • service
  • data
)
Resource | Undefined

Lookup data in service cache

Parameters:

  • service Object
  • data Object

Returns:

Resource | Undefined:

Properties

resource

String

The name of the relationship

type

String

The name of the type of resource