-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.http
More file actions
100 lines (78 loc) · 2.2 KB
/
api.http
File metadata and controls
100 lines (78 loc) · 2.2 KB
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
# query: GET /api/v1/business
# description: get business oredered by geo-distance
# example:
GET http://127.0.0.1:8000/api/v1/business
Authorization: someone
Accept: application/json
###
# query: GET /api/v1/business/<business_id>
# description: get business by business_id
# example:
GET http://127.0.0.1:8000/api/v1/business/f9NumwFMBDn751xgFiRbNA
Authorization: someone
Accept: application/json
###
# query: GET /photos/<photo_id>
# description: get photo by photo_id
# example:
GET http://127.0.0.1:8000/photos/FlNVq0vjNw16VHzVp62DAA.jpg
###
# query: GET /api/v1/user
# description: get current user or 404
# example:
GET http://127.0.0.1:8000/api/v1/user
Authorization: someone
Accept: application/json
###
# query: POST /api/v1/user
# description: create user
# example:
POST http://127.0.0.1:8000/api/v1/user
Authorization: someone
Accept: application/json
Content-Type: application/json
{"username": "test1"}
###
# query: POST /api/v1/room
# description: create room
# example:
POST http://127.0.0.1:8000/api/v1/room
Authorization: someone
Accept: application/json
###
# query: GET /api/v1/room/<room_id>
# description: get room by room_id
# example:
GET http://127.0.0.1:8000/api/v1/room/b7bd1bcb-18c7-4f28-b3bf-5b1ee2163500
Authorization: someone
Accept: application/json
###
# query: GET /api/v1/room/<room_id>/join
# description: join to room by room_id
# example:
GET http://127.0.0.1:8000/api/v1/room/c41adbf6-a59e-4ff0-87d0-beb8e2dc2389/join
Authorization: Test
Accept: application/json
###
# query: GET /api/v1/room/<room_id>/choice
# description: get choices
# example:
GET http://127.0.0.1:8000/api/v1/room/b7bd1bcb-18c7-4f28-b3bf-5b1ee2163500/choice
Authorization: someone
Accept: application/json
###
# query: PUT /api/v1/room/<room_id>/choice
# description: make a choice
# example:
PUT http://127.0.0.1:8000/api/v1/room/b7bd1bcb-18c7-4f28-b3bf-5b1ee2163500/choice
Authorization: someone
Accept: application/json
Content-Type: application/json
{"first_business_chosen": false}
###
# query: GET /api/v1/room/<room_id>/business
# description: get recomended business
# example:
GET http://127.0.0.1:8000/api/v1/room/b7bd1bcb-18c7-4f28-b3bf-5b1ee2163500/business
Authorization: someone
Accept: application/json