Greyhounds.WebApi

<back to all web services

FindLocationRoundStats

The following routes are available for this service:
All Verbs/locations/byRound
import Foundation
import ServiceStack

public class FindLocationRoundStats : Codable
{
    public var roundId:String
    public var search:String
    public var orderBy:String
    public var order:Order
    public var currentPage:Int
    public var pageSize:Int

    required public init(){}
}

public enum Order : Int, Codable
{
    case None = 0
    case Ascending = 1
    case Descending = 2
}

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 FindLocationRoundStats DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /locations/byRound HTTP/1.1 
Host: grh1.api.bettor.webhop.biz 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"roundId":"String","search":"String","orderBy":"String","order":0,"currentPage":0,"pageSize":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"data":[{"roundId":"String","locationId":"String","location":"String","betCount":0,"betAmount":0,"pct":0}],"currentPage":0,"pageSize":0,"totalItems":0,"totalPages":0}