dian_ping 0.0.3 → 0.0.4
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/dian_ping.rb +1 -1
- data/lib/dianping/parameter.rb +10 -0
- data/lib/dianping/railtie.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0de84cbe48c75de94684aed126e2c0bc8fce340c
|
4
|
+
data.tar.gz: 818f67388b497c813ca3866bb188aa36eb63825c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51cc320f84cd60d9ab9c447ec70f0b3206c94f42a20f2aa544015b1446901ef82845fb32cf30c61036610a1a3cceb11be97ac4381d85cccfbddf6ba63382e0ab
|
7
|
+
data.tar.gz: 5a0033953077b9a3a4f200efd286840b9b3bdb461608c8404f7e956d70f540428b4f396bd19a82decd04d1dcb78f823b68171ecd866203d5bb7f6fc2045dd998
|
data/lib/dian_ping.rb
CHANGED
data/lib/dianping/parameter.rb
CHANGED
@@ -32,6 +32,16 @@ class DianPing
|
|
32
32
|
get '/v1/review/get_recent_reviews'
|
33
33
|
end
|
34
34
|
|
35
|
+
def categories(city = nil)
|
36
|
+
add :city, city
|
37
|
+
get '/v1/metadata/get_categories_with_businesses'
|
38
|
+
end
|
39
|
+
|
40
|
+
def regions(city = nil)
|
41
|
+
add :city, city
|
42
|
+
get '/v1/metadata/get_regions_with_businesses'
|
43
|
+
end
|
44
|
+
|
35
45
|
end
|
36
46
|
end
|
37
47
|
|
data/lib/dianping/railtie.rb
CHANGED
@@ -10,7 +10,7 @@ class DianPing
|
|
10
10
|
if config_file.file?
|
11
11
|
begin
|
12
12
|
options = YAML.load_file(config_file)[Rails.env]
|
13
|
-
::DP = DianPing.new(key: options['appkey'], secret: options['appSecret'])
|
13
|
+
::DP = DianPing.new(key: options['appkey'], secret: options['appSecret']) unless defined?(::DP)
|
14
14
|
rescue Exception => e
|
15
15
|
puts "There is a configuration error with the current dian_ping.yml"
|
16
16
|
puts e.message
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dian_ping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zires
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|