/
plex.go
49 lines (48 loc) · 1.81 KB
/
plex.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package plex
// WebhookPayload represents a payload from a plex webhook
type WebhookPayload struct {
Event string `json:"event"`
User bool `json:"user"`
Owner bool `json:"owner"`
Account struct {
ID int `json:"id"`
Thumb string `json:"thumb"`
Title string `json:"title"`
} `json:"Account"`
Server struct {
Title string `json:"title"`
UUID string `json:"uuid"`
} `json:"Server"`
Player struct {
Local bool `json:"local"`
PublicAddress string `json:"publicAddress"`
Title string `json:"title"`
UUID string `json:"uuid"`
} `json:"Player"`
Metadata struct {
LibrarySectionType string `json:"librarySectionType"`
RatingKey string `json:"ratingKey"`
Key string `json:"key"`
ParentRatingKey string `json:"parentRatingKey"`
GrandparentRatingKey string `json:"grandparentRatingKey"`
GUID string `json:"guid"`
LibrarySectionID int `json:"librarySectionID"`
Type string `json:"type"`
Title string `json:"title"`
GrandparentKey string `json:"grandparentKey"`
ParentKey string `json:"parentKey"`
GrandparentTitle string `json:"grandparentTitle"`
ParentTitle string `json:"parentTitle"`
Summary string `json:"summary"`
Index int `json:"index"`
ParentIndex int `json:"parentIndex"`
RatingCount int `json:"ratingCount"`
Thumb string `json:"thumb"`
Art string `json:"art"`
ParentThumb string `json:"parentThumb"`
GrandparentThumb string `json:"grandparentThumb"`
GrandparentArt string `json:"grandparentArt"`
AddedAt int `json:"addedAt"`
UpdatedAt int `json:"updatedAt"`
} `json:"Metadata"`
}