NAME
Mojo::Redfish::Client::Result
DESCRIPTION
A class to get represent the result of a request from "get" in Mojo::Redfish::Client. It encapsulates the returned data and facilitates walking further out in the tree by following links.
ATTRIBUTES
Mojo::Redfish::Client::Result inherits all of the attributes from Mojo::Base and implements the following new ones.
client
An instance of Mojo::Redfish::Client, usually the one that created this object. Required and weakened.
data
The payload result from the Redfish request.
METHODS
Mojo::Redfish::Client::Result inherits all of the methods from Mojo::Base and implements the following new ones.
get
$result = $result->get;
my $deeper = $result->get('/deeper/key');
Get the value of the "data" for the given JSON Pointer, making additional requests to follow links if needed. Array values are upgraded to Mojo::Collection objects and all (directly) contained values are fetched (if needed). The result is always either a result object or a collection; use "value" to get a simple value out of the data by pointer.
get_p
Same as "get" but returns a Mojo::Promise that resolves to the result.
value
Similar to "get" this method takes a pointer to dive into the "data" however the result is never fetched from the Redfish server and the value is not upgraded to a results object. Arrays are still upgraded to Mojo::Collection objects.
TO_JSON
Alias for "data" as a getter only.