fsquare 1.0.5 → 1.0.6
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.
- checksums.yaml +4 -4
- data/lib/.fsquare.rb.swp +0 -0
- data/lib/fsquare/version.rb +1 -1
- data/lib/fsquare.rb +3 -3
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68a8f6e51409cf710105c73cd45823d6b763562e
|
|
4
|
+
data.tar.gz: 08b9fef8d18d2e4487b2ca0aa01d17f0f9e34c32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bd9cf64f8bc57b72a0eac43a4c0dbc221a3eac6919425b9fc806f54e8e77060421e56b02d3506774bde12d9fe9dce20c5dd679c8a5c6449e86567ad68f821540
|
|
7
|
+
data.tar.gz: 57fc024a26fb14e13375451ec152270469ca3d75f329e8cd468fc4f01bbf997990cdfe583a4000d7a1bbbda33dd34e73595b6707b134abc2e929fec10cde59d6
|
data/lib/.fsquare.rb.swp
ADDED
|
Binary file
|
data/lib/fsquare/version.rb
CHANGED
data/lib/fsquare.rb
CHANGED
|
@@ -12,15 +12,15 @@ module Fsquare
|
|
|
12
12
|
def self.request_data(path, data)
|
|
13
13
|
cacheKey = path + data.to_s
|
|
14
14
|
Rails.cache.fetch(cacheKey, :expires => 24.hour) do
|
|
15
|
-
if data.nil? || data[
|
|
15
|
+
if data.nil? || data[:v].nil?
|
|
16
16
|
raise "'v' is a required field in Foursquare API. You need to pass the value for 'v' in your data variable. Please see Foursquare API documentation for more information"
|
|
17
17
|
end
|
|
18
|
-
v = data[
|
|
18
|
+
v = data[:v].strftime "%Y%m%d"
|
|
19
19
|
|
|
20
20
|
if @@clientId.nil? || @clientSecret.nil?
|
|
21
21
|
raise "client_id or client_secret is not defined. Please call initialize()"
|
|
22
22
|
end
|
|
23
|
-
search_url = "https://api.foursquare.com#{path}&client_id=#{@@clientId}&client_secret=#{@@clientSecret}&" +
|
|
23
|
+
search_url = "https://api.foursquare.com#{path}&client_id=#{@@clientId}&client_secret=#{@@clientSecret}&" + data.to_query
|
|
24
24
|
result = HTTParty.get(search_url)
|
|
25
25
|
result['response']
|
|
26
26
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fsquare
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Terry Won
|
|
@@ -51,6 +51,7 @@ files:
|
|
|
51
51
|
- README.md
|
|
52
52
|
- Rakefile
|
|
53
53
|
- fsquare.gemspec
|
|
54
|
+
- lib/.fsquare.rb.swp
|
|
54
55
|
- lib/fsquare.rb
|
|
55
56
|
- lib/fsquare/version.rb
|
|
56
57
|
homepage: ''
|