-
Notifications
You must be signed in to change notification settings - Fork 0
/
show.js
56 lines (46 loc) · 1.26 KB
/
show.js
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
class Show {
constructor(language, name, mainGenre, image, officialUrl, showStartDate,
showEndDate, summary, tvMazeUrl, cableNetwork, webChannel) {
this.language=language,
this.name=name,
this.mainGenre=mainGenre,
this.image=image,
this.officialUrl=officialUrl,
this.showStartDate=showStartDate,
this.showEndDate=showEndDate,
this.summary=summary,
this.tvMazeUrl=tvMazeUrl,
this.cableNetwork=cableNetwork,
this.webChannel=webChannel
}
getName() {
return this.name;
}
getLanguage() {
return this.language;
}
getMainGenre() {
return this.mainGenre;
}
getImage() {
return this.image ? this.image : "https://via.placeholder.com/210x295/111217/FFFFFF/?text=No%20Image";
}
getWebsiteUrl() {
return this.officialUrl ? this.officialUrl : this.tvMazeUrl;
}
getShowStartDate() {
return this.showEndDate;
}
getShowEndDate() {
return this.showEndDate;
}
hasShowEnded() {
return true ? this.showEndDate : false;
}
getSummary() {
return this.summary;
}
getNetwork() {
return this.cableNetwork ? this.cableNetwork : this.webChannel;
}
}