Greyhounds.WebApi

<back to all web services

FindRoundStats

The following routes are available for this service:
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
}


Swift FindRoundStats DTOs

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

HTTP + JSON

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: application/json
Content-Type: application/json
Content-Length: length

{"periodFrom":"0001-01-01T00:00:00.0000000Z","periodTo":"0001-01-01T00:00:00.0000000Z","currentPage":0,"pageSize":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"data":[{"id":"String","createdAt":"0001-01-01T00:00:00.0000000Z","status":0,"canceledCount":0,"canceledAmount":0,"betCount":0,"stakeAmount":0,"winningsAmount":0,"balanceAmount":0,"balancePct":0}],"currentPage":0,"pageSize":0,"totalItems":0,"totalPages":0}