@@ 80-86 (lines=7) @@ | ||
77 | ||
78 | $json = json_decode($result, true); |
|
79 | ||
80 | if (200 == $code) { |
|
81 | return $json; |
|
82 | } elseif (isset($json['errors'])) { |
|
83 | throw new ApiError(implode(', ', $json['errors'])); |
|
84 | } else { |
|
85 | throw new ApiError('Something wrong'); |
|
86 | } |
|
87 | } |
|
88 | ||
89 | public static function makeRequst($options) { |
|
@@ 283-289 (lines=7) @@ | ||
280 | $json = $jxml; |
|
281 | } else $json = json_decode($result, true); |
|
282 | ||
283 | if (200 == $code) { |
|
284 | return $json; |
|
285 | } elseif (isset($json['errors'])) { |
|
286 | throw new ApiError(implode(', ', $json['errors'])); |
|
287 | } else { |
|
288 | throw new ApiError('Something wrong'); |
|
289 | } |
|
290 | } |
|
291 | ||
292 | /** |