class Strutta::Entries
Entries
belong to a Strutta::Games
object Instance methods found in Strutta::APIObject
Public Class Methods
new(id = nil, game)
click to toggle source
Initializes the Strutta::Entries
object
@param id [Integer, nil] Entry id @param game [Strutta::Games] Master Strutta::Games
object @return [Strutta::Entries] instantiated Strutta::Entries
object
# File lib/strutta-api/entries.rb, line 10 def initialize(id = nil, game) @id = id @game = game @root_path = "entries/#{@id}" @no_id_error = Errors::ENTRY_ID_REQUIRED end
Public Instance Methods
leaderboard(params = {})
click to toggle source
on_demand_winners(params = {})
click to toggle source
GET on-demand winners from pool of active Entries
(no ID required) games/:game_id/entries/on-demand-winners
@return [Hash] Parsed body of the API
response
# File lib/strutta-api/entries.rb, line 39 def on_demand_winners(params = {}) @game.verify_no_id(@id) @game.get(params, 'entries/on-demand-winners') end
transitions(params = {})
click to toggle source
GET transition history for Entry (no ID required) games/:game_id/entries/:id/transitions
@return [Hash] Parsed body of the API
response
# File lib/strutta-api/entries.rb, line 21 def transitions(params = {}) @game.verify_id(@id, Errors::ENTRY_ID_REQUIRED) @game.get(params, "entries/#{@id}/transitions") end