Six4Win.WebApi

<back to all web services

GetRecentWins

The following routes are available for this service:
All Verbs/qry/wins/recent
namespace Six4Win.WebApi.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type Ref() = 
        member val Id:String = null with get,set
        member val Val:String = null with get,set

    [<AllowNullLiteral>]
    type BettingApp() = 
        member val Name:String = null with get,set
        member val Version:String = null with get,set

    [<AllowNullLiteral>]
    type RefEx() = 
        inherit Ref()
        member val Data:RecordDictionary<String, String> = null with get,set

    [<AllowNullLiteral>]
    type Origin() = 
        member val Application:BettingApp = null with get,set
        member val IP:String = null with get,set
        member val Organization:RefEx = null with get,set
        member val Region:Ref = null with get,set
        member val LocationGroup:Ref = null with get,set
        member val Location:RefEx = null with get,set
        member val Device:RefEx = null with get,set
        member val Clerk:Ref = null with get,set

    type BetOutcome =
        | Unknown = 0
        | Lost = 1
        | Won = 2
        | Void = 3

    type BetProcessingStatus =
        | Open = 0
        | Closed = 1

    type BetValidity =
        | Valid = 0
        | Canceled = 1
        | Void = 2
        | Reverted = 3

    [<AllowNullLiteral>]
    type Win() = 
        member val Id:Int64 = new Int64() with get,set
        member val SId:Int64 = new Int64() with get,set
        member val Bettor:Ref = null with get,set
        member val Origin:Origin = null with get,set
        member val PlacedAt:DateTime = new DateTime() with get,set
        member val RoundId:Int64 = new Int64() with get,set
        member val Content:String = null with get,set
        member val Stake:Decimal = new Decimal() with get,set
        member val Outcome:BetOutcome = new BetOutcome() with get,set
        member val Amount:Decimal = new Decimal() with get,set
        member val ProcessingStatus:BetProcessingStatus = new BetProcessingStatus() with get,set
        member val Validity:BetValidity = new BetValidity() with get,set
        member val Results:Dictionary<String, String> = null with get,set
        member val Payload:Dictionary<String, String> = null with get,set

    [<AllowNullLiteral>]
    type RecentWins() = 
        member val Id:String = null with get,set
        member val Wins:ResizeArray<Win> = null with get,set
        member val MaxSize:Int32 = new Int32() with get,set
        member val Threshold:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type GetRecentWins() = 
        class end

    [<AllowNullLiteral>]
    type RecordDictionary<TKey, TVal>() = 
        inherit Dictionary<TKey, TVal>()

F# GetRecentWins DTOs

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

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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-01,
			roundId: 0,
			content: String,
			stake: 0,
			outcome: 0,
			amount: 0,
			processingStatus: 0,
			validity: 0,
			results: 
			{
				String: String
			},
			payload: 
			{
				String: String
			}
		}
	],
	maxSize: 0,
	threshold: 0
}