-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpayload.go
32 lines (28 loc) · 822 Bytes
/
payload.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
// PlexAccount is the Plex Account associated with the webhook
type PlexAccount struct {
ID int `json:"id"`
Thumb string `json:"thumb,omitempty"`
Title string `json:"title"`
}
// PlexServer is the Plex Server associated with the webhook
type PlexServer struct {
Title string `json:"title"`
UUID string `json:"uuid"`
}
// PlexPlayer is the Plex Server associated with the webhook
type PlexPlayer struct {
Local bool `json:"local"`
PublicAddress string `json:"publicAddress"`
Title string `json:"title"`
UUID string `json:"uuid"`
}
// PlexPayload maps the json from Plex's POST body
type PlexPayload struct {
Event string `json:"event"`
User bool `json:"user"`
Owner bool `json:"owner"`
Account PlexAccount
Server PlexServer
Player PlexPlayer
}