Дополнил доки API
This commit is contained in:
parent
d5d15c1a57
commit
d30c4f011d
26
api/API.md
26
api/API.md
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## GET vs. POST
|
## GET vs. POST
|
||||||
|
|
||||||
Some parts of API accepts both GET and POST type requests. We recommend you to prefer second option, when it's possible, just because it is more anonymous, when used with SSL or Tor. However, authentification can be performed **only** with POST.
|
Some parts of API accepts both GET and POST type requests. We recommend you to prefer second option, when it's possible, just because it is more private, when used with SSL or Tor. However, authentification and authenticated requests can be performed **only** with POST.
|
||||||
|
|
||||||
|
|
||||||
## Naming conventions
|
## Naming conventions
|
||||||
@ -13,5 +13,25 @@ Files starting from "_" ("_example.php") are intended for internal use only.
|
|||||||
|
|
||||||
## Version 1
|
## Version 1
|
||||||
|
|
||||||
- stats.php (GET/POST): all general, public and private statistics about this instance
|
- stats.php (GET/POST): all general statistics about this instance
|
||||||
- post/create.php (POST): create new post with image
|
|
||||||
|
- admin/ (POST): private statistics about this instance
|
||||||
|
- admin/dbview.php (POST): manage databases
|
||||||
|
- admin/nukelock.php (POST): emergency "red button" to lock all operations to read-only mode
|
||||||
|
|
||||||
|
- user/ (GET/POST): get user information by id
|
||||||
|
- user/list.php (GET/POST): get list of all users
|
||||||
|
- user/create.php (POST): create new user account
|
||||||
|
- user/edit.php (POST): edit user profile
|
||||||
|
- user/delete.php (POST): delete user account
|
||||||
|
|
||||||
|
- post/ (GET/POST): get single post by id
|
||||||
|
- post/list.php (GET/POST): get list of posts from range
|
||||||
|
- post/create.php (POST): create new post with image
|
||||||
|
- post/edit.php (POST): edit tags of post
|
||||||
|
- post/delete.php (POST): delete post
|
||||||
|
|
||||||
|
- post/comments/ (GET/POST): show all comments from post by id
|
||||||
|
- post/comments/create.php (POST): create new comment
|
||||||
|
- post/comments/edit.php (POST): edit existing comment
|
||||||
|
- post/comments/delete.php (POST): remove existing comment
|
BIN
front/styles/bg_pattern_peace.png
Normal file
BIN
front/styles/bg_pattern_peace.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 807 B |
BIN
front/styles/bg_pattern_peace_old.png
Normal file
BIN
front/styles/bg_pattern_peace_old.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 822 B |
@ -1,47 +1,51 @@
|
|||||||
body,div,h1,h2,h3,h4,h5,h6,p,ul,li,dd,dt {
|
body, div, h1, h2, h3, h4, h5, h6, p, ul, li, dd, dt {
|
||||||
font-family: Verdana, Sans-Serif;
|
font-family: Verdana, Sans-Serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body, div, p, a {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6, p, a {
|
||||||
|
color: #00c07c;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #009049;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #049e59;
|
background-color: #094e59;
|
||||||
background-repeat: no-repeat;
|
background-image: url("./bg_pattern_peace.png");
|
||||||
background-attachment: fixed;
|
background-repeat: repeat;
|
||||||
background-position: 50% 0%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p, a {
|
div.wrapper {
|
||||||
color: #009409;
|
text-align: center;
|
||||||
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#page {
|
/*div.wrapper img {
|
||||||
background: none !important; А это на кой???
|
width: 60%;
|
||||||
|
height: 60%;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
#links {
|
h1.title {
|
||||||
|
font-size: 4em;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.nav {
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
#links > a {
|
div.nav > a {
|
||||||
padding: 0.25rem 0.25rem;
|
padding: 0.25rem 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#a-home {
|
div.nibbabox {
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
top: 28em;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mascotbox {
|
|
||||||
z-index: 1;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-attachment: fixed;
|
|
||||||
background-position: 50% 0;
|
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
width: 480px;
|
width: 480px;
|
||||||
@ -51,37 +55,16 @@ div#a-home {
|
|||||||
text-shadow: 0 0 2px black, 0 0 6px black;
|
text-shadow: 0 0 2px black, 0 0 6px black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mascotbox:before {
|
div.searchbox {
|
||||||
z-index: -1;
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
width: 200vw;
|
|
||||||
height: 200vh;
|
|
||||||
top: -100px;
|
|
||||||
left: -100px;
|
|
||||||
|
|
||||||
background-image: inherit;
|
|
||||||
background-color: inherit;
|
|
||||||
background-repeat: inherit;
|
|
||||||
background-attachment: inherit;
|
|
||||||
background-position: inherit;
|
|
||||||
filter: blur(8px);
|
|
||||||
}
|
|
||||||
|
|
||||||
#searchbox {
|
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.news-excerpt {
|
div.notsearchbox {
|
||||||
padding: 5px 1em 0 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#searchbox3, #news-excerpt-box .previous-news-link {
|
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-height: 600px) {
|
@media only screen and (max-height: 600px) {
|
||||||
div#a-home {
|
div.wrapper {
|
||||||
top: 25vh;
|
top: 25vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
99
index.html
99
index.html
@ -5,66 +5,55 @@
|
|||||||
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
|
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
|
||||||
<meta name="theme-color" content="#00549e">
|
<!-- <meta name="theme-color" content="#00549e"> -->
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<!--TODO-->
|
<!--TODO-->
|
||||||
<link rel="stylesheet" href="./front/styles/default.css">
|
<link rel="stylesheet" href="./front/styles/default.css">
|
||||||
<script src="./front/scripts/some_script.js" type="text/javascript" integrity="1234"></script>
|
<!-- <script src="./front/scripts/some_script.js" type="text/javascript" integrity="1234"></script> -->
|
||||||
</head>
|
</head>
|
||||||
<body class="c-static a-home resp">
|
<body>
|
||||||
<div id="page">
|
<div class="wrapper">
|
||||||
<div id="c-static">
|
<div class="nibbabox notsearchbox">
|
||||||
<div id="a-home">
|
<img src="./test.png">
|
||||||
<div id="searchbox" class='mascotbox'>
|
</div>
|
||||||
<div id="static-index">
|
<div class="nibbabox searchbox">
|
||||||
<h1 style="font-size: 4em;"><a href="./">E949</a></h1>
|
<h1 class="title"><a href="./">E949</a></h1>
|
||||||
<div id="links">
|
<div class="nav">
|
||||||
<a title="Login or sign up" href="./session/new">Login/Signup</a>
|
<a title="Login in existing account" href="./account/login.php">Login</a>
|
||||||
<a title="A paginated list of every post" href="./posts">Posts</a>
|
<a title="Create new account" href="./account/create.php">Signup</a>
|
||||||
<a title="A paginated list of every comment" href="./comments">Comments</a>
|
<!-- <a title="Account page" href="./account/">Username123</a> -->
|
||||||
<a title="A paginated list of every tag" href="./tags">Tags</a>
|
<a title="A paginated list of every post" href="./posts/">Posts</a>
|
||||||
<a title="Wiki" href="./wiki_pages?title=help%3Ahome">Wiki</a>
|
<a title="A paginated list of every tag" href="./tags/">Tags</a>
|
||||||
<a title="Forum" href="./forum_topics">Forum</a>
|
<a title="Statistics of current instance" href="./stats.php">Statistics</a>
|
||||||
<a title="A site map" href="./static/site_map">»</a>
|
<a title="A site map" href="./site_map.php">Site map</a>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<form action="./posts" accept-charset="UTF-8" method="get">
|
|
||||||
<div>
|
|
||||||
<input type="text" name="tags" id="tags" value="" size="30" autofocus="autofocus" data-autocomplete="tag-query"><br>
|
|
||||||
<input type="submit" value="Search">
|
|
||||||
<input type="button" value="Change Mascot" id="change-mascot">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id='mascot_artist'>
|
|
||||||
<!-- *пустота* -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id='searchbox2' class='mascotbox'>
|
|
||||||
<img src="./images/counter/3.png">
|
|
||||||
<img src="./images/counter/4.png">
|
|
||||||
<img src="./images/counter/5.png">
|
|
||||||
<img src="./images/counter/1.png">
|
|
||||||
<img src="./images/counter/9.png">
|
|
||||||
<img src="./images/counter/5.png">
|
|
||||||
<img src="./images/counter/3.png">
|
|
||||||
</div>
|
|
||||||
<div id="news-excerpt-box" class="mascotbox">
|
|
||||||
<div class="news-excerpt dtext-container">Site Maintenance: Wednesday, April 12</div>
|
|
||||||
<div class="previous-news-link"><a href="./news_updates">Click here for previous news</a></div>
|
|
||||||
</div>
|
|
||||||
<div id='searchbox3' class='mascotbox'>
|
|
||||||
<p>
|
|
||||||
Serving 3,451,953 posts<br>
|
|
||||||
<a title="Takedown Information" href="./static/takedown">Takedown Policy and Process</a> |
|
|
||||||
<a title="Contact Us" href="./static/contact">Contact Us</a> |
|
|
||||||
<a title="Advertising with Us" href="./help/advertising">Advertising</a> |
|
|
||||||
<a title="Terms of Service" href="./static/terms_of_service">Terms of Service</a> |
|
|
||||||
<a title="Privacy Policy" href="./static/privacy">Privacy</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<form action="./posts" accept-charset="UTF-8" method="get">
|
||||||
|
<input type="text" name="tags" id="tags" value="" size="30" autofocus="autofocus" data-autocomplete="tag-query"><br>
|
||||||
|
<input type="submit" value="Search">
|
||||||
|
<input type="button" value="Change Mascot" id="change-mascot">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="nibbabox notsearchbox">
|
||||||
|
<img src="./images/counter/3.png">
|
||||||
|
<img src="./images/counter/4.png">
|
||||||
|
<img src="./images/counter/5.png">
|
||||||
|
<img src="./images/counter/1.png">
|
||||||
|
<img src="./images/counter/9.png">
|
||||||
|
<img src="./images/counter/5.png">
|
||||||
|
<img src="./images/counter/3.png">
|
||||||
|
</div>
|
||||||
|
<div class="nibbabox notsearchbox">
|
||||||
|
<p>
|
||||||
|
Serving 3,451,953 posts<br>
|
||||||
|
<a title="Takedown Information" href="./static/takedown">Takedown Policy and Process</a> |
|
||||||
|
<a title="Contact Us" href="./static/contact">Contact Us</a> |
|
||||||
|
<a title="Advertising with Us" href="./help/advertising">Advertising</a> |
|
||||||
|
<a title="Terms of Service" href="./static/terms_of_service">Terms of Service</a> |
|
||||||
|
<a title="Privacy Policy" href="./static/privacy">Privacy</a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user