Class: ESPN::Client
- Inherits:
-
Object
- Object
- ESPN::Client
- Includes:
- Sports, Teams, Connection, Request
- Defined in:
- lib/espn/client.rb,
lib/espn/client/teams.rb,
lib/espn/client/sports.rb
Defined Under Namespace
Instance Method Summary collapse
-
#api_url ⇒ String
Provides the URL for accessing the API.
-
#authed? ⇒ Boolean
Determine if an api_key has been set.
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Teams
Methods included from Sports
Methods included from Request
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 |
# File 'lib/espn/client.rb', line 11 def initialize(={}) = ESPN..merge() Configuration::VALID_OPTIONS_KEYS.each do |key| send("#{key}=", [key]) end end |
Instance Method Details
#api_url ⇒ String
Provides the URL for accessing the API
21 22 23 |
# File 'lib/espn/client.rb', line 21 def api_url "http://api.espn.com/v1" end |
#authed? ⇒ Boolean
Determine if an api_key has been set
28 29 30 |
# File 'lib/espn/client.rb', line 28 def authed? !api_key.nil? end |