dianping-api 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/dianping/api/client.rb +7 -2
- data/lib/dianping/api/modules/tuangou.rb +4 -0
- data/lib/dianping/api/token.rb +4 -0
- data/lib/dianping/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71f0df3df1c538b4da40ad6778af54a2ccc8f58a97de536fa820ce711fe6ee2d
|
4
|
+
data.tar.gz: 2ea42eed408aca26191d5a87267908b223ac8ceed534320e04cb351ead5d17a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2efe5dde5e3a84e6952a710fc461f5f6c3b7dcb35041047e6d179e694c6894ef4f85df5d00036725ea63d36e78ef049c447cf164fc06cd7c542fe5f3981ffbba
|
7
|
+
data.tar.gz: 001b13240d3878018f409fc15331b0b4e80498dbda5511df43c06437921de051024a8613630a8ed515430bf761698e3c1d89e92fb3900707db9e9678ce1c881c
|
data/Gemfile.lock
CHANGED
data/lib/dianping/api/client.rb
CHANGED
@@ -6,12 +6,13 @@ module Dianping
|
|
6
6
|
|
7
7
|
include Modules::Tuangou
|
8
8
|
|
9
|
-
attr_reader :app_key, :site, :token
|
9
|
+
attr_reader :app_key, :site, :token
|
10
|
+
attr_accessor :redirect_url
|
10
11
|
|
11
12
|
def initialize(app_key, secret, **options)
|
12
13
|
@app_key = app_key
|
13
14
|
@secret = secret
|
14
|
-
@site = 'https://openapi.dianping.com'
|
15
|
+
@site = options[:site] || 'https://openapi.dianping.com'
|
15
16
|
@redirect_url = options[:redirect_url]
|
16
17
|
@token = Token.new(self)
|
17
18
|
end
|
@@ -75,6 +76,10 @@ module Dianping
|
|
75
76
|
json(res.body)
|
76
77
|
end
|
77
78
|
|
79
|
+
def scope_shops
|
80
|
+
get('/router/oauth/session/scope', bid: token.bid)
|
81
|
+
end
|
82
|
+
|
78
83
|
def json(text)
|
79
84
|
MultiJson.load(text || '{}', symbolize_keys: true)
|
80
85
|
end
|
data/lib/dianping/api/token.rb
CHANGED
data/lib/dianping/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dianping-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Wong
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|