2023-07-30 23:12:52 +05:30
# API structure
## GET vs. POST
2023-08-01 08:24:39 +05:30
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.
2023-07-30 23:12:52 +05:30
## Naming conventions
Files starting from "_" ("_example.php") are intended for internal use only.
## Version 1
2023-08-12 04:09:17 +05:30
- _config.php: parses configuration file
2023-08-05 08:56:09 +05:30
- _db.php: connection to database and all related
- _auth.php: things related to authentification
2023-08-12 04:09:17 +05:30
- _errors.php: error strings
- _json.php: wrappers for JSON functions
2023-09-01 01:56:16 +05:30
- _utils.php: random utility functions
2023-08-12 04:09:17 +05:30
2023-08-25 07:12:50 +05:30
- [ ] 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
- [x] 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
2023-08-30 07:11:13 +05:30
- [x] user/delete.php (POST): delete user account
2023-08-25 07:12:50 +05:30
- [ ] post/ (GET/POST): get single post by id
- [ ] post/search.php (GET/POST): get list of posts matching the criteria
- [ ] post/create.php (POST): create new post with image
- [ ] post/edit.php (POST): edit tags of post
- [ ] post/delete.php (POST): delete post
- [ ] post/vote.php (POST): rate the existing post
- [ ] comments/ (GET/POST): show all comments from section by id
- [ ] comments/create.php (POST): create new comment at selected section
- [ ] comments/edit.php (POST): edit existing comment
2023-12-22 08:40:49 +05:30
- [ ] comments/delete.php (POST): remove existing comment