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.6"
Class Method Summary
collapse
Class Method Details
.base_uri ⇒ Object
17
18
19
|
# File 'lib/transfermarkt.rb', line 17
def Transfermarkt.base_uri
"http://transfermarkt.co.uk"
end
|
.test_fetch_club ⇒ Object
30
31
32
33
|
# File 'lib/transfermarkt.rb', line 30
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_league ⇒ Object
21
22
23
24
25
26
27
28
|
# File 'lib/transfermarkt.rb', line 21
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_player ⇒ Object
40
41
42
43
|
# File 'lib/transfermarkt.rb', line 40
def self.test_fetch_player_performance_data
uri = "/en/lionel-messi/leistungsdaten/spieler_28003_2012.html"
data = Transfermarkt::Player.fetch_performance_data(uri)
end
|