Update API docs
This commit is contained in:
14
API.md
14
API.md
@@ -1,9 +1,15 @@
|
|||||||
# API Reference
|
# API Reference
|
||||||
|
|
||||||
The API is still pretty new and needs some serious cleaning up on the backend but should be reasonably functional. There are no error codes yet.
|
|
||||||
|
|
||||||
## General structure
|
## General structure
|
||||||
The API endpoint is `http://ip:port + HTTP_ROOT + /api/v2?apikey=$apikey&cmd=$command`
|
The API endpoint is
|
||||||
|
```
|
||||||
|
http://IP_ADDRESS:PORT + [/HTTP_ROOT] + /api/v2?apikey=$apikey&cmd=$command
|
||||||
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
http://localhost:8181/api/v2?apikey=66198313a092496b8a725867d2223b5f&cmd=get_metadata&rating_key=153037
|
||||||
|
```
|
||||||
|
|
||||||
Response example (default `json`)
|
Response example (default `json`)
|
||||||
```
|
```
|
||||||
@@ -2438,7 +2444,7 @@ Required parameters:
|
|||||||
body (str): The body of the message
|
body (str): The body of the message
|
||||||
|
|
||||||
Optional parameters:
|
Optional parameters:
|
||||||
None
|
script_args (str): The arguments for script notifications
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
None
|
None
|
||||||
|
@@ -413,7 +413,7 @@ class API2:
|
|||||||
body (str): The body of the message
|
body (str): The body of the message
|
||||||
|
|
||||||
Optional parameters:
|
Optional parameters:
|
||||||
None
|
script_args (str): The arguments for script notifications
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
None
|
None
|
||||||
@@ -496,10 +496,16 @@ class API2:
|
|||||||
""" Tries to make a API.md to simplify the api docs. """
|
""" Tries to make a API.md to simplify the api docs. """
|
||||||
|
|
||||||
head = '''# API Reference\n
|
head = '''# API Reference\n
|
||||||
The API is still pretty new and needs some serious cleaning up on the backend but should be reasonably functional. There are no error codes yet.
|
|
||||||
|
|
||||||
## General structure
|
## General structure
|
||||||
The API endpoint is `http://ip:port + HTTP_ROOT + /api/v2?apikey=$apikey&cmd=$command`
|
The API endpoint is
|
||||||
|
```
|
||||||
|
http://IP_ADDRESS:PORT + [/HTTP_ROOT] + /api/v2?apikey=$apikey&cmd=$command
|
||||||
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
http://localhost:8181/api/v2?apikey=66198313a092496b8a725867d2223b5f&cmd=get_metadata&rating_key=153037
|
||||||
|
```
|
||||||
|
|
||||||
Response example (default `json`)
|
Response example (default `json`)
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user