| All Verbs | /qry/feed |
|---|
# frozen_string_literal: true
# encoding: utf-8
require 'json'
require 'servicestack'
module RoundStatus
PENDING = 0
IN_PROGRESS = 1
ENDED = 2
end
module RTPStrategies
RNG = 0
ACCUMULATOR = 1
end
module Stages
NONE = 0
COUNTDOWN = 1
PROCESSING = 2
DRAW = 3
RESULTS = 4
end
class CountdownConfiguration
include ServiceStack::DTO
# @return [Integer]
attr_accessor :lockdown_step_from_end
# @return [Integer]
attr_accessor :assert_lockdown_step_from_end
def self.properties
{
lockdown_step_from_end: { name: 'lockdownStepFromEnd' },
assert_lockdown_step_from_end: { name: 'assertLockdownStepFromEnd' },
}
end
end
class DrawConfiguration
include ServiceStack::DTO
# @return [Integer]
attr_accessor :intro_interval_in_ms
# @return [Integer]
attr_accessor :animation_interval_in_ms
# @return [Integer]
attr_accessor :outro_interval_in_ms
def self.properties
{
intro_interval_in_ms: { name: 'introIntervalInMs' },
animation_interval_in_ms: { name: 'animationIntervalInMs' },
outro_interval_in_ms: { name: 'outroIntervalInMs' },
}
end
end
class HappyHourConfiguration
include ServiceStack::DTO
# @return [TrueClass]
attr_accessor :is_happy_hour
# @return [BigDecimal]
attr_accessor :odds_modifier
# @return [BigDecimal]
attr_accessor :round_pool_bonus_pct
# @return [TrueClass]
attr_accessor :use_only_round_pool_with_no_optimizations
# @return [TrueClass]
attr_accessor :override_syphon_combination_count_per_round_threshold
# @return [BigDecimal]
attr_accessor :syphon_combination_count_per_round_threshold_pct_override
def self.properties
{
is_happy_hour: { name: 'isHappyHour' },
odds_modifier: { name: 'oddsModifier' },
round_pool_bonus_pct: { name: 'roundPoolBonusPct' },
use_only_round_pool_with_no_optimizations: { name: 'useOnlyRoundPoolWithNoOptimizations' },
override_syphon_combination_count_per_round_threshold: { name: 'overrideSyphonCombinationCountPerRoundThreshold' },
syphon_combination_count_per_round_threshold_pct_override: { name: 'syphonCombinationCountPerRoundThresholdPctOverride' },
}
end
end
class RoundConfiguration
include ServiceStack::DTO
# @return [RecordList]
attr_accessor :coefficients
# @return [TrueClass]
attr_accessor :is_double_triple_active
# @return [TrueClass]
attr_accessor :is_jackpot5_active
# @return [Integer]
attr_accessor :countdown_duration_in_seconds
# @return [CountdownConfiguration]
attr_accessor :countdown_configuration
# @return [DrawConfiguration]
attr_accessor :draw_configuration
# @return [Integer]
attr_accessor :results_duration_in_seconds
# @return [RTPStrategies]
attr_accessor :rtp_strategy
# @return [HappyHourConfiguration]
attr_accessor :happy_hour_configuration
def self.properties
{
coefficients: { name: 'coefficients', type: RecordList },
is_double_triple_active: { name: 'isDoubleTripleActive' },
is_jackpot5_active: { name: 'isJackpot5Active' },
countdown_duration_in_seconds: { name: 'countdownDurationInSeconds' },
countdown_configuration: { name: 'countdownConfiguration', type: CountdownConfiguration },
draw_configuration: { name: 'drawConfiguration', type: DrawConfiguration },
results_duration_in_seconds: { name: 'resultsDurationInSeconds' },
rtp_strategy: { name: 'rtpStrategy' },
happy_hour_configuration: { name: 'happyHourConfiguration', type: HappyHourConfiguration },
}
end
end
class BettingApp
include ServiceStack::DTO
# @return [String]
attr_accessor :name
# @return [String]
attr_accessor :version
def self.properties
{
name: { name: 'name' },
version: { name: 'version' },
}
end
end
class Ref
include ServiceStack::DTO
# @return [String]
attr_accessor :id
# @return [String]
attr_accessor :val
def self.properties
{
id: { name: 'id' },
val: { name: 'val' },
}
end
end
class RefEx < Ref
# @return [RecordDictionary]
attr_accessor :data
def self.properties
{
data: { name: 'data', type: RecordDictionary },
}
end
end
class Origin
include ServiceStack::DTO
# @return [BettingApp]
attr_accessor :application
# @return [String]
attr_accessor :ip
# @return [RefEx]
attr_accessor :organization
# @return [Ref]
attr_accessor :region
# @return [Ref]
attr_accessor :location_group
# @return [RefEx]
attr_accessor :location
# @return [RefEx]
attr_accessor :device
# @return [Ref]
attr_accessor :clerk
def self.properties
{
application: { name: 'application', type: BettingApp },
ip: { name: 'ip' },
organization: { name: 'organization', type: RefEx },
region: { name: 'region', type: Ref },
location_group: { name: 'locationGroup', type: Ref },
location: { name: 'location', type: RefEx },
device: { name: 'device', type: RefEx },
clerk: { name: 'clerk', type: Ref },
}
end
end
class JackPot5Winner
include ServiceStack::DTO
# @return [String]
attr_accessor :bet_id
# @return [Integer]
attr_accessor :nr_of_combinations
# @return [BigDecimal]
attr_accessor :winnings_amount
# @return [Origin]
attr_accessor :origin
# @return [Ref]
attr_accessor :bettor
# @return [Dictionary]
attr_accessor :payload
def self.properties
{
bet_id: { name: 'betId' },
nr_of_combinations: { name: 'nrOfCombinations' },
winnings_amount: { name: 'winningsAmount' },
origin: { name: 'origin', type: Origin },
bettor: { name: 'bettor', type: Ref },
payload: { name: 'payload' },
}
end
end
class Jackpot5Info
include ServiceStack::DTO
# @return [TrueClass]
attr_accessor :is_hit
# @return [BigDecimal]
attr_accessor :amount_accumulated
# @return [BigDecimal]
attr_accessor :amount_awarded
# @return [Integer]
attr_accessor :nr_of_winners
# @return [List]
attr_accessor :jack_pot5_winners
def self.properties
{
is_hit: { name: 'isHit' },
amount_accumulated: { name: 'amountAccumulated' },
amount_awarded: { name: 'amountAwarded' },
nr_of_winners: { name: 'nrOfWinners' },
jack_pot5_winners: { name: 'jackPot5Winners', type: [JackPot5Winner] },
}
end
end
class SuperWinWinner
include ServiceStack::DTO
# @return [TrueClass]
attr_accessor :is_drawn
# @return [DateTime]
attr_accessor :drawn_at_utc
# @return [String]
attr_accessor :round_id
# @return [String]
attr_accessor :bet_id
# @return [String]
attr_accessor :slip_id
# @return [Origin]
attr_accessor :origin
# @return [Ref]
attr_accessor :bettor
# @return [String]
attr_accessor :code
# @return [BigDecimal]
attr_accessor :amount
# @return [String]
attr_accessor :location_address_or_bettor_info
def self.properties
{
is_drawn: { name: 'isDrawn' },
drawn_at_utc: { name: 'drawnAtUtc', type: DateTime },
round_id: { name: 'roundId' },
bet_id: { name: 'betId' },
slip_id: { name: 'slipId' },
origin: { name: 'origin', type: Origin },
bettor: { name: 'bettor', type: Ref },
code: { name: 'code' },
amount: { name: 'amount' },
location_address_or_bettor_info: { name: 'locationAddressOrBettorInfo' },
}
end
end
class SuperWinInfo
include ServiceStack::DTO
# @return [TrueClass]
attr_accessor :is_active
# @return [SuperWinWinner]
attr_accessor :winner
# @return [BigDecimal]
attr_accessor :available_amount
# @return [TrueClass]
attr_accessor :all_prizes_awarded
def self.properties
{
is_active: { name: 'isActive' },
winner: { name: 'winner', type: SuperWinWinner },
available_amount: { name: 'availableAmount' },
all_prizes_awarded: { name: 'allPrizesAwarded' },
}
end
end
class WinnerByCode
include ServiceStack::DTO
# @return [String]
attr_accessor :round_id
# @return [DateTime]
attr_accessor :drawn_at_utc
# @return [String]
attr_accessor :slip_id
# @return [String]
attr_accessor :bet_id
# @return [String]
attr_accessor :code
# @return [BigDecimal]
attr_accessor :amount
# @return [Origin]
attr_accessor :origin
# @return [Ref]
attr_accessor :bettor
# @return [String]
attr_accessor :location_address_or_bettor_info
def self.properties
{
round_id: { name: 'roundId' },
drawn_at_utc: { name: 'drawnAtUtc', type: DateTime },
slip_id: { name: 'slipId' },
bet_id: { name: 'betId' },
code: { name: 'code' },
amount: { name: 'amount' },
origin: { name: 'origin', type: Origin },
bettor: { name: 'bettor', type: Ref },
location_address_or_bettor_info: { name: 'locationAddressOrBettorInfo' },
}
end
end
class GlobalCodePotInfo
include ServiceStack::DTO
# @return [TrueClass]
attr_accessor :is_active
# @return [TrueClass]
attr_accessor :is_drawn
# @return [WinnerByCode]
attr_accessor :winner
# @return [String]
attr_accessor :inert_code
# @return [BigDecimal]
attr_accessor :accumulation
def self.properties
{
is_active: { name: 'isActive' },
is_drawn: { name: 'isDrawn' },
winner: { name: 'winner', type: WinnerByCode },
inert_code: { name: 'inertCode' },
accumulation: { name: 'accumulation' },
}
end
end
class RoundProgress
include ServiceStack::DTO
# @return [Stages]
attr_accessor :stage
# @return [Integer]
attr_accessor :step
# @return [Integer]
attr_accessor :steps
# @return [DateTime]
attr_accessor :utc_timestamp
def self.properties
{
stage: { name: 'stage' },
step: { name: 'step' },
steps: { name: 'steps' },
utc_timestamp: { name: 'utcTimestamp', type: DateTime },
}
end
end
class Round
include ServiceStack::DTO
# @return [String]
attr_accessor :id
# @return [DateTime]
attr_accessor :created_at
# @return [DateTime]
attr_accessor :updated_at
# @return [DateTime]
attr_accessor :should_start_at_utc
# @return [DateTime]
attr_accessor :started_at_utc
# @return [RoundStatus]
attr_accessor :status
# @return [RoundConfiguration]
attr_accessor :configuration
# @return [String]
attr_accessor :sequence
# @return [Jackpot5Info]
attr_accessor :jackpot5_info
# @return [SuperWinInfo]
attr_accessor :super_win_info
# @return [GlobalCodePotInfo]
attr_accessor :global_code_pot_info
# @return [RoundProgress]
attr_accessor :progress
# @return [TrueClass]
attr_accessor :is_locked
# @return [TrueClass]
attr_accessor :is_calculated
def self.properties
{
id: { name: 'id' },
created_at: { name: 'createdAt', type: DateTime },
updated_at: { name: 'updatedAt', type: DateTime },
should_start_at_utc: { name: 'shouldStartAtUtc', type: DateTime },
started_at_utc: { name: 'startedAtUtc', type: DateTime },
status: { name: 'status' },
configuration: { name: 'configuration', type: RoundConfiguration },
sequence: { name: 'sequence' },
jackpot5_info: { name: 'jackpot5Info', type: Jackpot5Info },
super_win_info: { name: 'superWinInfo', type: SuperWinInfo },
global_code_pot_info: { name: 'globalCodePotInfo', type: GlobalCodePotInfo },
progress: { name: 'progress', type: RoundProgress },
is_locked: { name: 'isLocked' },
is_calculated: { name: 'isCalculated' },
}
end
end
class Feed
include ServiceStack::DTO
# @return [String]
attr_accessor :id
# @return [Round]
attr_accessor :round
# @return [Jackpot5Info]
attr_accessor :last_jackpot5_info
# @return [SuperWinInfo]
attr_accessor :super_win_info
# @return [GlobalCodePotInfo]
attr_accessor :global_code_pot_info
def self.properties
{
id: { name: 'id' },
round: { name: 'round', type: Round },
last_jackpot5_info: { name: 'lastJackpot5Info', type: Jackpot5Info },
super_win_info: { name: 'superWinInfo', type: SuperWinInfo },
global_code_pot_info: { name: 'globalCodePotInfo', type: GlobalCodePotInfo },
}
end
end
class GetFeed
include ServiceStack::DTO
def response_type() = Feed
def get_type_name() = 'GetFeed'
end
class RecordList < Array
end
class RecordDictionary < Hash
end
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/feed HTTP/1.1
Host: s4w1.api.bettor.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
round:
{
id: String,
createdAt: 0001-01-01,
updatedAt: 0001-01-01,
shouldStartAtUtc: 0001-01-01,
startedAtUtc: 0001-01-01,
status: 0,
configuration:
{
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,
useOnlyRoundPoolWithNoOptimizations: False,
overrideSyphonCombinationCountPerRoundThreshold: False,
syphonCombinationCountPerRoundThresholdPctOverride: 0
}
},
sequence: String,
jackpot5Info:
{
isHit: False,
amountAccumulated: 0,
amountAwarded: 0,
nrOfWinners: 0,
jackPot5Winners:
[
{
betId: String,
nrOfCombinations: 0,
winningsAmount: 0,
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
}
},
bettor:
{
id: String,
val: String
},
payload:
{
String: String
}
}
]
},
superWinInfo:
{
isActive: False,
winner:
{
isDrawn: False,
drawnAtUtc: 0001-01-01,
roundId: String,
betId: String,
slipId: 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
}
},
bettor:
{
id: String,
val: String
},
code: String,
amount: 0,
locationAddressOrBettorInfo: String
},
availableAmount: 0,
allPrizesAwarded: False
},
globalCodePotInfo:
{
isActive: False,
isDrawn: True,
winner:
{
roundId: String,
drawnAtUtc: 0001-01-01,
slipId: String,
betId: String,
code: String,
amount: 0,
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
}
},
bettor:
{
id: String,
val: String
},
locationAddressOrBettorInfo: String
},
inertCode: String,
accumulation: 0
},
progress:
{
stage: 0,
step: 0,
steps: 0,
utcTimestamp: 0001-01-01
},
isLocked: False,
isCalculated: False
},
lastJackpot5Info:
{
isHit: False,
amountAccumulated: 0,
amountAwarded: 0,
nrOfWinners: 0,
jackPot5Winners:
[
{
betId: String,
nrOfCombinations: 0,
winningsAmount: 0,
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
}
},
bettor:
{
id: String,
val: String
},
payload:
{
String: String
}
}
]
},
superWinInfo:
{
isActive: False,
winner:
{
isDrawn: False,
drawnAtUtc: 0001-01-01,
roundId: String,
betId: String,
slipId: 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
}
},
bettor:
{
id: String,
val: String
},
code: String,
amount: 0,
locationAddressOrBettorInfo: String
},
availableAmount: 0,
allPrizesAwarded: False
},
globalCodePotInfo:
{
isActive: False,
isDrawn: True,
winner:
{
roundId: String,
drawnAtUtc: 0001-01-01,
slipId: String,
betId: String,
code: String,
amount: 0,
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
}
},
bettor:
{
id: String,
val: String
},
locationAddressOrBettorInfo: String
},
inertCode: String,
accumulation: 0
}
}