forked from googleforgames/agones
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalpha.swagger.json
226 lines (226 loc) · 8.03 KB
/
alpha.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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
{
"swagger": "2.0",
"info": {
"title": "alpha.proto",
"version": "version not set"
},
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/alpha/player/capacity": {
"get": {
"summary": "Retrieves the current player capacity. This is always accurate from what has been set through this SDK,\neven if the value has yet to be updated on the GameServer status resource.",
"description": "If GameServer.Status.Players.Capacity is set manually through the Kubernetes API, use SDK.GameServer() or SDK.WatchGameServer() instead to view this value.",
"operationId": "GetPlayerCapacity",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/alphaCount"
}
}
},
"tags": [
"SDK"
]
},
"put": {
"summary": "Update the GameServer.Status.Players.Capacity value with a new capacity.",
"operationId": "SetPlayerCapacity",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/alphaEmpty"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/alphaCount"
}
}
],
"tags": [
"SDK"
]
}
},
"/alpha/player/connect": {
"post": {
"summary": "PlayerConnect increases the SDK’s stored player count by one, and appends this playerID to GameServer.Status.Players.IDs.",
"description": "GameServer.Status.Players.Count and GameServer.Status.Players.IDs are then set to update the player count and id list a second from now,\nunless there is already an update pending, in which case the update joins that batch operation.\n\nPlayerConnect returns true and adds the playerID to the list of playerIDs if this playerID was not already in the\nlist of connected playerIDs.\n\nIf the playerID exists within the list of connected playerIDs, PlayerConnect will return false, and the list of\nconnected playerIDs will be left unchanged.\n\nAn error will be returned if the playerID was not already in the list of connected playerIDs but the player capacity for\nthe server has been reached. The playerID will not be added to the list of playerIDs.\n\nWarning: Do not use this method if you are manually managing GameServer.Status.Players.IDs and GameServer.Status.Players.Count\nthrough the Kubernetes API, as indeterminate results will occur.",
"operationId": "PlayerConnect",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/alphaBool"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/alphaPlayerID"
}
}
],
"tags": [
"SDK"
]
}
},
"/alpha/player/connected": {
"get": {
"summary": "Returns the list of the currently connected player ids. This is always accurate from what has been set through this SDK,\neven if the value has yet to be updated on the GameServer status resource.",
"description": "If GameServer.Status.Players.IDs is set manually through the Kubernetes API, use SDK.GameServer() or SDK.WatchGameServer() instead to view this value.",
"operationId": "GetConnectedPlayers",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/alphaPlayerIDList"
}
}
},
"tags": [
"SDK"
]
}
},
"/alpha/player/connected/{playerID}": {
"get": {
"summary": "Returns if the playerID is currently connected to the GameServer. This is always accurate from what has been set through this SDK,\neven if the value has yet to be updated on the GameServer status resource.",
"description": "If GameServer.Status.Players.IDs is set manually through the Kubernetes API, use SDK.GameServer() or SDK.WatchGameServer() instead to determine connected status.",
"operationId": "IsPlayerConnected",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/alphaBool"
}
}
},
"parameters": [
{
"name": "playerID",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"SDK"
]
}
},
"/alpha/player/count": {
"get": {
"summary": "Retrieves the current player count. This is always accurate from what has been set through this SDK,\neven if the value has yet to be updated on the GameServer status resource.",
"description": "If GameServer.Status.Players.Count is set manually through the Kubernetes API, use SDK.GameServer() or SDK.WatchGameServer() instead to view this value.",
"operationId": "GetPlayerCount",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/alphaCount"
}
}
},
"tags": [
"SDK"
]
}
},
"/alpha/player/disconnect": {
"post": {
"summary": "Decreases the SDK’s stored player count by one, and removes the playerID from GameServer.Status.Players.IDs.",
"description": "GameServer.Status.Players.Count and GameServer.Status.Players.IDs are then set to update the player count and id list a second from now,\nunless there is already an update pending, in which case the update joins that batch operation.\n\nPlayerDisconnect will return true and remove the supplied playerID from the list of connected playerIDs if the\nplayerID value exists within the list.\n\nIf the playerID was not in the list of connected playerIDs, the call will return false, and the connected playerID list\nwill be left unchanged.\n\nWarning: Do not use this method if you are manually managing GameServer.status.players.IDs and GameServer.status.players.Count\nthrough the Kubernetes API, as indeterminate results will occur.",
"operationId": "PlayerDisconnect",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/alphaBool"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/alphaPlayerID"
}
}
],
"tags": [
"SDK"
]
}
}
},
"definitions": {
"alphaBool": {
"type": "object",
"properties": {
"bool": {
"type": "boolean",
"format": "boolean"
}
},
"title": "Store a boolean result"
},
"alphaCount": {
"type": "object",
"properties": {
"count": {
"type": "string",
"format": "int64"
}
},
"description": "Store a count variable."
},
"alphaEmpty": {
"type": "object",
"title": "I am Empty"
},
"alphaPlayerID": {
"type": "object",
"properties": {
"playerID": {
"type": "string"
}
},
"description": "The unique identifier for a given player."
},
"alphaPlayerIDList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "string"
}
}
},
"title": "List of Player IDs"
}
}
}