also looking at this
Remove "data" in array response
#47
5 files
+40
-34
| @@ -46,7 +46,7 @@ class Client | ||
| 46 | 46 | */ |
| 47 | 47 | public function initializeEnv() |
| 48 | 48 | { |
| 49 | if (! file_exists(dirname(__DIR__)).'.env') { | |
| 49 | if (! file_exists(__DIR__.'/../.env')) { | |
| 50 | 50 | return; |
| 51 | 51 | } |
| 52 | 52 | |
| @@ -72,7 +72,13 @@ class Client | ||
| 72 | 72 | ->getBody() |
| 73 | 73 | ->getContents(); |
| 74 | 74 | |
| 75 | return json_decode($content, true); | |
| 75 | $body = json_decode($content, true); | |
| 76 | ||
| 77 | if ($body && $body['data']) { | |
| 78 | return $body['data']; | |
| 79 | } | |
| 80 | ||
| 81 | return $body; | |
| 76 | 82 | } |
| 77 | 83 | |
| 78 | 84 | /** |