Six4Win.WebApi

<back to all web services

GetRecentWins

The following routes are available for this service:
All Verbs/qry/wins/recent
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Six4Win.WebApi.ServiceModel;
using Six4Win.ReadModel;
using Six4Win.ReadModel.Bets;
using Starnet.Common;
using Betting.Common;
using Six4Win;

namespace Betting.Common
{
    public enum BetOutcome
    {
        Unknown = 0,
        Lost = 1,
        Won = 2,
        Void = 3,
    }

    public partial class BettingApp
    {
        public virtual string Name { get; set; }
        public virtual string Version { get; set; }
    }

    public enum BetValidity
    {
        Valid = 0,
        Canceled = 1,
        Void = 2,
        Reverted = 3,
    }

    public partial class Origin
    {
        public virtual BettingApp Application { get; set; }
        public virtual string IP { get; set; }
        public virtual RefEx Organization { get; set; }
        public virtual Ref Region { get; set; }
        public virtual Ref LocationGroup { get; set; }
        public virtual RefEx Location { get; set; }
        public virtual RefEx Device { get; set; }
        public virtual Ref Clerk { get; set; }
    }

}

namespace Six4Win
{
    public enum BetProcessingStatus
    {
        Open = 0,
        Closed = 1,
    }

}

namespace Six4Win.ReadModel
{
    public partial class RecentWins
    {
        public virtual string Id { get; set; }
        public virtual List<Win> Wins { get; set; }
        public virtual int MaxSize { get; set; }
        public virtual decimal Threshold { get; set; }
    }

}

namespace Six4Win.ReadModel.Bets
{
    public partial class Win
    {
        public virtual long Id { get; set; }
        public virtual long SId { get; set; }
        public virtual Ref Bettor { get; set; }
        public virtual Origin Origin { get; set; }
        public virtual DateTime PlacedAt { get; set; }
        public virtual long RoundId { get; set; }
        public virtual string Content { get; set; }
        public virtual decimal Stake { get; set; }
        public virtual BetOutcome Outcome { get; set; }
        public virtual decimal Amount { get; set; }
        public virtual BetProcessingStatus ProcessingStatus { get; set; }
        public virtual BetValidity Validity { get; set; }
        public virtual Dictionary<string, string> Results { get; set; }
        public virtual Dictionary<string, string> Payload { get; set; }
    }

}

namespace Six4Win.WebApi.ServiceModel
{
    public partial class GetRecentWins
    {
    }

}

namespace Starnet.Common
{
    public partial class RecordDictionary<TKey, TVal>
        : Dictionary<TKey, TVal>
    {
    }

    public partial class Ref
    {
        public virtual string Id { get; set; }
        public virtual string Val { get; set; }
    }

    public partial class RefEx
        : Ref
    {
        public virtual RecordDictionary<string, string> Data { get; set; }
    }

}

C# 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
}