| All Verbs | /rounds/stats |
|---|
import Foundation
import ServiceStack
public class FindRoundStats : Codable
{
public var periodFrom:Date
public var periodTo:Date
public var currentPage:Int
public var pageSize:Int
required public init(){}
}
public class PaginatedResult<T : Codable> : Codable
{
public var data:[RoundStats]
public var currentPage:Int
public var pageSize:Int
public var totalItems:Int
public var totalPages:Int
required public init(){}
}
public class RoundStats : Codable
{
public var id:String
public var createdAt:Date
public var status:RoundStatus
public var canceledCount:Int
public var canceledAmount:Double
public var betCount:Int
public var stakeAmount:Double
public var winningsAmount:Double
public var balanceAmount:Double
public var balancePct:Double
required public init(){}
}
public enum RoundStatus : Int, Codable
{
case Pending = 0
case InProgress = 1
case Ended = 2
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /rounds/stats HTTP/1.1
Host: grh1.api.bettor.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
periodFrom: 0001-01-01,
periodTo: 0001-01-01,
currentPage: 0,
pageSize: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
data:
[
{
id: String,
createdAt: 0001-01-01,
status: 0,
canceledCount: 0,
canceledAmount: 0,
betCount: 0,
stakeAmount: 0,
winningsAmount: 0,
balanceAmount: 0,
balancePct: 0
}
],
currentPage: 0,
pageSize: 0,
totalItems: 0,
totalPages: 0
}