Six4Win.WebApi

<back to all web services

GetFeedHeartbeat

The following routes are available for this service:
All Verbs/qry/feed/hb
# frozen_string_literal: true
# encoding: utf-8


require 'json'
require 'servicestack'


module Stages
    NONE = 0
    COUNTDOWN = 1
    PROCESSING = 2
    DRAW = 3
    RESULTS = 4
end

class Progress
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :step
    # @return [Integer]
    attr_accessor :steps
    # @return [Float]
    attr_accessor :pct

    def self.properties
        {
            step: { name: 'step' },
            steps: { name: 'steps' },
            pct: { name: 'pct' },
        }
    end

end

class FeedHeartbeat
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :round_id
    # @return [Stages]
    attr_accessor :stage
    # @return [Integer]
    attr_accessor :step
    # @return [Integer]
    attr_accessor :steps
    # @return [DateTime]
    attr_accessor :utc_timestamp
    # @return [Integer]
    attr_accessor :lockdown_step_from_end
    # @return [Progress]
    attr_accessor :overall
    # @return [TrueClass]
    attr_accessor :is_happy_hour

    def self.properties
        {
            round_id: { name: 'roundId' },
            stage: { name: 'stage' },
            step: { name: 'step' },
            steps: { name: 'steps' },
            utc_timestamp: { name: 'utcTimestamp', type: DateTime },
            lockdown_step_from_end: { name: 'lockdownStepFromEnd' },
            overall: { name: 'overall', type: Progress },
            is_happy_hour: { name: 'isHappyHour' },
        }
    end

end

class GetFeedHeartbeat
    include ServiceStack::DTO

    def response_type() = FeedHeartbeat
    def get_type_name() = 'GetFeedHeartbeat'
end

Ruby GetFeedHeartbeat 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/feed/hb 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

{
	roundId: String,
	stage: 0,
	step: 0,
	steps: 0,
	utcTimestamp: 0001-01-01,
	lockdownStepFromEnd: 0,
	overall: 
	{
		step: 0,
		steps: 0,
		pct: 0
	},
	isHappyHour: False
}