diff options
Diffstat (limited to 'doc/API.md')
| -rw-r--r-- | doc/API.md | 40 |
1 files changed, 32 insertions, 8 deletions
@@ -37,6 +37,7 @@ - [Creating post](#creating-post) - [Updating post](#updating-post) - [Getting post](#getting-post) + - [Getting around post](#getting-around-post) - [Deleting post](#deleting-post) - [Merging posts](#merging-posts) - [Rating post](#rating-post) @@ -53,7 +54,7 @@ - [Deleting pool category](#deleting-pool-category) - [Setting default pool category](#setting-default-pool-category) - Pools - - [Listing pools](#listing-pool) + - [Listing pools](#listing-pools) - [Creating pool](#creating-pool) - [Updating pool](#updating-pool) - [Getting pool](#getting-pool) @@ -164,9 +165,9 @@ way. The files, however, should be passed as regular fields appended with a accepts a file named `content`, the client should pass `{"contentUrl":"http://example.com/file.jpg"}` as a part of the JSON message body. When creating or updating post content using this method, the server can -also be configured to employ [youtube-dl](https://github.com/ytdl-org/youtube-dl) -to download content from popular sites such as youtube, gfycat, etc. Access to -youtube-dl can be configured with the `'uploads:use_downloader'` permission +also be configured to employ [yt-dlp](https://github.com/yt-dlp/yt-dlp) to +download content from popular sites such as youtube, gfycat, etc. Access to +yt-dlp can be configured with the `'uploads:use_downloader'` permission Finally, in some cases the user might want to reuse one file between the requests to save the bandwidth (for example, reverse search + consecutive @@ -322,7 +323,7 @@ data. { "name": <name>, "color": <color>, - "order": <order> // optional + "order": <order> } ``` @@ -788,7 +789,7 @@ data. | `fav-time` | alias of `fav-date` | | `feature-date` | featured at given date | | `feature-time` | alias of `feature-time` | - | `safety` | having given safety. `<value>` can be either `safe`, `sketchy` (or `questionable`) or `unsafe`. | + | `safety` | having given safety. `<value>` can be either `safe`, `sketchy` or `unsafe`. | | `rating` | alias of `safety` | **Sort style tokens** @@ -951,6 +952,29 @@ data. Retrieves information about an existing post. +## Getting around post +- **Request** + + `GET /post/<id>/around` + +- **Output** + + ```json5 + { + "prev": <post-resource>, + "next": <post-resource> + } + ``` + +- **Errors** + + - the post does not exist + - privileges are too low + +- **Description** + + Retrieves information about posts that are before or after an existing post. + ## Deleting post - **Request** @@ -1365,7 +1389,7 @@ data. ## Creating pool - **Request** - `POST /pools/create` + `POST /pool` - **Input** @@ -2467,7 +2491,7 @@ One file together with its metadata posted to the site. ## Micro post **Description** -A [post resource](#post) stripped down to `name` and `thumbnailUrl` fields. +A [post resource](#post) stripped down to `id` and `thumbnailUrl` fields. ## Note **Description** |