Module: Xmlstats
- Defined in:
- lib/xmlstats.rb,
lib/xmlstats/object.rb,
lib/xmlstats/version.rb,
lib/xmlstats/endpoint.rb,
lib/xmlstats/cachers/redis.rb,
lib/xmlstats/cachers/memory.rb,
lib/xmlstats/http_getters/net_http.rb
Defined Under Namespace
Modules: Cachers, Endpoint, Endpoints, HttpGetters, Objects
Classes: Object
Constant Summary
collapse
- VERSION =
"1.0.0"
Class Method Summary
collapse
Class Method Details
44
45
46
|
# File 'lib/xmlstats.rb', line 44
def self.api_key
@api_key
end
|
.api_key=(api_key) ⇒ Object
48
49
50
|
# File 'lib/xmlstats.rb', line 48
def self.api_key= api_key
@api_key = api_key
end
|
69
70
71
|
# File 'lib/xmlstats.rb', line 69
def self.cacher
@cacher || Xmlstats::Cachers::Memory.new
end
|
.cacher=(cacher) ⇒ Object
73
74
75
|
# File 'lib/xmlstats.rb', line 73
def self.cacher= cacher
@cacher = cacher
end
|
52
53
54
55
|
# File 'lib/xmlstats.rb', line 52
def self.contact_info
error = "specify user-agent contact info with: Xmlstats.contact_info = '[email protected]'"
@contact_info or raise(error)
end
|
57
58
59
|
# File 'lib/xmlstats.rb', line 57
def self.contact_info= contact_info
@contact_info = contact_info
end
|
.events(*args) ⇒ Object
77
78
79
|
# File 'lib/xmlstats.rb', line 77
def self.events *args
Xmlstats::Endpoints::Events.fetch *args
end
|
.http_getter ⇒ Object
61
62
63
|
# File 'lib/xmlstats.rb', line 61
def self.http_getter
@http_getter || Xmlstats::HttpGetters::NetHttp.new
end
|
.http_getter=(http_getter) ⇒ Object
65
66
67
|
# File 'lib/xmlstats.rb', line 65
def self.http_getter= http_getter
@http_getter = http_getter
end
|
.mlb_box_score(*args) ⇒ Object
81
82
83
|
# File 'lib/xmlstats.rb', line 81
def self.mlb_box_score *args
Xmlstats::Endpoints::MlbBoxScore.fetch *args
end
|
.mlb_standing(*args) ⇒ Object
89
90
91
|
# File 'lib/xmlstats.rb', line 89
def self.mlb_standing *args
Xmlstats::Endpoints::MlbStanding.fetch *args
end
|
.mlb_team_results(*args) ⇒ Object
101
102
103
|
# File 'lib/xmlstats.rb', line 101
def self.mlb_team_results *args
Xmlstats::Endpoints::MlbTeamResults.fetch *args
end
|
.mlb_teams(*args) ⇒ Object
109
110
111
|
# File 'lib/xmlstats.rb', line 109
def self.mlb_teams *args
Xmlstats::Endpoints::MlbTeams.fetch *args
end
|
.mlb_wild_card_standing(*args) ⇒ Object
97
98
99
|
# File 'lib/xmlstats.rb', line 97
def self.mlb_wild_card_standing *args
Xmlstats::Endpoints::MlbWildCardStanding.fetch *args
end
|
.nba_box_score(*args) ⇒ Object
85
86
87
|
# File 'lib/xmlstats.rb', line 85
def self.nba_box_score *args
Xmlstats::Endpoints::NbaBoxScore.fetch *args
end
|
.nba_leaders(*args) ⇒ Object
117
118
119
|
# File 'lib/xmlstats.rb', line 117
def self.nba_leaders *args
Xmlstats::Endpoints::NbaLeaders.fetch *args
end
|
.nba_standing(*args) ⇒ Object
93
94
95
|
# File 'lib/xmlstats.rb', line 93
def self.nba_standing *args
Xmlstats::Endpoints::NbaStanding.fetch *args
end
|
.nba_team_results(*args) ⇒ Object
105
106
107
|
# File 'lib/xmlstats.rb', line 105
def self.nba_team_results *args
Xmlstats::Endpoints::NbaTeamResults.fetch *args
end
|
.nba_teams(*args) ⇒ Object
113
114
115
|
# File 'lib/xmlstats.rb', line 113
def self.nba_teams *args
Xmlstats::Endpoints::NbaTeams.fetch *args
end
|