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 .xml suffix or ?format=xml

HTTP + XML

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

<FindLocationRoundStats xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.WebApi.ServiceModel">
  <CurrentPage>0</CurrentPage>
  <Order>None</Order>
  <OrderBy>String</OrderBy>
  <PageSize>0</PageSize>
  <RoundId>String</RoundId>
  <Search>String</Search>
</FindLocationRoundStats>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PaginatedResultOfLocationRoundStatsHTcU5Hwp xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.ReadModel">
  <CurrentPage>0</CurrentPage>
  <Data>
    <LocationRoundStats>
      <BetAmount>0</BetAmount>
      <BetCount>0</BetCount>
      <Location>String</Location>
      <LocationId>String</LocationId>
      <Pct>0</Pct>
      <RoundId>String</RoundId>
    </LocationRoundStats>
  </Data>
  <PageSize>0</PageSize>
  <TotalItems>0</TotalItems>
  <TotalPages>0</TotalPages>
</PaginatedResultOfLocationRoundStatsHTcU5Hwp>