JSONAPI::Document::Builder::Relationships - Related Resource Document builder
Builds the related resource document for a given row.
The DBIx::Class::Row for relationship.
Note this is not the relationship row, rather it is its parent.
String name of the relationship.
Boolean; Default: false
If specified, will build the relationship with attributes instead of links.
Default behaviour is to build with links.
Main caller method; Builds the related resource document.
Builds a HashRef containing strings that represent URLs for fetching the given relationship, as well as the relationship ID(s).
For referential purposes, self and related mean the following:
A link pointing to the relationship itself regardless of whether it is a one-to-one or has-many type of relationship. It contains the word "relationship" in the URL.
The specification defines this link as the link to the relationship itself in the context of the primary resource. This means that the resource(s) returned from this URL should be directly related to the primary resource, i.e. $dbic_row->$relationship.
Behaves the same as "self" except that its URL structure is different. I fail to see the difference.
Builds a HashRef of the relationship(s) with attributes.
Builds a HashRef representing a single relationship row.
To install JSONAPI::Document, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.