Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Haakon Gunleiksrud
TDT4240_v20_haakon
Commits
88523cc7
Commit
88523cc7
authored
Apr 17, 2020
by
ivarnm
Browse files
Add getSpecificTournament in QI
parent
d05b1c49
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/core/src/com/gameware/game/QueryIntermediate.java
View file @
88523cc7
...
...
@@ -160,6 +160,15 @@ public class QueryIntermediate {
return
tournaments
;
}
public
static
Tournament
getSpecificTournament
(
String
tournamentID
)
throws
IOException
,
NoSuchElementException
{
String
route
=
"tournament/specific/"
+
tournamentID
;
String
[]
response
=
sendGetRequest
(
route
);
checkStatusCode
(
response
);
Tournament
tournament
=
json
.
fromJson
(
Tournament
.
class
,
response
[
1
]);
checkObjectNotNull
(
tournament
);
return
tournament
;
}
public
static
Tournament
joinATournament
(
String
playerId
)
throws
IOException
,
NoSuchElementException
{
String
route
=
"tournament/join/"
;
Map
<
String
,
String
>
params
=
new
HashMap
<>();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment