...
Amino models a MediaPlaySession in the domain language as an entity that can be used to track playback sessions for a user.
An example of the API response representing this resource is:
Code Block | ||||
---|---|---|---|---|
| ||||
{
"data": [
{
"type": "MediaPlaySession",
"id": "6b6bf3e1-555b-45cb-b5d3-63a2ff7be9e3 ",
"attributes": {
"service": "live",
"ip4_address": "86.190.137.158",
"user_agent": "Set Top Box",
"play_started_timestamp": 1551091684,
"last_updated_timestamp": 1551091736
}
}
]
} |
Example
Description | URL | Number of MediaPlaySessions after call is made |
---|---|---|
User account is not watching anything | 0 | |
User starts watching something on their set top box | POST /users/{user_id}/media_play_sessions | 1 |
Another person in the household starts watching something on a their mobile | POST /users/{user_id}/media_play_sessions | 2 |
The first user switches off the set top box without giving the client a chance to delete their session | None | 2 |
The second user presses stop on their mobile device | DELETE /media_play_sessions/{media_play_session_id} | 1 |
Some time later the periodic clean up job runs on the server and deletes the zombie session | N/A | 0 |