Update API documentation - add examples & differences between gpodder
This commit is contained in:
parent
3534c43976
commit
d6c81e7f83
64
README.md
64
README.md
@ -5,16 +5,70 @@ This app serves as synchronization endpoint for AntennaPod: https://github.com/A
|
|||||||
|
|
||||||
# API
|
# API
|
||||||
## subscription
|
## subscription
|
||||||
* *subscription*: `/index.php/apps/gpoddersync/subscriptions`
|
* **get subscription changes**: `GET /index.php/apps/gpoddersync/subscriptions`
|
||||||
* *subscription change* : `/index.php/apps/gpoddersync/subscription_change/create`
|
* *(optional)* GET parameter `since` (UNIX time)
|
||||||
|
* **upload subscription changes** : `POST /index.php/apps/gpoddersync/subscription_change/create`
|
||||||
|
* returns nothing
|
||||||
|
|
||||||
The API replicates this: https://gpoddernet.readthedocs.io/en/latest/api/reference/subscriptions.html
|
The API replicates this: https://gpoddernet.readthedocs.io/en/latest/api/reference/subscriptions.html
|
||||||
|
|
||||||
## episode action
|
## episode action
|
||||||
* *episode actions*: `/index.php/apps/gpoddersync/episode_action`
|
* **get episode actions**: `GET /index.php/apps/gpoddersync/episode_action`
|
||||||
* *create episode actions*: `/index.php/apps/gpoddersync/episode_action/create`
|
* *(optional)* GET parameter `since` (UNIX time)
|
||||||
|
* **upload episode actions**: `POST /index.php/apps/gpoddersync/episode_action/create`
|
||||||
|
* returns JSON with current timestamp
|
||||||
|
|
||||||
The API replicates this: https://gpoddernet.readthedocs.io/en/latest/api/reference/events.html
|
The API replicates this: https://gpoddernet.readthedocs.io/en/latest/api/reference/events.html
|
||||||
|
|
||||||
we also process the property `uuid`.
|
we also process the property `uuid`
|
||||||
|
|
||||||
|
fields: podcast, episode, guid, action, position, started, total, timestamp
|
||||||
|
|
||||||
|
|
||||||
|
#### Example requests:
|
||||||
|
```json
|
||||||
|
GET /index.php/apps/gpoddersync/episode_action?since=1633240761
|
||||||
|
|
||||||
|
{
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"id": 54,
|
||||||
|
"podcast": "http://example.com/feed.rss",
|
||||||
|
"episode": "http://example.com/files/s01e20.mp3",
|
||||||
|
"guid": "s01e20-example-org",
|
||||||
|
"action": "PLAY",
|
||||||
|
"timestamp": "2009-12-12T09:00:00",
|
||||||
|
"started": 15,
|
||||||
|
"position": 120,
|
||||||
|
"total": 500
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 12345
|
||||||
|
}
|
||||||
|
```
|
||||||
|
```json
|
||||||
|
POST /index.php/apps/gpoddersync/episode_action/create
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"podcast": "http://example.com/feed.rss",
|
||||||
|
"episode": "http://example.com/files/s01e20.mp3",
|
||||||
|
"guid": "s01e20-example-org",
|
||||||
|
"action": "PLAY",
|
||||||
|
"timestamp": "2009-12-12T09:00:00",
|
||||||
|
"started": 15,
|
||||||
|
"position": 120,
|
||||||
|
"total": 500
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"podcast": "http://example.org/podcast.php",
|
||||||
|
"episode": "http://ftp.example.org/foo.ogg",
|
||||||
|
"guid": "foo-bar-123",
|
||||||
|
"action": "DOWNLOAD",
|
||||||
|
"timestamp": "2009-12-12T09:05:21",
|
||||||
|
"started": -1,
|
||||||
|
"position": -1,
|
||||||
|
"total": -1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user