sports_api 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +39 -0
  3. data/CHANGELOG.md +5 -0
  4. data/CODE_OF_CONDUCT.md +84 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +310 -0
  7. data/Rakefile +12 -0
  8. data/docs/.nojekyll +0 -0
  9. data/docs/README.md +12 -0
  10. data/docs/_media/favicon.ico +0 -0
  11. data/docs/_media/home-logo.svg +57 -0
  12. data/docs/_media/readme-logo.png +0 -0
  13. data/docs/_sidebar.md +42 -0
  14. data/docs/cover.md +2 -0
  15. data/docs/index.html +44 -0
  16. data/docs/installation.md +17 -0
  17. data/docs/resources.md +932 -0
  18. data/docs/usage.md +13 -0
  19. data/lib/sports_api/collection.rb +30 -0
  20. data/lib/sports_api/error.rb +5 -0
  21. data/lib/sports_api/football/client.rb +180 -0
  22. data/lib/sports_api/football/objects/coach.rb +8 -0
  23. data/lib/sports_api/football/objects/country.rb +8 -0
  24. data/lib/sports_api/football/objects/fixtures/fixture.rb +8 -0
  25. data/lib/sports_api/football/objects/fixtures/fixture_event.rb +8 -0
  26. data/lib/sports_api/football/objects/fixtures/fixture_head_to_head.rb +8 -0
  27. data/lib/sports_api/football/objects/fixtures/fixture_lineup.rb +8 -0
  28. data/lib/sports_api/football/objects/fixtures/fixture_player_statistic.rb +8 -0
  29. data/lib/sports_api/football/objects/fixtures/fixture_round.rb +8 -0
  30. data/lib/sports_api/football/objects/fixtures/fixture_statistic.rb +8 -0
  31. data/lib/sports_api/football/objects/injury.rb +8 -0
  32. data/lib/sports_api/football/objects/leagues/league.rb +8 -0
  33. data/lib/sports_api/football/objects/leagues/league_season.rb +8 -0
  34. data/lib/sports_api/football/objects/odds_in_play/odds_live.rb +8 -0
  35. data/lib/sports_api/football/objects/odds_in_play/odds_live_bet.rb +8 -0
  36. data/lib/sports_api/football/objects/odds_pre_match/odds.rb +8 -0
  37. data/lib/sports_api/football/objects/odds_pre_match/odds_bet.rb +8 -0
  38. data/lib/sports_api/football/objects/odds_pre_match/odds_bookmaker.rb +8 -0
  39. data/lib/sports_api/football/objects/odds_pre_match/odds_mapping.rb +8 -0
  40. data/lib/sports_api/football/objects/players/player.rb +8 -0
  41. data/lib/sports_api/football/objects/players/player_season.rb +8 -0
  42. data/lib/sports_api/football/objects/players/player_squad.rb +8 -0
  43. data/lib/sports_api/football/objects/players/player_top_assist.rb +8 -0
  44. data/lib/sports_api/football/objects/players/player_top_red_card.rb +8 -0
  45. data/lib/sports_api/football/objects/players/player_top_scorer.rb +8 -0
  46. data/lib/sports_api/football/objects/players/player_top_yellow_card.rb +8 -0
  47. data/lib/sports_api/football/objects/prediction.rb +8 -0
  48. data/lib/sports_api/football/objects/sidelined.rb +8 -0
  49. data/lib/sports_api/football/objects/standing.rb +8 -0
  50. data/lib/sports_api/football/objects/teams/team.rb +8 -0
  51. data/lib/sports_api/football/objects/teams/team_country.rb +8 -0
  52. data/lib/sports_api/football/objects/teams/team_season.rb +8 -0
  53. data/lib/sports_api/football/objects/teams/team_statistic.rb +8 -0
  54. data/lib/sports_api/football/objects/timezone.rb +8 -0
  55. data/lib/sports_api/football/objects/transfer.rb +8 -0
  56. data/lib/sports_api/football/objects/trophy.rb +8 -0
  57. data/lib/sports_api/football/objects/venue.rb +8 -0
  58. data/lib/sports_api/football/resources/coach.rb +21 -0
  59. data/lib/sports_api/football/resources/country.rb +26 -0
  60. data/lib/sports_api/football/resources/fixtures/fixture.rb +32 -0
  61. data/lib/sports_api/football/resources/fixtures/fixture_event.rb +17 -0
  62. data/lib/sports_api/football/resources/fixtures/fixture_head_to_head.rb +24 -0
  63. data/lib/sports_api/football/resources/fixtures/fixture_lineup.rb +17 -0
  64. data/lib/sports_api/football/resources/fixtures/fixture_player_statistic.rb +15 -0
  65. data/lib/sports_api/football/resources/fixtures/fixture_round.rb +16 -0
  66. data/lib/sports_api/football/resources/fixtures/fixture_statistic.rb +16 -0
  67. data/lib/sports_api/football/resources/injury.rb +21 -0
  68. data/lib/sports_api/football/resources/leagues/league.rb +27 -0
  69. data/lib/sports_api/football/resources/leagues/league_season.rb +12 -0
  70. data/lib/sports_api/football/resources/odds_in_play/odds_live.rb +16 -0
  71. data/lib/sports_api/football/resources/odds_in_play/odds_live_bet.rb +20 -0
  72. data/lib/sports_api/football/resources/odds_pre_match/odds.rb +21 -0
  73. data/lib/sports_api/football/resources/odds_pre_match/odds_bet.rb +20 -0
  74. data/lib/sports_api/football/resources/odds_pre_match/odds_bookmaker.rb +20 -0
  75. data/lib/sports_api/football/resources/odds_pre_match/odds_mapping.rb +14 -0
  76. data/lib/sports_api/football/resources/players/player.rb +20 -0
  77. data/lib/sports_api/football/resources/players/player_season.rb +14 -0
  78. data/lib/sports_api/football/resources/players/player_squad.rb +15 -0
  79. data/lib/sports_api/football/resources/players/player_top_assist.rb +21 -0
  80. data/lib/sports_api/football/resources/players/player_top_red_card.rb +21 -0
  81. data/lib/sports_api/football/resources/players/player_top_scorer.rb +21 -0
  82. data/lib/sports_api/football/resources/players/player_top_yellow_card.rb +21 -0
  83. data/lib/sports_api/football/resources/prediction.rb +14 -0
  84. data/lib/sports_api/football/resources/sidelined.rb +15 -0
  85. data/lib/sports_api/football/resources/standing.rb +16 -0
  86. data/lib/sports_api/football/resources/teams/team.rb +26 -0
  87. data/lib/sports_api/football/resources/teams/team_country.rb +12 -0
  88. data/lib/sports_api/football/resources/teams/team_season.rb +14 -0
  89. data/lib/sports_api/football/resources/teams/team_statistic.rb +24 -0
  90. data/lib/sports_api/football/resources/timezone.rb +12 -0
  91. data/lib/sports_api/football/resources/transfer.rb +15 -0
  92. data/lib/sports_api/football/resources/trophy.rb +15 -0
  93. data/lib/sports_api/football/resources/venue.rb +23 -0
  94. data/lib/sports_api/football.rb +84 -0
  95. data/lib/sports_api/object.rb +35 -0
  96. data/lib/sports_api/resource.rb +32 -0
  97. data/lib/sports_api/version.rb +5 -0
  98. data/lib/sports_api.rb +8 -0
  99. data/sig/sports_api.rbs +4 -0
  100. data/sports_api.gemspec +40 -0
  101. metadata +175 -0
data/docs/usage.md ADDED
@@ -0,0 +1,13 @@
1
+ # Usage <!-- {docsify-ignore} -->
2
+
3
+ To access the API, you'll need to create a client and pass in your API key. You can find your API key at [https://dashboard.api-football.com/profile](https://dashboard.api-football.com/profile?access), example:
4
+
5
+ ```ruby
6
+ client = SportsApi::Football::Client.new(api_key: ENV["SPORTS_API_KEY"])
7
+ ```
8
+
9
+ The client then gives you access to each of the resources, for example:
10
+
11
+ ```ruby
12
+ client.coaches.list(search: 'Tuchel')
13
+ ```
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ class Collection
5
+ attr_reader :data, :total, :current, :results
6
+
7
+ # Example usage:
8
+ # from_reponse(response, key: "response", type: League)
9
+ # SportsApi::Collection.from_response(response, type: SportsApi::Football::League)
10
+ def self.from_response(response, type:, key: 'response')
11
+ body = response.body
12
+
13
+ new(
14
+ data: body[key].map { |attrs| type.new(attrs) },
15
+ total: body['results'],
16
+ paging: body['paging'],
17
+ paging_total: body.dig('paging', 'total'),
18
+ paging_current: body.dig('paging', 'current')
19
+ )
20
+ end
21
+
22
+ def initialize(data:, total:, paging:, paging_total:, paging_current:)
23
+ @data = data
24
+ @total = total
25
+ @paging = paging
26
+ @paging_total = paging_total
27
+ @paging_current = paging_current
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ class Error < StandardError; end
5
+ end
@@ -0,0 +1,180 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'faraday'
4
+
5
+ module SportsApi
6
+ module Football
7
+ # rubocop:disable Metrics/ClassLength
8
+ class Client
9
+ BASE_URL = 'https://v3.football.api-sports.io/'
10
+
11
+ attr_reader :api_key, :adapter
12
+
13
+ def initialize(api_key:, adapter: Faraday.default_adapter, stubs: nil)
14
+ @api_key = api_key
15
+ @adapter = adapter
16
+
17
+ # Test stubs for requests
18
+ @stubs = stubs
19
+ end
20
+
21
+ def coaches
22
+ CoachResource.new(self)
23
+ end
24
+
25
+ def countries
26
+ CountryResource.new(self)
27
+ end
28
+
29
+ def fixtures
30
+ FixtureResource.new(self)
31
+ end
32
+
33
+ def fixture_rounds
34
+ FixtureRoundResource.new(self)
35
+ end
36
+
37
+ def fixture_head_to_head
38
+ FixtureHeadToHeadResource.new(self)
39
+ end
40
+
41
+ def fixture_statistics
42
+ FixtureStatisticResource.new(self)
43
+ end
44
+
45
+ def fixture_events
46
+ FixtureEventResource.new(self)
47
+ end
48
+
49
+ def fixture_lineups
50
+ FixtureLineupResource.new(self)
51
+ end
52
+
53
+ def fixture_player_statistics
54
+ FixturePlayerStatisticResource.new(self)
55
+ end
56
+
57
+ def injuries
58
+ InjuryResource.new(self)
59
+ end
60
+
61
+ def leagues
62
+ LeagueResource.new(self)
63
+ end
64
+
65
+ def league_seasons
66
+ LeagueSeasonResource.new(self)
67
+ end
68
+
69
+ def odds
70
+ OddsResource.new(self)
71
+ end
72
+
73
+ def odds_bets
74
+ OddsBetResource.new(self)
75
+ end
76
+
77
+ def odds_bookmakers
78
+ OddsBookmakerResource.new(self)
79
+ end
80
+
81
+ def odds_lives
82
+ OddsLiveResource.new(self)
83
+ end
84
+
85
+ def odds_live_bets
86
+ OddsLiveBetResource.new(self)
87
+ end
88
+
89
+ def odds_mappings
90
+ OddsMappingResource.new(self)
91
+ end
92
+
93
+ def players
94
+ PlayerResource.new(self)
95
+ end
96
+
97
+ def player_top_assists
98
+ PlayerTopAssistResource.new(self)
99
+ end
100
+
101
+ def player_top_scorers
102
+ PlayerTopScorerResource.new(self)
103
+ end
104
+
105
+ def player_top_red_cards
106
+ PlayerTopRedCardResource.new(self)
107
+ end
108
+
109
+ def player_top_yellow_cards
110
+ PlayerTopYellowCardResource.new(self)
111
+ end
112
+
113
+ def player_seasons
114
+ PlayerSeasonResource.new(self)
115
+ end
116
+
117
+ def player_squads
118
+ PlayerSquadResource.new(self)
119
+ end
120
+
121
+ def predictions
122
+ PredictionResource.new(self)
123
+ end
124
+
125
+ def sidelined
126
+ SidelinedResource.new(self)
127
+ end
128
+
129
+ def standings
130
+ StandingResource.new(self)
131
+ end
132
+
133
+ def teams
134
+ TeamResource.new(self)
135
+ end
136
+
137
+ def team_countries
138
+ TeamCountryResource.new(self)
139
+ end
140
+
141
+ def team_seasons
142
+ TeamSeasonResource.new(self)
143
+ end
144
+
145
+ def team_statistics
146
+ TeamStatisticResource.new(self)
147
+ end
148
+
149
+ def timezones
150
+ TimezoneResource.new(self)
151
+ end
152
+
153
+ def transfers
154
+ TransferResource.new(self)
155
+ end
156
+
157
+ def trophies
158
+ TrophyResource.new(self)
159
+ end
160
+
161
+ def venues
162
+ VenueResource.new(self)
163
+ end
164
+
165
+ def connection
166
+ @connection ||= Faraday.new do |conn|
167
+ conn.url_prefix = BASE_URL
168
+ conn.request :json
169
+ conn.response :json, content_type: 'application/json'
170
+ conn.adapter adapter, @stubs
171
+ end
172
+ end
173
+
174
+ def inspect
175
+ '#<SportsApi::Football::Client>'
176
+ end
177
+ end
178
+ # rubocop:enable Metrics/ClassLength
179
+ end
180
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Coach < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Country < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Fixture < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class FixtureEvent < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class FixtureHeadToHead < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class FixtureLineup < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class FixturePlayerStatistic < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class FixtureRound < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class FixtureStatistic < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Injury < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class League < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class LeagueSeason < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class OddsLive < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class OddsLiveBet < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Odds < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class OddsBet < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class OddsBookmaker < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class OddsMapping < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Player < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class PlayerSeason < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class PlayerSquad < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class PlayerTopAssist < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class PlayerTopRedCard < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class PlayerTopScorer < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class PlayerTopYellowCard < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Prediction < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Sidelined < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Standing < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Team < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class TeamCountry < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class TeamSeason < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class TeamStatistic < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Timezone < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Transfer < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Trophy < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class Venue < Object
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class CoachResource < Resource
6
+ # Arguments:
7
+ # id: [Integer](optional) - The coach ID.
8
+ # team: [Integer](optional) - The team ID.
9
+ # search: [String](optional) - The name of the coach (>= XXX).
10
+ def list(**params)
11
+ response = get_request('coachs', params:)
12
+ Collection.from_response(response, type: SportsApi::Football::Coach)
13
+ end
14
+
15
+ def find(id:)
16
+ response = get_request('coachs', params: { id: id.to_s })
17
+ SportsApi::Football::Coach.new(response.body['response'][0])
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class CountryResource < Resource
6
+ # Arguments:
7
+ # name: [String](optional) - The name of the country.
8
+ # code: [String] (optional) - The country code (= XXX).
9
+ # search: [String] (optional) - The country name, can be some letters (>= XXX).
10
+ def list(**params)
11
+ response = get_request('countries', params:)
12
+ Collection.from_response(response, type: SportsApi::Football::Country)
13
+ end
14
+
15
+ def find_by_code(code:)
16
+ response = get_request('countries', params: { code: code.to_s })
17
+ SportsApi::Football::Country.new(response.body['response'][0])
18
+ end
19
+
20
+ def find_by_name(name:)
21
+ response = get_request('countries', params: { name: name.to_s })
22
+ SportsApi::Football::Country.new(response.body['response'][0])
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SportsApi
4
+ module Football
5
+ class FixtureResource < Resource
6
+ # Arguments:
7
+ # id: [Integer](optional) - The fixture ID.
8
+ # ids: [String](optional) - One or more fixture IDs (id-id-id).
9
+ # live: [String](optional) - All or several leagues ids ["all", "id-id"]
10
+ # date: [String](optional) - The date of the fixture (= YYYY-MM-DD).
11
+ # league: [Integer](optional) - The league ID.
12
+ # season: [Integer](optional) - The season year (= YYYY).
13
+ # last: [Integer](optional) - For the X last fixtures (<= 2 characters).
14
+ # next: [Integer](optional) - For the X next fixtures (<= 2 characters).
15
+ # from: [String](optional) - A valid date (= YYYY-MM-DD).
16
+ # to: [String](optional) - A valid date (= YYYY-MM-DD).
17
+ # round: [String](optional) - The round of the fixture.
18
+ # status: [String](optional) - One or more fixture status short ["NS", "NS-PST-FT"].
19
+ # venue: [Integer] (optional) - The venue ID.
20
+ # timezone: [String](optional) - A valid timezone from the endpoint Timezone.
21
+ def list(**params)
22
+ response = get_request('fixtures', params:)
23
+ Collection.from_response(response, type: SportsApi::Football::Fixture)
24
+ end
25
+
26
+ def find(id:)
27
+ response = get_request('fixtures', params: { id: id.to_s })
28
+ SportsApi::Football::Fixture.new(response.body['response'][0])
29
+ end
30
+ end
31
+ end
32
+ end