plexClient, err := plex.New("host", "token")
sessions, err := plexClient.GetSessions()
{
"MediaContainer": {
"size": 1,
"Metadata": [
{
"addedAt": "1559614258",
"art": "/library/metadata/885/art/1559614279",
"contentRating": "TV-MA",
"duration": "4346342",
"grandparentArt": "/library/metadata/885/art/1559614279",
"grandparentKey": "/library/metadata/885",
"grandparentRatingKey": "885",
"grandparentThumb": "/library/metadata/885/thumb/1559614279",
"grandparentTitle": "Chernobyl",
"guid": "com.plexapp.agents.thetvdb://360893/1/5?lang=en",
"index": "5",
"key": "/library/metadata/962",
"lastViewedAt": "1559656628",
"librarySectionID": "8",
"librarySectionKey": "/library/sections/8",
"librarySectionTitle": "TV Shows",
"originallyAvailableAt": "2019-06-03",
"parentIndex": "1",
"parentKey": "/library/metadata/886",
"parentRatingKey": "886",
"parentThumb": "/library/metadata/886/thumb/1559614279",
"parentTitle": "Season 1",
"ratingKey": "962",
"sessionKey": "1",
"summary": "Valery Legasov, Boris Shcherbina and Ulana Khomyuk risk their lives and reputations to expose the truth about Chernobyl.",
"thumb": "/library/metadata/962/thumb/1559614279",
"title": "Vichnaya Pamyat",
"type": "episode",
"updatedAt": "1559614279",
"viewCount": "1",
"viewOffset": "2547000",
"year": "2019",
"Media": [
{
"id": "2088",
"videoProfile": "high",
"audioChannels": "6",
"audioCodec": "aac",
"bitrate": "3752",
"container": "mpegts",
"duration": "4346342",
"height": "720",
"protocol": "hls",
"videoCodec": "h264",
"videoFrameRate": "24p",
"videoResolution": "720p",
"width": "1280",
"selected": true,
"Part": [
{
"id": "2091",
"videoProfile": "high",
"bitrate": "3752",
"container": "mpegts",
"duration": "4346342",
"height": "720",
"protocol": "hls",
"width": "1280",
"decision": "transcode",
"selected": true,
"Stream": [
{
"bitrate": "3416",
"chromaLocation": "left",
"codec": "h264",
"colorPrimaries": "bt709",
"colorTrc": "bt709",
"default": "1",
"displayTitle": "1080p (H.264)",
"frameRate": "23.975999999999999",
"height": "720",
"id": "6074",
"streamType": "1",
"width": "1280",
"decision": "transcode",
"location": "segments-av"
},
{
"bitrate": "336",
"bitrateMode": "cbr",
"channels": "6",
"codec": "aac",
"default": "1",
"displayTitle": "English (EAC3 5.1)",
"id": "6075",
"language": "English",
"languageCode": "eng",
"selected": "1",
"streamType": "2",
"decision": "transcode",
"location": "segments-av"
},
{
"codec": "webvtt",
"displayTitle": "English (SRT)",
"format": "webvtt",
"id": "6076",
"language": "English",
"languageCode": "eng",
"selected": "1",
"streamType": "3",
"decision": "transcode",
"location": "segments-subs"
}
]
}
]
}
],
"Director": [
{
"filter": "director=5738",
"id": "5738",
"tag": "Johan Renck"
}
],
"Writer": [
{
"filter": "writer=5737",
"id": "5737",
"tag": "Craig Mazin"
}
],
"User": {
"id": "1",
"thumb": "https://plex.tv/users/a9720769d16e7383/avatar?c=1557803913",
"title": "eschizoid"
},
"Player": {
"address": "::ffff:67.167.5.61",
"device": "Roku Ultra",
"machineIdentifier": "8c62469cd6201e362272f1e61c5ad365",
"model": "4640X",
"platform": "Roku",
"platformVersion": "9.x",
"product": "Plex for Roku",
"profile": "Roku-7.x",
"remotePublicAddress": "::ffff:67.167.5.61",
"state": "paused",
"title": "Roku Ultra - YP00AL737511",
"vendor": "Roku",
"version": "6.3.9.5772-1dfcf58b1-Plex",
"local": false,
"relayed": false,
"secure": true,
"userID": 1
},
"Session": {
"id": "8c62469cd6201e362272f1e61c5ad365",
"bandwidth": 3941,
"location": "wan"
},
"TranscodeSession": {
"key": "/transcode/sessions/80b23666-850a-4cd8-8114-dadd71eb2f7f-44",
"throttled": true,
"complete": false,
"progress": "94.199996948242188",
"speed": "0",
"duration": 4346342,
"context": "streaming",
"sourceVideoCodec": "h264",
"sourceAudioCodec": "eac3",
"videoDecision": "transcode",
"audioDecision": "transcode",
"subtitleDecision": "transcode",
"protocol": "hls",
"container": "mpegts",
"videoCodec": "h264",
"audioCodec": "aac",
"audioChannels": 6,
"transcodeHwRequested": false,
"timeStamp": "1559654408.9002578",
"maxOffsetAvailable": "4093.0096779999999",
"minOffsetAvailable": "1"
}
}
]
}
}