diff --git a/index.php b/index.php deleted file mode 100644 index 084f045..0000000 --- a/index.php +++ /dev/null @@ -1,14 +0,0 @@ -// If you installed via composer, just use this code to requrie autoloader on the top of your projects. -require 'vendor/autoload.php'; - -// Else use require file -// require 'Meting.php'; - -// Initialize to netease API -$API = new Meting('netease'); - -// Enjoy -$result = $API->format(true)->search('Soldier'); -$data = json_decode($result); -header('Content-type: application/json; charset=UTF-8'); -echo json_encode($data,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); diff --git a/src/Meting.php b/src/Meting.php index 6c17766..ecf6c32 100644 --- a/src/Meting.php +++ b/src/Meting.php @@ -74,9 +74,9 @@ class Meting if ($error) { return json_encode( array( - 'error' => $error, - 'info' => $info, - 'status' => $status, + 'error' => $error, + 'info' => $info, + 'status' => $status, ) ); }