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