class FplGsheet::Pick

Public Class Methods

new(input_hash) click to toggle source
# File lib/fpl_gsheet/pick.rb, line 4
def initialize(input_hash)

  @input_hash = input_hash
  #@fixtures = fixtures.map { |f| TeamFixture.new(f, @data['id']) }
end

Public Instance Methods

captain?() click to toggle source

def selling_price

@input_hash['selling_price'].to_f/10).round(1)

end

# File lib/fpl_gsheet/pick.rb, line 18
def captain?; @input_hash['is_captain']; end
multiplier() click to toggle source
# File lib/fpl_gsheet/pick.rb, line 20
def multiplier; @input_hash['multiplier']; end
on_bench?() click to toggle source

the above 5 are the only ones that show up all the time, eg this page fantasy.premierleague.com/drf/entry/483663/event/1/picks There's also this… fantasy.premierleague.com/drf/my-team/483663/ NUTS this is only if you are logged in :(

# File lib/fpl_gsheet/pick.rb, line 27
def on_bench? #not subsititue? cos you could be subbed on
  return @input_hash['position'] > 11
end
player_id() click to toggle source
# File lib/fpl_gsheet/pick.rb, line 10
def player_id
  @input_hash['element']
end
vice_captain?() click to toggle source
# File lib/fpl_gsheet/pick.rb, line 19
def vice_captain?; @input_hash['is_vice_captain']; end