This commit is contained in:
2021-06-28 23:15:13 -04:00
parent 0061a3d920
commit f4a8db56ff
93 changed files with 2422 additions and 0 deletions

View File

@ -0,0 +1,46 @@
<?php
namespace ProVM\Crypto\Common\Controller;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use ProVM\Common\Define\Controller\JSON;
class API {
use JSON;
public function __invoke(Request $request, Response $response): Response {
$output = [
'version' => '1.0.0',
'routes' => [
'/coins' => [
'/' => 'List all coins',
'/add' => 'Add coin'
],
'/coin/{coin_id}' => [
'/' => 'Show coin information',
'/edit' => 'Edit coin',
'/delete' => 'Delete coin'
],
'/locations' => [
'/' => 'List all locations',
'/add' => 'Add location'
],
'/location/{location_id}' => [
'/' => 'Show location information',
'/edit' => 'Edit location',
'/delete' => 'Delete location'
],
'/wallets' => [
'/' => 'List all wallets',
'/add' => 'Add wallet'
],
'/wallet/{wallet_id}' => [
'/' => 'Show wallet information',
'/edit' => 'Edit wallet',
'/delete' => 'Delete wallet'
]
]
];
return $this->withJson($response, $output);
}
}