private static function interpretResponse($rstatus, $rheader, $rbody)
    {
        if ($rstatus < 200 || $rstatus >= 300) {
            self::handleError($rstatus, $rheader, $rbody);
        } elseif (empty($rbody)) {
            throw new Error\Api('Invalid response from API', $rstatus, $rheader, $rbody);
        }
        $resp = json_decode($rbody, true);
        return $resp;
    }