Add software version to the api
This commit is contained in:
parent
46d69b15f6
commit
f7680efa18
@ -109,6 +109,34 @@ Array
|
||||
Procedures
|
||||
----------
|
||||
|
||||
### app.version
|
||||
|
||||
Get the application version.
|
||||
|
||||
- **Arguments:** None
|
||||
- **Return:** Software version
|
||||
|
||||
Request:
|
||||
|
||||
```bash
|
||||
curl \
|
||||
-u "demo:swB3/nSo1CB1X2F" \
|
||||
-d '{"jsonrpc": "2.0", "method": "app.version", "id": 1}' \
|
||||
https://miniflux.net/demo/jsonrpc.php
|
||||
```
|
||||
|
||||
Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc":"2.0",
|
||||
"id":1,
|
||||
"result": {
|
||||
"version":"master"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### feed.list
|
||||
|
||||
Get the list of subscriptions.
|
||||
|
@ -10,6 +10,12 @@ $server->authentication(array(
|
||||
\Model\Config\get('username') => \Model\Config\get('api_token')
|
||||
));
|
||||
|
||||
// Get version
|
||||
$server->register('app.version', function () {
|
||||
|
||||
return array('version' => APP_VERSION);
|
||||
});
|
||||
|
||||
// Get all feeds
|
||||
$server->register('feed.list', function () {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user