| All Verbs | /qry/wins/recent |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class GetRecentWins
{
}
public static class RecentWins
{
public String id = null;
public ArrayList<Win> wins = null;
public Integer maxSize = null;
public BigDecimal threshold = null;
public String getId() { return id; }
public RecentWins setId(String value) { this.id = value; return this; }
public ArrayList<Win> getWins() { return wins; }
public RecentWins setWins(ArrayList<Win> value) { this.wins = value; return this; }
public Integer getMaxSize() { return maxSize; }
public RecentWins setMaxSize(Integer value) { this.maxSize = value; return this; }
public BigDecimal getThreshold() { return threshold; }
public RecentWins setThreshold(BigDecimal value) { this.threshold = value; return this; }
}
public static class Win
{
public Long id = null;
public Long sId = null;
public Ref bettor = null;
public Origin origin = null;
public Date placedAt = null;
public Long roundId = null;
public String content = null;
public BigDecimal stake = null;
public BetOutcome outcome = null;
public BigDecimal amount = null;
public BetProcessingStatus processingStatus = null;
public BetValidity validity = null;
public HashMap<String,String> results = null;
public HashMap<String,String> payload = null;
public Long getId() { return id; }
public Win setId(Long value) { this.id = value; return this; }
public Long getSId() { return sId; }
public Win setSId(Long value) { this.sId = value; return this; }
public Ref getBettor() { return bettor; }
public Win setBettor(Ref value) { this.bettor = value; return this; }
public Origin getOrigin() { return origin; }
public Win setOrigin(Origin value) { this.origin = value; return this; }
public Date getPlacedAt() { return placedAt; }
public Win setPlacedAt(Date value) { this.placedAt = value; return this; }
public Long getRoundId() { return roundId; }
public Win setRoundId(Long value) { this.roundId = value; return this; }
public String getContent() { return content; }
public Win setContent(String value) { this.content = value; return this; }
public BigDecimal getStake() { return stake; }
public Win setStake(BigDecimal value) { this.stake = value; return this; }
public BetOutcome getOutcome() { return outcome; }
public Win setOutcome(BetOutcome value) { this.outcome = value; return this; }
public BigDecimal getAmount() { return amount; }
public Win setAmount(BigDecimal value) { this.amount = value; return this; }
public BetProcessingStatus getProcessingStatus() { return processingStatus; }
public Win setProcessingStatus(BetProcessingStatus value) { this.processingStatus = value; return this; }
public BetValidity getValidity() { return validity; }
public Win setValidity(BetValidity value) { this.validity = value; return this; }
public HashMap<String,String> getResults() { return results; }
public Win setResults(HashMap<String,String> value) { this.results = value; return this; }
public HashMap<String,String> getPayload() { return payload; }
public Win setPayload(HashMap<String,String> value) { this.payload = value; return this; }
}
public static class Ref
{
public String id = null;
public String val = null;
public String getId() { return id; }
public Ref setId(String value) { this.id = value; return this; }
public String getVal() { return val; }
public Ref setVal(String value) { this.val = value; return this; }
}
public static class Origin
{
public BettingApp application = null;
public String ip = null;
public RefEx organization = null;
public Ref region = null;
public Ref locationGroup = null;
public RefEx location = null;
public RefEx device = null;
public Ref clerk = null;
public BettingApp getApplication() { return application; }
public Origin setApplication(BettingApp value) { this.application = value; return this; }
public String getIp() { return ip; }
public Origin setIp(String value) { this.ip = value; return this; }
public RefEx getOrganization() { return organization; }
public Origin setOrganization(RefEx value) { this.organization = value; return this; }
public Ref getRegion() { return region; }
public Origin setRegion(Ref value) { this.region = value; return this; }
public Ref getLocationGroup() { return locationGroup; }
public Origin setLocationGroup(Ref value) { this.locationGroup = value; return this; }
public RefEx getLocation() { return location; }
public Origin setLocation(RefEx value) { this.location = value; return this; }
public RefEx getDevice() { return device; }
public Origin setDevice(RefEx value) { this.device = value; return this; }
public Ref getClerk() { return clerk; }
public Origin setClerk(Ref value) { this.clerk = value; return this; }
}
public static class BettingApp
{
public String name = null;
public String version = null;
public String getName() { return name; }
public BettingApp setName(String value) { this.name = value; return this; }
public String getVersion() { return version; }
public BettingApp setVersion(String value) { this.version = value; return this; }
}
public static class RefEx extends Ref
{
public RecordDictionary<String, String> data = null;
public RecordDictionary<String, String> getData() { return data; }
public RefEx setData(RecordDictionary<String, String> value) { this.data = value; return this; }
}
public static class RecordDictionary<TKey, TVal> extends HashMap<TKey,TVal>
{
}
public static enum BetOutcome
{
@SerializedName("0") Unknown(0),
@SerializedName("1") Lost(1),
@SerializedName("2") Won(2),
@SerializedName("3") Void(3);
private final int value;
BetOutcome(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static enum BetProcessingStatus
{
@SerializedName("0") Open(0),
@SerializedName("1") Closed(1);
private final int value;
BetProcessingStatus(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static enum BetValidity
{
@SerializedName("0") Valid(0),
@SerializedName("1") Canceled(1),
@SerializedName("2") Void(2),
@SerializedName("3") Reverted(3);
private final int value;
BetValidity(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/wins/recent HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: application/json
Content-Type: application/json
Content-Length: length
{}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"String","wins":[{"id":0,"sId":0,"bettor":{"id":"String","val":"String"},"origin":{"application":{"name":"String","version":"String"},"ip":"String","organization":{"data":{"String":"String"},"id":"String","val":"String"},"region":{"id":"String","val":"String"},"locationGroup":{"id":"String","val":"String"},"location":{"data":{"String":"String"},"id":"String","val":"String"},"device":{"data":{"String":"String"},"id":"String","val":"String"},"clerk":{"id":"String","val":"String"}},"placedAt":"0001-01-01T00:00:00.0000000Z","roundId":0,"content":"String","stake":0,"outcome":0,"amount":0,"processingStatus":0,"validity":0,"results":{"String":"String"},"payload":{"String":"String"}}],"maxSize":0,"threshold":0}