Module: Transfermarkt

Defined in:
lib/transfermarkt.rb,
lib/transfermarkt/club.rb,
lib/transfermarkt/league.rb,
lib/transfermarkt/player.rb,
lib/transfermarkt/version.rb,
lib/transfermarkt/live_game.rb,
lib/transfermarkt/entity_base.rb

Defined Under Namespace

Classes: Club, EntityBase, League, LiveGame, Player

Constant Summary collapse

USER_AGENT =
"Firefox"
VERSION =
"0.0.9"

Class Method Summary collapse

Class Method Details

.base_uriObject



16
17
18
# File 'lib/transfermarkt.rb', line 16

def Transfermarkt.base_uri
  "http://transfermarkt.co.uk"
end

.test_fetch_clubObject



29
30
31
32
# File 'lib/transfermarkt.rb', line 29

def self.test_fetch_club
  club_uri = "/en/maccabi-haifa/startseite/verein_1064.html"
  club = Transfermarkt::Club.fetch_by_club_uri(club_uri)
end

.test_fetch_leagueObject



20
21
22
23
24
25
26
27
# File 'lib/transfermarkt.rb', line 20

def self.test_fetch_league
  before = Time.now
  league_uri = "en/primera-division/startseite/wettbewerb_ES1.html"
  league = Transfermarkt::League.fetch_by_league_uri(league_uri)
  after = Time.now

  return {:before => before, :after => after, :league => league}
end

.test_fetch_playerObject



34
35
36
37
# File 'lib/transfermarkt.rb', line 34

def self.test_fetch_player
  uri = "/en/lionel-messi/profil/spieler_28003.html"
  player = Transfermarkt::Player.fetch_by_profile_uri(uri)
end

.test_fetch_player_performance_dataObject



39
40
41
42
# File 'lib/transfermarkt.rb', line 39

def self.test_fetch_player_performance_data
  uri = "/en/lionel-messi/leistungsdaten/spieler_28003_2012.html"
  data = Transfermarkt::Player.fetch_performance_data(uri)
end