Repository navigation
Expand file tree
/
Copy pathTestingSample.txt
More file actions
84 lines (66 loc) · 1.99 KB
/
Copy pathTestingSample.txt
File metadata and controls
84 lines (66 loc) · 1.99 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
Endpoint: PUT /PutCreateGame
Use case: Used for creating a new game.
Input properties:
JSON object
{
"UserID": string -- User identification number e.g. "joker19"
}
Successful output properties:
200 OK -- request has been processed successfully, GameID-int.
Error output properties:
500="InternalServerError"
400= "Parse UserID"
Sample:
PUT /PutCreateGame
Host: https://match-making-dot-trainingprojectlab2019.appspot.com
Content-Type: application/json
{
"UserID": "Muntezir3457"
}
Expected response: 200 OK, "GameID": 13
------------------------------------------------------------
Endpoint: POST /PostChangeColor
Use case: Used for changing the color of the user's tracer.
Input properties:
JSON object
{
"color": string -- Color of the tracer.
"UserID": string -- User identification number e.g. "joker19";
}
Successful output properties:
200 OK -- request has been processed successfully.
Error output properties:
500="InternalServerError"
400= "Parse UserID"
400= "Parse Color"
Sample:
POST /PostChangeColor
Host: https://match-making-dot-trainingprojectlab2019.appspot.com
Content-Type: application/json
{
"UserID": "SamirBerde",
"color": "black"
}
Expected response: 200 OK.
------------------------------------------------------------
Endpoint: GET /GetLobbyState
Use case: Used for getting the settings of lobby of the game.
Input properties:
Query Parameter
{
"GameID": int -- Game identification number e.g. 9;
}
Successful output properties:
200 OK -- request has been processed successfully, JSON object.
Error output properties:
500="InternalServerError"
400= "Parse GameID"
Sample:
GET /GetLobbyState
Host: https://match-making-dot-trainingprojectlab2019.appspot.com
Content-Type: Content-Length=0
{
https://match-making-dot-trainingprojectlab2019.appspot.com/GetLobbyState?GameID=9
(GameID is the query parameter)
}
Expected response: 200 OK.