Initial Comit
This commit is contained in:
154
DPMMobileB4X/test/MyWebApi/Files/index.html
Normal file
154
DPMMobileB4X/test/MyWebApi/Files/index.html
Normal file
@@ -0,0 +1,154 @@
|
||||
<div class="content m-3">
|
||||
<div class="p-2">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h3>$HOME_TITLE$</h3>
|
||||
<span class="small">Version: $VERSION$</span>
|
||||
<div class="small">Local time: <span id="datetime"></span>
|
||||
<script type="text/javascript">
|
||||
var datetime = document.getElementById('datetime');
|
||||
var d = new Date();
|
||||
var formatted = d.getFullYear() + '-' +
|
||||
('0' + (d.getMonth()+1)).slice(-2) + '-' +
|
||||
('0' + d.getDate()).slice(-2) + ' ' +
|
||||
('0' + d.getHours()).slice(-2) + ':' +
|
||||
('0' + d.getMinutes()).slice(-2) + ':' +
|
||||
('0' + d.getSeconds()).slice(-2);
|
||||
datetime.innerHTML = formatted;
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-12">
|
||||
<h3 class="text-uppercase text-primary"><span class='fa fa-layer-group mr-1'></span> <strong>Category</strong></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered rounded table-light small">
|
||||
<thead class="bg-secondary text-white">
|
||||
<th class="col-md-5 h6"><strong>Description</strong></th>
|
||||
<th class="col-md-1 h6 text-center"><strong>Method</strong></th>
|
||||
<th class="col-md-3 h6"><strong>Payload</strong></th>
|
||||
<th class="col-md-3 h6"><strong>API Endpoint</strong></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>List all categories</td>
|
||||
<td class="text-center text-success">GET</td>
|
||||
<td></td>
|
||||
<td><a href="$ROOT_URL$$ROOT_PATH$category" target="_blank">/category</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Get a category by id</td>
|
||||
<td class="text-center text-success">GET</td>
|
||||
<td></td>
|
||||
<td><a href="$ROOT_URL$$ROOT_PATH$category/2" target="_blank">/category/{cat_id}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Add a new category</td>
|
||||
<td class="text-center text-warning">POST</td>
|
||||
<td>{<br>
|
||||
"name": "category_name"<br>
|
||||
}</td>
|
||||
<td>/category</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Update existing category by id</td>
|
||||
<td class="text-center text-primary">PUT</td>
|
||||
<td>{<br>
|
||||
"name": "category_name"<br>
|
||||
}</td>
|
||||
<td>/category/{cat_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Delete existing category by id</td>
|
||||
<td class="text-center text-danger">DELETE</td>
|
||||
<td></td>
|
||||
<td>/category/{cat_id}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-12">
|
||||
<h3 class="text-uppercase text-primary"><span class='fa fa-cart-arrow-down mr-1'></span> <strong>Product</strong></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered rounded table-light small">
|
||||
<thead class="bg-secondary text-white">
|
||||
<th class="col-md-5 h6"><strong>Description</strong></th>
|
||||
<th class="col-md-1 h6 text-center"><strong>Method</strong></th>
|
||||
<th class="col-md-3 h6"><strong>Payload</strong></th>
|
||||
<th class="col-md-3 h6"><strong>API Endpoint</strong></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>List all products by category id</td>
|
||||
<td class="text-center text-success">GET</td>
|
||||
<td></td>
|
||||
<td><a href="$ROOT_URL$$ROOT_PATH$category/2/product" target="_blank">/category/{cat_id}/product</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Get a product by category and id</td>
|
||||
<td class="text-center text-success">GET</td>
|
||||
<td></td>
|
||||
<td><a href="$ROOT_URL$$ROOT_PATH$category/2/product/3" target="_blank">/category/{cat_id}/product/{id}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Add a new product by category id</td>
|
||||
<td class="text-center text-warning">POST</td>
|
||||
<td>{<br>
|
||||
"code": "product_code",<br>
|
||||
"name": "product_name",<br>
|
||||
"price": product_price<br>
|
||||
}</td>
|
||||
<td>/category/{cat_id}/product</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Update existing product by category id and id</td>
|
||||
<td class="text-center text-primary">PUT</td>
|
||||
<td>{<br>
|
||||
"code": "product_code",<br>
|
||||
"name": "product_name",<br>
|
||||
"price": product_price<br>
|
||||
}</td>
|
||||
<td>/category/{cat_id}/product/{id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Delete existing product by category id and id</td>
|
||||
<td class="text-center text-danger">DELETE</td>
|
||||
<td></td>
|
||||
<td>/category/{cat_id}/product/{id}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-12">
|
||||
<form class="form mb-3" action="">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">Keywords</span>
|
||||
</div>
|
||||
<input class="form-control col-md-3" type="text" id="keywords" name="keywords">
|
||||
<button class="btn btn-danger btn-sm pl-3 pr-3 ml-3" type="hidden" id="btnsearch">Search</button>
|
||||
</div>
|
||||
</form>
|
||||
<div id="results" class="table">
|
||||
<table class="table table-bordered rounded small">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
30
DPMMobileB4X/test/MyWebApi/Files/main.html
Normal file
30
DPMMobileB4X/test/MyWebApi/Files/main.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<title>$APP_TITLE$</title>
|
||||
<link rel="icon" type="image/png" href="$ROOT_URL$/assets/img/favicon.png"/>
|
||||
<link rel="stylesheet" href="$ROOT_URL$/assets/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="$ROOT_URL$/assets/css/fontawesome.min.css">
|
||||
<link rel="stylesheet" href="$ROOT_URL$/assets/css/solid.min.css">
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Arial, Helvetica, Tahoma, Times New Roman;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-light">
|
||||
<nav class="navbar navbar-expand navbar-dark bg-primary">
|
||||
<a class="text-white mr-3" href="#"><i class="fas fa-rocket"></i></a>
|
||||
<a class="navbar-brand font-weight-bold" href="$ROOT_URL$$ROOT_PATH$">$APP_TRADEMARK$</a>
|
||||
</nav>
|
||||
@VIEW@
|
||||
<div class="footer small m-4"><caption>$APP_COPYRIGHT$</caption></div>
|
||||
<script src="$ROOT_URL$/assets/js/jquery.min.js"></script>
|
||||
<script src="$ROOT_URL$/assets/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="$ROOT_URL$/assets/js/webapisearch.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user