Дополнил доки API
This commit is contained in:
26
api/API.md
26
api/API.md
@ -3,7 +3,7 @@
|
||||
|
||||
## 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
|
||||
@ -13,5 +13,25 @@ Files starting from "_" ("_example.php") are intended for internal use only.
|
||||
|
||||
## Version 1
|
||||
|
||||
- stats.php (GET/POST): all general, public and private statistics about this instance
|
||||
- post/create.php (POST): create new post with image
|
||||
- stats.php (GET/POST): all general statistics about this instance
|
||||
|
||||
- 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
|
Reference in New Issue
Block a user