more commands to api documentation
This commit is contained in:
parent
ff1c8fd8e9
commit
de7a00ab86
74
docs/API.md
74
docs/API.md
@ -48,26 +48,78 @@ example of request:
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"limit": 10,
|
"limit": 10,
|
||||||
"orderBy": "order_field",
|
"orderBy": "order_field",
|
||||||
"orderDesc": "DESC"
|
"orderDesc": "DESC",
|
||||||
|
"safeSearch": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
fields:
|
| Field | Type | Optional | Default Value | Description |
|
||||||
* text (string) - torrent search name
|
| ----- | ---- | -------- | ------------- | ----------- |
|
||||||
* navigation (object) [optional] - object with navigation params
|
| text | string | ❎ | | torrent search name |
|
||||||
* * index (int) [optional] - stating of torrent index of navigation
|
| navigation | object (Navigation) | ✅ | | object with navigation params |
|
||||||
* * limit (int) [optional] [default: 10] - max number of results on page
|
| index | int | ✅ | 0 | stating of torrent index of navigation |
|
||||||
* * orderBy (text) [optional] - field which is using for order results
|
| limit | int | ✅ | 10 | max number of results on page |
|
||||||
* * orderDesc (enum [DESC, ASC]) [optional] - sort direction of the field
|
| 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):
|
endpoint (GET REQUEST):
|
||||||
```
|
```
|
||||||
https://localhost:8095/api/queue
|
https://localhost:8095/api/queue
|
||||||
```
|
```
|
||||||
|
|
||||||
after executing of search **/api/searchTorrent** request **additional result of search will be in 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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user