-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
205 lines (205 loc) · 5.44 KB
/
swagger.json
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
{
"swagger": "2.0",
"info": {
"title": "Snippets API",
"description": "Test description",
"termsOfService": "https://www.google.com/policies/terms/",
"contact": {
"email": "[email protected]"
},
"license": {
"name": "BSD License"
},
"version": "v1"
},
"host": "127.0.0.1:8000",
"schemes": [
"http"
],
"basePath": "/",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"securityDefinitions": {
"Basic": {
"type": "basic"
}
},
"security": [
{
"Basic": []
}
],
"paths": {
"/": {
"post": {
"operationId": "_create",
"summary": "📣 Event API: Receive data and publish to RabbitMQ",
"description": "This API endpoint receives data from the request and publishes it to RabbitMQ.\n\n**HTTP Method:** POST\n**Request Body:** JSON data\n**Response:** \"ok\" with HTTP 200 OK status",
"parameters": [],
"responses": {
"201": {
"description": ""
}
},
"tags": [
""
]
},
"parameters": []
},
"/movies/{id}/total-watch-time/": {
"get": {
"operationId": "movies_total-watch-time_read",
"summary": "🎥 Movie Total Watch Time API: Retrieve total watch time for a movie",
"description": "This API endpoint retrieves the total watch time for a movie.\n\n**HTTP Method:** GET\n**Path Parameter:** `pk` (integer)\n**Response:** JSON data with total watch time",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/MovieTotalWatchTime"
}
}
},
"tags": [
"movies"
]
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "A unique integer value identifying this movie.",
"required": true,
"type": "integer"
}
]
},
"/users/{username}/total-watch-time/": {
"get": {
"operationId": "users_total-watch-time_read",
"summary": "🕒️ User Total Watch Time API: Retrieve total watch time for a user",
"description": "This API endpoint retrieves the total watch time for a user.\n\n**HTTP Method:** GET\n**Path Parameter:** `username` (string)\n**Response:** JSON data with total watch time",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/UserTotalWatchTime"
}
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "username",
"in": "path",
"description": "Required. 100 characters or fewer. Letters, digits and @/./+/-/_ only.",
"required": true,
"type": "string"
}
]
},
"/{username}/{movie_pk}/total-watch-time/": {
"get": {
"operationId": "total-watch-time_read",
"summary": "👥 User Movie Watch Time API: Retrieve watch time for a user and movie",
"description": "This API endpoint retrieves the watch time for a user and a movie.\n\n**HTTP Method:** GET\n**Path Parameters:** `username` (string), `pk` (integer)\n**Response:** JSON data with watch time",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/UserMovieTotalWatchTime"
}
}
},
"tags": [
"total-watch-time"
]
},
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "movie_pk",
"in": "path",
"required": true,
"type": "string"
}
]
}
},
"definitions": {
"MovieTotalWatchTime": {
"required": [
"slug"
],
"type": "object",
"properties": {
"title": {
"title": "Title",
"description": "Optional. 100 characters or fewer.",
"type": "string",
"maxLength": 100,
"x-nullable": true
},
"slug": {
"title": "Slug",
"description": "Required. Unique slug for the movie.",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"maxLength": 50,
"minLength": 1
},
"total_watch_time": {
"title": "Total watch time",
"type": "string",
"readOnly": true
}
}
},
"UserTotalWatchTime": {
"required": [
"username"
],
"type": "object",
"properties": {
"username": {
"title": "Username",
"description": "Required. 100 characters or fewer. Letters, digits and @/./+/-/_ only.",
"type": "string",
"maxLength": 100,
"minLength": 1
},
"total_watch_time": {
"title": "Total watch time",
"type": "string",
"readOnly": true
}
}
},
"UserMovieTotalWatchTime": {
"type": "object",
"properties": {
"get_total_watch_time_per_user_movie": {
"title": "Get total watch time per user movie",
"type": "string",
"readOnly": true
}
}
}
}
}