more commands to api documentation

This commit is contained in:
Alexey Kasyanchuk 2023-06-08 03:03:12 +03:00
parent ff1c8fd8e9
commit de7a00ab86

View File

@ -48,22 +48,32 @@ example of request:
"index": 0,
"limit": 10,
"orderBy": "order_field",
"orderDesc": "DESC"
"orderDesc": "DESC",
"safeSearch": false
}
}
```
fields:
* text (string) - torrent search name
* navigation (object) [optional] - object with navigation params
* * index (int) [optional] - stating of torrent index of navigation
* * limit (int) [optional] [default: 10] - max number of results on page
* * orderBy (text) [optional] - field which is using for order results
* * orderDesc (enum [DESC, ASC]) [optional] - sort direction of the field
| Field | Type | Optional | Default Value | Description |
| ----- | ---- | -------- | ------------- | ----------- |
| text | string | ❎ | | torrent search name |
| navigation | object (Navigation) | ✅ | | object with navigation params |
|       index | int | ✅ | 0 | stating of torrent index of navigation |
|       limit | int | ✅ | 10 | max number of results on page |
|       orderBy | text | ✅ | | field which is using for order results |
|       orderDesc | enum [**DESC, ASC**] | ✅ | ASC | sort direction of the field |
|       safeSearch | bool | ✅ | true | disable/enable safe search for torrents |
|       type | string | ✅ | | type of content for search |
|       size | object (Interval) | ✅ | | size of torrent |
|            min | uint64 | ✅ | | minumum size of the torrent |
|            max | uint64 | ✅ | | maximum size of the torrent |
|       files | object (Interval) | ✅ | | files on the torrent |
|            min | int | ✅ | | minumum size of the torrent |
|            max | int | ✅ | | maximum size of the torrent |
#### Reading queue
### Reading queue
As said before after each request and periodicly you need to read queue for additional messaged
As said before after each request and periodicly you need to read queue for additional messages.
endpoint (GET REQUEST):
```
@ -71,3 +81,45 @@ https://localhost:8095/api/queue
```
after executing of search **/api/searchTorrent** request **additional result of search will be in queue**!
### Search of the torrent by files
endpoint (GET REQUEST):
```
https://localhost:8095/api/searchFiles?text=TorrentWithFileName&navigation={}
```
| Field | Type | Optional | Default Value | Description |
| ----- | ---- | -------- | ------------- | ----------- |
| text | string | ❎ | | torrent search name |
| navigation | object (Navigation) | ✅ | | object with navigation params |
|       index | int | ✅ | 0 | stating of torrent index of navigation |
|       limit | int | ✅ | 10 | max number of results on page |
|       orderBy | text | ✅ | | field which is using for order results |
|       orderDesc | enum [**DESC, ASC**] | ✅ | ASC | sort direction of the field |
|       safeSearch | bool | ✅ | true | disable/enable safe search for torrents |
### Recheck trackers info for the torrent
endpoint (GET REQUEST):
```
https://localhost:8095/api/checkTrackers?hash=29ebe63feb8be91b6dcff02bacc562d9a99ea864
```
| Field | Type | Optional | Default Value | Description |
| ----- | ---- | -------- | ------------- | ----------- |
| hash | string | ❎ | | torrent hash to refresh token |
### Top torrents
endpoint (GET REQUEST):
```
https://localhost:8095/api/topTorrents?type=video&navigation={"hours":"week"}
```
| Field | Type | Optional | Default Value | Description |
| ----- | ---- | -------- | ------------- | ----------- |
| type | string | ❎ | | type of category for top of the torrents |
| navigation | object (Navigation) | ✅ | | object with navigation params (check /api/searchTorrent for mo details) |
|       time | enum [hours, week, month] | ✅ | | time for the top