-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathepisodes.graphqls
107 lines (96 loc) · 2.85 KB
/
episodes.graphqls
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
enum EpisodeType {
episode
standalone
}
union EpisodeContextUnion = Season | ContextCollection
enum ShareRestriction {
registered
members
public
}
type Episode implements CollectionItem & PlaylistItem & MediaItem {
id: ID!
uuid: String!
status: Status!
type: EpisodeType!
legacyID: ID
legacyProgramID: ID
locked: Boolean! @goField(forceResolver: true)
publishDate: Date!
productionDate: Date!
productionDateInTitle: Boolean!
availableFrom: Date! @goField(forceResolver: true)
availableTo: Date!
ageRating: String!
originalTitle: String! @goField(forceResolver: true)
title: String! @goField(forceResolver: true)
description: String!
extraDescription: String!
image(style: ImageStyle): String @goField(forceResolver: true)
imageUrl: String @deprecated(reason: "Replaced by the image field")
streams: [Stream!]! @goField(forceResolver: true)
files(audioLanguages: [String!]): [File!]! @goField(forceResolver: true)
chapters: [Chapter!]! @goField(forceResolver: true)
skipToChapter: Chapter @goField(forceResolver: true)
assetVersion: String!
season: Season @goField(forceResolver: true)
duration: Int!
progress: Int @goField(forceResolver: true)
watched: Boolean! @goField(forceResolver: true)
audioLanguages: [Language!]!
subtitleLanguages: [Language!]!
context: EpisodeContextUnion @goField(forceResolver: true)
relatedItems(first: Int, offset: Int): SectionItemPagination @goField(forceResolver: true)
images: [Image!]!
number: Int
lessons(first: Int, offset: Int): LessonPagination! @goField(forceResolver: true)
shareRestriction: ShareRestriction! @goField(forceResolver: true)
inMyList: Boolean! @goField(forceResolver: true)
"""
Should probably be used asynchronously, and retrieved separately from the episode, as it can be slow in some cases (a few db requests can occur)
"""
next(limit: Int): [Episode!]! @goField(forceResolver: true)
cursor: String! @goField(forceResolver: true)
}
type EpisodePagination implements Pagination {
total: Int!
first: Int!
offset: Int!
items: [Episode!]!
}
type Chapter implements CollectionItem {
id: ID!
start: Int!
title: String!
image: String
description: String
duration: Int!
episode: Episode @goField(forceResolver: true)
contentType: ContentType!
}
type File {
id: ID!
url: String!
videoLanguage: Language
audioLanguage: Language!
subtitleLanguage: Language
size: Int!
fileName: String!
mimeType: String!
resolution: String
}
enum StreamType {
hls_ts
hls_cmaf
dash
}
type Stream {
id: ID!
url: String!
expiresAt: Date!
videoLanguage: Language
audioLanguages: [Language!]!
subtitleLanguages: [Language!]!
type: StreamType!
downloadable: Boolean!
}