third_party_wxa 0.1.5 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9a1361eab458413e4dbb16d7e239c177be96ebcf92dc89ab016e876c88647a8
4
- data.tar.gz: 93a74483b992a8cb255c65555eb9476e1bafc3201e5557eb8f9527403cf6b7f9
3
+ metadata.gz: 5eb92c75b2a2bf102ae7ab81b7cd07f99dcf162bb382813f016e571c82183fe9
4
+ data.tar.gz: cac2c579e2357f902f05d26cd33d359088554e9407470816f345b54ebc363158
5
5
  SHA512:
6
- metadata.gz: 10bc4b22d61c06e568609d88d4d41c6f13c3ba9f1ef3e11705a1773a809d3c4b338bb01a4f662f28029d77473c8018690a57ca3edd9f105d32ec6baea536cd2c
7
- data.tar.gz: 7674429c7029324b75cf00cbc16b38815e2ed1d382068fbeb86642441d1dadc7210ac944b5dc55c87d5cdbaa753bce1609bbe0e25d621343a6231835268af216
6
+ metadata.gz: '09b9b975ec674bac689999841759bc7a41cc368b00472e5b419c07db38d58e4f7e65bbdcb6b359585835a8379b20adc95b8212db6f4af2f97ed925b38d7f446b'
7
+ data.tar.gz: 3cb7fceca643698b96e2e2f6e3769539d80a02486b9bd15401e0998c53c7c981dca66b497528c5be203609ada12c05ca7bf930dbe8193501035ca0e015d19479
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- third_party_wxa (0.1.5)
4
+ third_party_wxa (0.1.6)
5
5
  json (>= 1.8.6)
6
6
  redis
7
7
  rest-client (>= 2.0)
@@ -18,6 +18,7 @@ module ThirdPartyWxa
18
18
  class << self
19
19
  def http_get_without_component_access_token scope, url, url_params={}
20
20
  url = "#{BASE}#{scope}/#{url}"
21
+ p "get ----- #{url}"
21
22
  JSON.parse RestClient.get URI.encode(url), {params: url_params}
22
23
  end
23
24
 
@@ -26,6 +27,8 @@ module ThirdPartyWxa
26
27
  url = "#{BASE}#{scope}/#{url}"
27
28
  param = url_params.to_param
28
29
  url += "?#{param}" if !param.blank?
30
+ p "post ----- #{url}"
31
+ p post_params
29
32
  JSON.parse RestClient.post URI.encode(url), post_params.to_json
30
33
  end
31
34
 
@@ -13,7 +13,10 @@ module ThirdPartyWxa
13
13
 
14
14
  def authorizer_access_token_api(auth_code)
15
15
  params = {component_appid: appid, authorization_code: auth_code}
16
- ThirdPartyWxa.http_post_without_component_access_token 'cgi-bin','component/api_query_auth', params, {component_access_token: get_component_access_token}
16
+ ThirdPartyWxa.http_post_without_component_access_token 'cgi-bin',
17
+ 'component/api_query_auth',
18
+ params,
19
+ {component_access_token: get_component_access_token}
17
20
  end
18
21
 
19
22
  #https:// api.weixin.qq.com /cgi-bin/component/api_authorizer_token?component_access_token=xxxxx
@@ -24,7 +27,10 @@ module ThirdPartyWxa
24
27
  "authorizer_appid": auth_appid,
25
28
  "authorizer_refresh_token": refresh_token,
26
29
  }
27
- http_post 'cgi-bin', 'component/api_authorizer_token', params
30
+ ThirdPartyWxa.http_post_without_component_access_token 'cgi-bin',
31
+ 'component/api_authorizer_token',
32
+ params,
33
+ {component_access_token: get_component_access_token}
28
34
  end
29
35
 
30
36
 
@@ -12,13 +12,13 @@ module ThirdPartyWxa
12
12
  attr_accessor :component_verify_ticket, :ticket_expire_at
13
13
  attr_accessor :component_access_token, :component_expire_at #2小时
14
14
  attr_accessor :pre_auth_code, :pre_expire_at #10分钟
15
- # attr_accessor :authorizer_appid
16
- # attr_accessor :authorizer_access_token, :authorizer_refresh_token, :authorizer_expire_at
17
- # attr_accessor :authorizer
15
+ attr_accessor :token_store
18
16
 
19
17
  def initialize
20
18
  @appid = ThirdPartyWxa.appid
21
19
  @appsecret = ThirdPartyWxa.appsecret
20
+ @token_store = token_store_init
21
+ p "third party wxa use #{@token_store.class.to_s}"
22
22
  end
23
23
 
24
24
  def set_tickect ticket, expire_in
@@ -61,7 +61,7 @@ module ThirdPartyWxa
61
61
  self
62
62
  end
63
63
 
64
- def token_store
64
+ def token_store_init
65
65
  Token::Store.init_with(self)
66
66
  end
67
67
 
@@ -1,3 +1,3 @@
1
1
  module ThirdPartyWxa
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: third_party_wxa
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
  - hzy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2019-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client