$revel
$revel : \Revel\Revel
$revel : \Revel\Revel
__construct(\Revel\Revel $revel)
Api constructor.
\Revel\Revel | $revel | Reference to the core {@link Revel} object. |
get(string $resource) : \Revel\Api\Response
GET resource data.
string | $resource | The API endpoint, relative to the domain. |
post(string $resource, array $body = array()) : \Revel\Api\Response
POST to a resource.
string | $resource | The API endpoint, relative to the domain. |
array | $body | The POST body. |
all() : array<mixed,\Revel\Models\Product>
Get all {@link Product products}.
findById( $id) : \Revel\Models\Product
Get a single product.
$id |
findByBarcode(string $barcode) : \Revel\Models\Product
Get a single product using its barcode.
string | $barcode | The product barcode. |
findByUUID(string $uuid) : \Revel\Models\Product
Get a single product using its UUI.
string | $uuid | The product UUID. |
call(string $method, string $resource, array $body = array()) : \Revel\Api\Response
Perform a Revel API request.
string | $method | The HTTP method. |
string | $resource | The API endpoint, relative to the domain. |
array | $body | The request body. |