api_football 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba481de52484096749c39fe0b0808c16d3215553279192047cebfa0d47cb0dd2
4
- data.tar.gz: 20b8eaf9db06f7899b0d2c13fade1425f3eb88452994fae4758552b681d2f7d4
3
+ metadata.gz: 6ab60689a3c51b48c97e20a344ccab74a04857f9accad0d3e520b9b05f8aacff
4
+ data.tar.gz: fd0df6be6a02e6a1e00cf28cdb82e18f308eff89db0f32535704d2c3e414e77f
5
5
  SHA512:
6
- metadata.gz: c3e06688e6a51d57977d10b736df0aa2daf9589c2442d89c64f8017bc7bbb320be28d2da0687799f76cca6a44b8b88343ec8c5c5bd666f67499c462b085bfe40
7
- data.tar.gz: 7642e714e26025fd7e5d536f66685796104dbb4573bfa1f88234b93a4f4e3178d6705258bbe9f0e15800e4edaadfc35c370e43988e67f87ce6c855fc6d057b87
6
+ metadata.gz: 7456f4a8e4a43ff3186fb39910513916d807c733639bda51e97d53ace7d53d6a344a525724e9d968831d1a4c246681e1ce561560509d13a78a982fd7bfdd5095
7
+ data.tar.gz: 63481e243418c3a48c7f47d07fb0f808b41162e6ea1df45072be01b3760cb7e6e12384c244c37572baa3757ca4e374c1e96d37d4631c3bca0e3ef5f3279bf334
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ repo_token: bt9UofZPp3drTJOrEpd0YfdoUbs32Q8LG
data/.travis.yml CHANGED
@@ -3,3 +3,8 @@ language: ruby
3
3
  rvm:
4
4
  - 2.5.0
5
5
  before_install: gem install bundler -v 1.16.1
6
+ install: "bundle install --jobs 8"
7
+ script:
8
+ - bundle exec rubocop
9
+ - bundle exec rspec
10
+ cache: bundler
data/1 ADDED
@@ -0,0 +1,61 @@
1
+ first commit
2
+
3
+ # Please enter the commit message for your changes. Lines starting
4
+ # with '#' will be ignored, and an empty message aborts the commit.
5
+ #
6
+ # Date: Sat Sep 8 23:44:35 2018 -0500
7
+ #
8
+ # On branch master
9
+ #
10
+ # Initial commit
11
+ #
12
+ # Changes to be committed:
13
+ # new file: .coveralls.yml
14
+ # new file: .gitignore
15
+ # new file: .rspec
16
+ # new file: .rubocop.yml
17
+ # new file: .travis.yml
18
+ # new file: CODE_OF_CONDUCT.md
19
+ # new file: Gemfile
20
+ # new file: Gemfile.lock
21
+ # new file: LICENSE.txt
22
+ # new file: README.md
23
+ # new file: Rakefile
24
+ # new file: api_football.gemspec
25
+ # new file: bin/console
26
+ # new file: bin/setup
27
+ # new file: fixtures/vcr_cassettes/competitions/all.yml
28
+ # new file: fixtures/vcr_cassettes/competitions/filter_by_country.yml
29
+ # new file: fixtures/vcr_cassettes/countries/all.yml
30
+ # new file: fixtures/vcr_cassettes/errors/api_key.yml
31
+ # new file: fixtures/vcr_cassettes/events/all.yml
32
+ # new file: fixtures/vcr_cassettes/events/filter_by_league.yml
33
+ # new file: fixtures/vcr_cassettes/h2h/all.yml
34
+ # new file: fixtures/vcr_cassettes/odds/all.yml
35
+ # new file: fixtures/vcr_cassettes/odds/filter_by_league.yml
36
+ # new file: fixtures/vcr_cassettes/standings/all.yml
37
+ # new file: fixtures/vcr_cassettes/standings/filter_by_league.yml
38
+ # new file: lib/api_football.rb
39
+ # new file: lib/api_football/client.rb
40
+ # new file: lib/api_football/competition.rb
41
+ # new file: lib/api_football/country.rb
42
+ # new file: lib/api_football/error.rb
43
+ # new file: lib/api_football/event.rb
44
+ # new file: lib/api_football/h2h.rb
45
+ # new file: lib/api_football/http.rb
46
+ # new file: lib/api_football/odd.rb
47
+ # new file: lib/api_football/response.rb
48
+ # new file: lib/api_football/standing.rb
49
+ # new file: lib/api_football/version.rb
50
+ # new file: spec/api_football_spec.rb
51
+ # new file: spec/client_spec.rb
52
+ # new file: spec/competition_spec.rb
53
+ # new file: spec/country_spec.rb
54
+ # new file: spec/event_spec.rb
55
+ # new file: spec/h2h_spec.rb
56
+ # new file: spec/http_spec.rb
57
+ # new file: spec/odd_spec.rb
58
+ # new file: spec/response_spec.rb
59
+ # new file: spec/spec_helper.rb
60
+ # new file: spec/standing_spec.rb
61
+ #
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- api_football (0.1.0)
4
+ api_football (0.1.1)
5
5
  faraday
6
6
 
7
7
  GEM
@@ -30,17 +30,25 @@ GEM
30
30
  ast (2.4.0)
31
31
  builder (3.2.3)
32
32
  concurrent-ruby (1.0.5)
33
+ coveralls (0.8.22)
34
+ json (>= 1.8, < 3)
35
+ simplecov (~> 0.16.1)
36
+ term-ansicolor (~> 1.3)
37
+ thor (~> 0.19.4)
38
+ tins (~> 1.6)
33
39
  crack (0.4.3)
34
40
  safe_yaml (~> 1.0.0)
35
41
  crass (1.0.4)
36
42
  diff-lcs (1.3)
43
+ docile (1.3.1)
37
44
  erubi (1.7.1)
38
- faraday (0.14.0)
45
+ faraday (0.15.2)
39
46
  multipart-post (>= 1.2, < 3)
40
47
  hashdiff (0.3.7)
41
- i18n (1.0.1)
48
+ i18n (1.1.0)
42
49
  concurrent-ruby (~> 1.0)
43
50
  jaro_winkler (1.5.1)
51
+ json (2.1.0)
44
52
  loofah (2.2.2)
45
53
  crass (~> 1.0.2)
46
54
  nokogiri (>= 1.5.9)
@@ -54,7 +62,7 @@ GEM
54
62
  parser (2.5.1.2)
55
63
  ast (~> 2.4.0)
56
64
  powerpack (0.1.2)
57
- public_suffix (3.0.2)
65
+ public_suffix (3.0.3)
58
66
  rack (2.0.5)
59
67
  rack-test (1.1.0)
60
68
  rack (>= 1.0, < 3)
@@ -92,13 +100,21 @@ GEM
92
100
  rainbow (>= 2.2.2, < 4.0)
93
101
  ruby-progressbar (~> 1.7)
94
102
  unicode-display_width (~> 1.0, >= 1.0.1)
95
- rubocop-rails_config (0.2.1)
103
+ rubocop-rails_config (0.2.3)
96
104
  railties (>= 3.0)
97
105
  rubocop (~> 0.56)
98
106
  ruby-progressbar (1.10.0)
99
107
  safe_yaml (1.0.4)
100
- thor (0.20.0)
108
+ simplecov (0.16.1)
109
+ docile (~> 1.1)
110
+ json (>= 1.8, < 3)
111
+ simplecov-html (~> 0.10.0)
112
+ simplecov-html (0.10.2)
113
+ term-ansicolor (1.6.0)
114
+ tins (~> 1.0)
115
+ thor (0.19.4)
101
116
  thread_safe (0.3.6)
117
+ tins (1.16.3)
102
118
  tzinfo (1.2.5)
103
119
  thread_safe (~> 0.1)
104
120
  unicode-display_width (1.4.0)
@@ -114,6 +130,7 @@ PLATFORMS
114
130
  DEPENDENCIES
115
131
  api_football!
116
132
  bundler (~> 1.16)
133
+ coveralls
117
134
  rake (~> 10.0)
118
135
  rspec (~> 3.0)
119
136
  rubocop
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
- # ApiFootball
1
+ [![Build Status](https://travis-ci.org/jdaviderb/api_football.svg?branch=master)](https://travis-ci.org/jdaviderb/api_football)
2
+
3
+ [![Coverage Status](https://coveralls.io/repos/github/jdaviderb/api_football/badge.svg?branch=master)](https://coveralls.io/github/jdaviderb/api_football?branch=master)
2
4
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/api_football`. To experiment with that code, run `bin/console` for an interactive prompt.
5
+ # ApiFootball
4
6
 
5
- TODO: Delete this and the text above, and describe your gem
7
+ A ruby wrapper of https://apifootball.com/
6
8
 
7
9
  ## Installation
8
10
 
@@ -22,7 +24,59 @@ Or install it yourself as:
22
24
 
23
25
  ## Usage
24
26
 
25
- TODO: Write usage instructions here
27
+ ### Client
28
+
29
+ ```ruby
30
+ client = ApiFootball::Client.new(api_key: "api_key is required")
31
+ ```
32
+
33
+ ### Countries
34
+
35
+ ```Ruby
36
+ # Returns list of supported countries
37
+
38
+ countries = client.countries.all
39
+ ```
40
+
41
+ ### Competitions
42
+
43
+ ```Ruby
44
+ # Returns list of supported competitions
45
+
46
+ competitions = client.competitions.all
47
+
48
+ # Returns list of competitions filtered by country
49
+
50
+ competitions = client.competitions.filter_by(country_id: "173")
51
+ ```
52
+
53
+ ### Standings
54
+
55
+ ```Ruby
56
+ # Returns standings for leagues filtered by league_id
57
+ standings = client.standings.filter_by(league_id: "63")
58
+ ```
59
+
60
+ ### Odds
61
+
62
+ ```Ruby
63
+ # Returns odds (1x2, BTS, O/U, AH) for events
64
+ from = "2018-08/01"
65
+ to = "2018-08/20"
66
+ odds = client.odds.all(from: from, to: to)
67
+
68
+ # Returns odds filtered by match
69
+ odds = client.odds.filter_by(from: from, to: to, match_id: "304968")
70
+ ```
71
+
72
+ ### H2h
73
+ NOT TESTED
74
+ ```Ruby
75
+ # Returns the last games between submiteted teams and the last games of each team
76
+ first_team = "Chelsea"
77
+ second_team = "Arsenal"
78
+ h2h = client.h2h.all(first_team: first_team, second_team: second_team)
79
+ ```
26
80
 
27
81
  ## Development
28
82
 
data/Rakefile CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
+ require "rubocop/rake_task"
5
6
 
7
+ RuboCop::RakeTask.new
6
8
  RSpec::Core::RakeTask.new(:spec)
7
9
 
8
- task default: :spec
10
+ task default: %w(rubocop spec)
data/api_football.gemspec CHANGED
@@ -39,5 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency "vcr", "~> 4.0.0"
40
40
  spec.add_development_dependency "webmock"
41
41
  spec.add_development_dependency "rubocop"
42
+ spec.add_development_dependency "coveralls"
43
+
42
44
  spec.add_development_dependency "rubocop-rails_config"
43
45
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApiFootball
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_football
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Hernandez
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: coveralls
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rubocop-rails_config
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -129,10 +143,12 @@ executables: []
129
143
  extensions: []
130
144
  extra_rdoc_files: []
131
145
  files:
146
+ - ".coveralls.yml"
132
147
  - ".gitignore"
133
148
  - ".rspec"
134
149
  - ".rubocop.yml"
135
150
  - ".travis.yml"
151
+ - '1'
136
152
  - CODE_OF_CONDUCT.md
137
153
  - Gemfile
138
154
  - Gemfile.lock