Module: Football::Butler
- Includes:
- Configuration, Tier
- Defined in:
- lib/football/butler.rb,
lib/football/butler/api.rb,
lib/football/butler/base.rb,
lib/football/butler/odds.rb,
lib/football/butler/tier.rb,
lib/football/butler/areas.rb,
lib/football/butler/teams.rb,
lib/football/butler/coachs.rb,
lib/football/butler/events.rb,
lib/football/butler/venues.rb,
lib/football/butler/leagues.rb,
lib/football/butler/lineups.rb,
lib/football/butler/matches.rb,
lib/football/butler/players.rb,
lib/football/butler/scorers.rb,
lib/football/butler/version.rb,
lib/football/butler/fixtures.rb,
lib/football/butler/injuries.rb,
lib/football/butler/trophies.rb,
lib/football/butler/countries.rb,
lib/football/butler/standings.rb,
lib/football/butler/timezones.rb,
lib/football/butler/transfers.rb,
lib/football/butler/sidelineds.rb,
lib/football/butler/statistics.rb,
lib/football/butler/predictions.rb,
lib/football/butler/top_scorers.rb,
lib/football/butler/competitions.rb,
lib/football/butler/head_to_head.rb,
lib/football/butler/configuration.rb,
lib/football/butler/apifootball/odds.rb,
lib/football/butler/api_football/odds.rb,
lib/football/butler/apifootball/teams.rb,
lib/football/butler/api_football/teams.rb,
lib/football/butler/apifootball/events.rb,
lib/football/butler/football_data/odds.rb,
lib/football/butler/api_football/coachs.rb,
lib/football/butler/api_football/venues.rb,
lib/football/butler/apifootball/lineups.rb,
lib/football/butler/apifootball/players.rb,
lib/football/butler/football_data/areas.rb,
lib/football/butler/football_data/teams.rb,
lib/football/butler/api_football/leagues.rb,
lib/football/butler/api_football/lineups.rb,
lib/football/butler/api_football/players.rb,
lib/football/butler/api_football/fixtures.rb,
lib/football/butler/api_football/injuries.rb,
lib/football/butler/api_football/trophies.rb,
lib/football/butler/apifootball/countries.rb,
lib/football/butler/apifootball/standings.rb,
lib/football/butler/football_data/lineups.rb,
lib/football/butler/football_data/matches.rb,
lib/football/butler/football_data/players.rb,
lib/football/butler/football_data/scorers.rb,
lib/football/butler/api_football/countries.rb,
lib/football/butler/api_football/standings.rb,
lib/football/butler/api_football/timezones.rb,
lib/football/butler/api_football/transfers.rb,
lib/football/butler/apifootball/statistics.rb,
lib/football/butler/api_football/sidelineds.rb,
lib/football/butler/api_football/statistics.rb,
lib/football/butler/apifootball/predictions.rb,
lib/football/butler/apifootball/top_scorers.rb,
lib/football/butler/football_data/standings.rb,
lib/football/butler/api_football/predictions.rb,
lib/football/butler/api_football/top_scorers.rb,
lib/football/butler/apifootball/competitions.rb,
lib/football/butler/apifootball/head_to_head.rb,
lib/football/butler/api_football/head_to_head.rb,
lib/football/butler/football_data/competitions.rb,
lib/football/butler/football_data/head_to_head.rb,
lib/football/butler/apifootball/base_apifootball.rb,
lib/football/butler/api_football/base_api_football.rb
Defined Under Namespace
Modules: ApiFootball, Apifootball, Configuration, FootballData, Tier Classes: Api, Areas, Base, Coachs, Competitions, Countries, Events, Fixtures, HeadToHead, Injuries, Leagues, Lineups, Matches, Odds, Players, Predictions, Scorers, Sidelineds, Standings, Statistics, Teams, Timezones, TopScorers, Transfers, Trophies, Venues
Constant Summary collapse
- VERSION =
Minor Adjustments and Feauture Freeze due to follow up gem: sports-butler January 2022
Supported APIs;
-
www.football-data.org (>= 1.0.0)
-
apifootball.com (>= 2.0.0)
-
api-football.com (>= 2.1.0)
-
"2.1.1"
Constants included from Tier
Tier::COUNTER_RESET_SAFE_SECONDS
Constants included from Configuration
Configuration::API_URL_APIFOOTBALL, Configuration::API_URL_API_FOOTBALL, Configuration::API_URL_FOOTBALL_DATA, Configuration::API_VERSION_APIFOOTBALL, Configuration::API_VERSION_API_FOOTBALL, Configuration::API_VERSION_FOOTBALL_DATA, Configuration::AVAILABLE_APIS, Configuration::DEFAULT_API_ENDPOINT, Configuration::DEFAULT_API_NAME, Configuration::DEFAULT_API_TOKEN, Configuration::DEFAULT_API_URL, Configuration::DEFAULT_API_VERSION, Configuration::DEFAULT_TIER_PLAN, Configuration::DEFAULT_WAIT_ON_LIMIT, Configuration::MSG_REACHED_LIMIT
Class Method Summary collapse
Methods included from Tier
available_minute?, count_request, counter_reset?, get_sleep_seconds, limit_exceeded?, reset_sleep_seconds, reset_total_requests, set_from_response_headers, set_tier_from_response
Methods included from Configuration
api_class, api_name_valid?, api_result, class_converter, configure, http_party_headers, http_party_response, http_party_url, reached_limit?, reconfigure, reset, response_api_football_com, response_apifootball_com, response_football_data_org, set_api_endpoint, set_api_name, set_header_token_name, set_wait_on_limit, tier_from_response, tier_plan_filter
Class Method Details
.get(path:, filters: {}, result: :default) ⇒ Object
39 40 41 |
# File 'lib/football/butler.rb', line 39 def get(path:, filters: {}, result: :default) Api.get(path: path, filters: filters, result: result) end |
.logger ⇒ Object
43 44 45 |
# File 'lib/football/butler.rb', line 43 def logger @@logger ||= defined?(Rails) && Rails.logger ? Rails.logger : Logger.new(STDOUT) end |
.logger=(logger) ⇒ Object
47 48 49 |
# File 'lib/football/butler.rb', line 47 def logger=(logger) @@logger = logger end |