decathlon-sports 0.1.5 → 0.1.6

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: 6ad6366e41d7ee4826884903a51b45c05fac8eab34fee35b5b69299ecb5da703
4
- data.tar.gz: f1ce8dd2718e73c96c810a7f16bc798b7462d93c9fffe3b7f6742b3fd3feb084
3
+ metadata.gz: 41ca18ce970a10546b8033af4b186c47d479a00e91fe7725ce814acb4827ee47
4
+ data.tar.gz: 1d175742ba6fd76e15f2fc152800b6c2b1d855f93be8488b7ec3a8179d7a02fd
5
5
  SHA512:
6
- metadata.gz: c6624c45bf9ea344c2dbebaaca09fa4eed21b6a68c844e8d8446d723ef0879cc12c26aaabd1190cce182d1d3325578e42ed22a679f1b5db652c9bbf6b948a677
7
- data.tar.gz: b2c6ac080706d4e4da4f5b56e08277d4f2146e04bcd1eda9bfd2de69bdd3fff3057a40e99bd33dfb0ba7116ab462934013d49d97a8e159312418e96bc0887604
6
+ metadata.gz: 449a444cc4d4b6b71a0e8e1165aaa655329cb98b63bc65dab45b64eb3a4a0472de01f3dd7c60c2a10959250e615aa8cd983578c6bd44022c972ee3a35e593fc3
7
+ data.tar.gz: 55d8d8e338dfd2e69531ceaf4024b6bd21ebb5f5de225c21e71c45211e34fc8b8f38ce726b10ee7f4e574a960f440d49df5d0ac0bdf7dfcba1fb0b57a7b07619
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- decathlon-sports (0.1.5)
4
+ decathlon-sports (0.1.6)
5
5
  faraday (~> 0.15.3)
6
6
  json (~> 2.1.0)
7
7
 
@@ -9,8 +9,8 @@ module Decathlon
9
9
  JSON.parse(response.body)
10
10
  end
11
11
 
12
- def self.location(id, city, country)
13
- response = Faraday.get("#{API_URL}/sports/#{id}/recommendations/#{city.downcase}_#{country.downcase}")
12
+ def self.location(coordinates, source = 'popular', limit = 10)
13
+ response = Faraday.get("#{API_URL}/sports/recommendations?coordinates=#{coordinates[:lon]},#{coordinates[:lat]}&source=#{source}&count=#{limit}")
14
14
  JSON.parse(response.body)
15
15
  end
16
16
  end
@@ -18,6 +18,11 @@ module Decathlon
18
18
  JSON.parse(response.body)
19
19
  end
20
20
 
21
+ def self.isearch(name)
22
+ response = Faraday.get("#{API_URL}/sports/search/#{name}")
23
+ JSON.parse(response.body)
24
+ end
25
+
21
26
  def self.call(url)
22
27
  response = Faraday.get(url)
23
28
  JSON.parse(response.body)
@@ -1,5 +1,5 @@
1
1
  module Decathlon
2
2
  module Sports
3
- VERSION = '0.1.5'.freeze
3
+ VERSION = '0.1.6'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decathlon-sports
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Decathlon Canada
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-05-07 00:00:00.000000000 Z
12
+ date: 2019-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler