| All Verbs | /qry/stats/last10 |
|---|
# frozen_string_literal: true
# encoding: utf-8
require 'json'
require 'servicestack'
class Rating
include ServiceStack::DTO
# @return [Integer]
attr_accessor :val
# @return [Integer]
attr_accessor :count
def self.properties
{
val: { name: 'val' },
count: { name: 'count' },
}
end
end
class Comparison
include ServiceStack::DTO
# @return [Integer]
attr_accessor :v1
# @return [Integer]
attr_accessor :v2
# @return [Float]
attr_accessor :p1
# @return [Float]
attr_accessor :p2
def self.properties
{
v1: { name: 'v1' },
v2: { name: 'v2' },
p1: { name: 'p1' },
p2: { name: 'p2' },
}
end
end
class LastRoundsStats
include ServiceStack::DTO
# @return [String]
attr_accessor :id
# @return [Array]
attr_accessor :top_six
# @return [Array]
attr_accessor :bottom_six
# @return [List]
attr_accessor :top_first_colors
# @return [List]
attr_accessor :top_colors
# @return [Comparison]
attr_accessor :first_nr_even_vs_odd
# @return [Comparison]
attr_accessor :first_nr_less_vs_greater24_5
# @return [Comparison]
attr_accessor :sum_of_first_five_less_vs_greater_than122_5
# @return [Comparison]
attr_accessor :total_even_vs_odd
def self.properties
{
id: { name: 'id' },
top_six: { name: 'topSix' },
bottom_six: { name: 'bottomSix' },
top_first_colors: { name: 'topFirstColors', type: [Rating] },
top_colors: { name: 'topColors', type: [Rating] },
first_nr_even_vs_odd: { name: 'firstNrEvenVsOdd', type: Comparison },
first_nr_less_vs_greater24_5: { name: 'firstNrLessVsGreater24_5', type: Comparison },
sum_of_first_five_less_vs_greater_than122_5: { name: 'sumOfFirstFiveLessVsGreaterThan122_5', type: Comparison },
total_even_vs_odd: { name: 'totalEvenVsOdd', type: Comparison },
}
end
end
class GetLastRoundsStats
include ServiceStack::DTO
def response_type() = LastRoundsStats
def get_type_name() = 'GetLastRoundsStats'
end
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/stats/last10 HTTP/1.1
Host: s4w2.api.bettor.webhop.biz
Accept: application/json
Content-Type: application/json
Content-Length: length
{}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"String","topSix":[0],"bottomSix":[0],"topFirstColors":[{"val":0,"count":0}],"topColors":[{"val":0,"count":0}],"firstNrEvenVsOdd":{"v1":0,"v2":0,"p1":0,"p2":0},"firstNrLessVsGreater24_5":{"v1":0,"v2":0,"p1":0,"p2":0},"sumOfFirstFiveLessVsGreaterThan122_5":{"v1":0,"v2":0,"p1":0,"p2":0},"totalEvenVsOdd":{"v1":0,"v2":0,"p1":0,"p2":0}}