-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fba7ab9
commit 4c48a38
Showing
3 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,32 @@ | ||
package org.arkecosystem.client.api; | ||
|
||
import java.io.IOException; | ||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
import org.arkecosystem.client.http.Client; | ||
|
||
public class Rounds { | ||
private final Client client; | ||
private final Map<String, Object> params = new LinkedHashMap<>(); | ||
|
||
public Rounds(Client client) { | ||
this.client = client; | ||
} | ||
|
||
public Rounds param(String name, Object value) { | ||
params.put(name, value); | ||
return this; | ||
} | ||
|
||
public Map<String, Object> delegates(int id) throws IOException { | ||
return this.client.get("rounds/" + id + "/delegates"); | ||
} | ||
|
||
public Map<String, Object> all() throws IOException { | ||
return this.client.get("rounds", params); | ||
} | ||
|
||
public Map<String, Object> show(int roundId) throws IOException { | ||
return this.client.get("rounds/" + roundId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters