1 | <?php |
||
14 | abstract class AbstractScaleEngineResponse |
||
15 | { |
||
16 | /** |
||
17 | * Get the result of a command, throwing an error if it failed. |
||
18 | * |
||
19 | * All ScaleEngine API calls have a top-level `status` field that will be |
||
20 | * `success` for successful replies. This will throw an exception if the |
||
21 | * reply is not successful. |
||
22 | * |
||
23 | * @param OperationCommand $command The API call being executed. |
||
24 | * @param string|array $resultPath The path to the actual result model. If |
||
25 | * not provided, this will return the entire JSON response. |
||
26 | * @return array The top-level result JSON from the API call. |
||
27 | * @throws Exception if the result was not successful. |
||
28 | */ |
||
29 | public static function getResult(OperationCommand $command, $resultPath = []) |
||
38 | } |
||
39 |