# ResourceBuilder
Kind: global class
# resourceBuilder.build(jsonResourceObject)
Returns a new functional resource object
Functional resource objects are structurally identical to normal JSON:API resource objects but are enhanced with methods to simplify access to relationships.
Kind: instance method of ResourceBuilder
Param | Type |
---|---|
jsonResourceObject | Object |
# resourceBuilder.buildRelationshipMethods(obj)
Adds Methods (get, load, list) to the relationships for getting / loading them Adds Shorthand Methods (rel / loadRel)
Kind: instance method of ResourceBuilder
Param | Type | Description |
---|---|---|
obj | Object | jsonResourceObject |
# ResourceBuilder.strip(functionalResourceObject)
Convenience method to get a spec-conforming version of a resource object
Kind: static method of ResourceBuilder
Param | Type |
---|---|
functionalResourceObject | Object |