-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequests.http
84 lines (59 loc) · 1.63 KB
/
requests.http
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
# SMARTRANKING API REQUESTS
## VARIABLES
@apiurl = http://localhost:3000
################## PLAYERS RELATED ##################
@playerId = 67945c8d0ebd8a00728ae7b5
### GET PLAYERS
GET {{apiurl}}/api/v1/players
### CREATE PLAYER
POST {{apiurl}}/api/v1/players
Content-Type: application/json
{
"name": "Player Name",
"email": "[email protected]",
"phoneNumber": "1234567890"
}
### GET PLAYER BY ID
GET {{apiurl}}/api/v1/players/{{playerId}}
### UPDATE PLAYER BY ID
PUT {{apiurl}}/api/v1/players/{{playerId}}
Content-Type: application/json
{
"name": "Updated Player Name",
"email": "[email protected]",
"phoneNumber": "0987654321"
}
### DELETE PLAYER BY ID
DELETE {{apiurl}}/api/v1/players/{{playerId}}
#####################################################
################## CATEGORIES RELATED ##################
@categoryId = 67945fa2b553f86f559ad0bc
### GET CATEGORIES
GET {{apiurl}}/api/v1/categories
### CREATE CATEGORY
POST {{apiurl}}/api/v1/categories
Content-Type: application/json
{
"name": "Category Name",
"description": "Category Description",
"events":[{
"name":"party"
}]
}
### ASSIGN PLAYER TO CATEGORY
POST {{apiurl}}/api/v1/categories/{{categoryId}}/players/{{playerId}}
Content-Type: application/json
{
}
### GET CATEGORY BY ID
GET {{apiurl}}/api/v1/categories/{{categoryId}}
### UPDATE CATEGORY BY ID
PUT {{apiurl}}/api/v1/categories/{{categoryId}}
Content-Type: application/json
{
"name": "Updated Category Name",
"description": "Updated Category Description"
}
### DELETE CATEGORY BY ID
DELETE {{apiurl}}/api/v1/categories/{{categoryId}}
#####################################################