public static class Bet.Companion implements ModelGenerator, QueryAble
Companion object that implements static methods to generate the model using a JSONObject.
Modifier and Type | Method and Description |
---|---|
Bet |
fromJson(org.json.JSONObject data)
Generates the model using a JSONObject
|
void |
place(ApiConnection apiConnection,
java.util.List<net.namibsun.hktipp.models.MinimalBet> bets)
Places bets using the API
|
BetQuery |
query(ApiConnection apiConnection)
Generates a Query object with which the model may be queried
|
fromJson
public void place(ApiConnection apiConnection, java.util.List<net.namibsun.hktipp.models.MinimalBet> bets)
Places bets using the API
apiConnection
- : The API connection to usebets
- : A list of bets to placepublic Bet fromJson(org.json.JSONObject data)
Generates the model using a JSONObject
data
- : The JSON to parsepublic BetQuery query(ApiConnection apiConnection)
Generates a Query object with which the model may be queried
apiConnection
- : The API connection to use with the query