Extracts the part with the given ID from the Octoparts response and deserializes its JSON content to an A.
Extracts the part with the given ID from the Octoparts response and deserializes its JSON content to an A.
Note that an appropriate play.api.libs.json.Reads must be available in implicit scope.
Will return None if: - a part with the given ID is not present in the response - the part has no content - the JSON parsing fails (e.g. the content is not JSON, or the JSON is broken in some way) - the JSON deserialization fails (i.e. the JSON is valid, but cannot be deserialized into an A)
Note: - The method does not check the status code of the response or the presence of error messages.
the result type, i.e. the type of the JSON-serialized object
the part request unique id (or partId if the part request did not specify an ID)
can be customized to return something even if JSON extraction failed.
the object, or None if it could not be found and deserialized for some reason.
Convenience methods to make it easier to work with com.m3.octoparts.model.AggregateResponse