-
Notifications
You must be signed in to change notification settings - Fork 0
/
API.js
105 lines (92 loc) · 2.55 KB
/
API.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
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
var LIMIT = 10;
module.exports = {
"LIMIT": LIMIT,
"boxOffice": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/lists/movies/box_office.json",
"params": function() {
return {
"limit": LIMIT,
"country": "us"
};
}
},
"inTheaters": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/lists/movies/in_theaters.json",
"params": function() {
return {
"page": 1,
"country": "us",
"page_limit": LIMIT
};
}
},
"opening": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/lists/movies/opening.json",
"params": function() {
return {
"limit": LIMIT,
"country": "us"
};
}
},
"upcoming": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/lists/movies/upcoming.json",
"params": function() {
return {
"limit": LIMIT,
"country": "us"
};
}
},
"info": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/movies/%s.json",
"format": "id"
},
"cast": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/movies/%s/cast.json",
"format": "id"
},
"clips": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/movies/%s/clips.json",
"format": "id"
},
"reviews": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/movies/%s/reviews.json",
"format": "id",
"params": function() {
return {
"page": 1,
"country": "us",
"page_limit": 20,
"review_type": "all"
};
}
},
"similar": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/movies/%s/similar.json",
"format": "id",
"params": function() {
return {
"limit": 5
};
}
},
"alias": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/movie_alias.json?type=imdb",
"params": function() {
return {
"id": null
};
}
},
"search": {
"url": "http://api.rottentomatoes.com/api/public/v1.0/movies.json",
"params": function() {
return {
"q": '',
"page": 1,
"page_limit": 30
};
}
}
};