Six4Win.WebApi

<back to all web services

ConfigureGame

Requires Authentication
The following routes are available for this service:
POST/cmd/configure/game
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;
using Starnet.Common;

namespace Six4Win
{
    public partial class CountdownConfiguration
    {
        public virtual int LockdownStepFromEnd { get; set; }
        public virtual int AssertLockdownStepFromEnd { get; set; }
    }

    public partial class DrawConfiguration
    {
        public virtual int IntroIntervalInMs { get; set; }
        public virtual int AnimationIntervalInMs { get; set; }
        public virtual int OutroIntervalInMs { get; set; }
    }

    public partial class HappyHourConfig
    {
        public virtual bool IsActive { get; set; }
        public virtual List<HappyHourItem> Items { get; set; }
        public partial class HappyHourItem
        {
            public virtual long Id { get; set; }
            public virtual TimeInterval Interval { get; set; }
            public virtual decimal OddsModifier { get; set; }
            public virtual decimal RoundPoolBonusPct { get; set; }
        }

        public partial class TimeInterval
        {
            public virtual TimePoint Start { get; set; }
            public virtual TimePoint End { get; set; }
        }

        public partial class TimePoint
        {
            public virtual int Hour { get; set; }
            public virtual int Minute { get; set; }
        }

    }

    public partial class HappyHourConfiguration
    {
        public virtual bool IsHappyHour { get; set; }
        public virtual decimal OddsModifier { get; set; }
        public virtual decimal RoundPoolBonusPct { get; set; }
    }

    public partial class RoundConfiguration
    {
        public virtual RecordList<float> Coefficients { get; set; }
        public virtual bool IsDoubleTripleActive { get; set; }
        public virtual bool IsJackpot5Active { get; set; }
        public virtual int CountdownDurationInSeconds { get; set; }
        public virtual CountdownConfiguration CountdownConfiguration { get; set; }
        public virtual DrawConfiguration DrawConfiguration { get; set; }
        public virtual int ResultsDurationInSeconds { get; set; }
        public virtual RTPStrategies RTPStrategy { get; set; }
        public virtual HappyHourConfiguration HappyHourConfiguration { get; set; }
    }

    public enum RTPStrategies
    {
        RNG = 0,
        Accumulator = 1,
    }

}

namespace Six4Win.ReadModel
{
    public partial class GameConfiguration
    {
        public virtual string Id { get; set; }
        public virtual int QueueSize { get; set; }
        public virtual RoundConfiguration RoundConfiguration { get; set; }
        public virtual HappyHourConfig HappyHourConfig { get; set; }
    }

}

namespace Six4Win.WebApi.ServiceModel
{
    public partial class ConfigureGame
    {
        public virtual string Id { get; set; }
        public virtual GameConfiguration Configuration { get; set; }
    }

}

namespace Starnet.Common
{
    public partial class RecordList<T>
        : List<T>
    {
    }

}

C# ConfigureGame 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 /cmd/configure/game HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	configuration: 
	{
		queueSize: 0,
		roundConfiguration: 
		{
			coefficients: 
			[
				0
			],
			isDoubleTripleActive: False,
			isJackpot5Active: False,
			countdownDurationInSeconds: 0,
			countdownConfiguration: 
			{
				lockdownStepFromEnd: 0,
				assertLockdownStepFromEnd: 0
			},
			drawConfiguration: 
			{
				introIntervalInMs: 0,
				animationIntervalInMs: 0,
				outroIntervalInMs: 0
			},
			resultsDurationInSeconds: 0,
			rtpStrategy: 0,
			happyHourConfiguration: 
			{
				isHappyHour: False,
				oddsModifier: 0,
				roundPoolBonusPct: 0
			}
		},
		happyHourConfig: 
		{
			isActive: False,
			items: 
			[
				{
					id: 0,
					interval: 
					{
						start: 
						{
							hour: 0,
							minute: 0
						},
						end: 
						{
							hour: 0,
							minute: 0
						}
					},
					oddsModifier: 0,
					roundPoolBonusPct: 0
				}
			]
		}
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	errorCode: String,
	message: String,
	stackTrace: String,
	errors: 
	[
		{
			errorCode: String,
			fieldName: String,
			message: String,
			meta: 
			{
				String: String
			}
		}
	],
	meta: 
	{
		String: String
	}
}