wework 1.1.8 → 1.1.9

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: 57af16b2481bed88541d3f155b87adf4dd26a8b28999bce6c5b20a3c2d2fcc23
4
- data.tar.gz: 39176c04e1e0daf24538dd046d81b0b66e7b9da8d09c374cda4023122dbcb465
3
+ metadata.gz: 9a27b4356a46bd485622d6e9dcea2cf1be0a571eb52499ce64788a1dc80a57f5
4
+ data.tar.gz: 4441474ed9f3e4c75d329e903c1e5cb2ed12dfd35ac29aa35332d1914a870b9d
5
5
  SHA512:
6
- metadata.gz: e2d714537b289270b8195517e14de67ba332f501c2082764de8f5e59f9663bbd26b87d737199116f827632d93b7bcd2f6c2cbd2b9bf77ce44d1b55bc1013acb1
7
- data.tar.gz: 5d2ad8d2925e1b679b07823c90e056f43ef3c191b8417970af1b15880281ec58ad5973befc8d30d0ecaa4eddc0ee0a4db106feeeeef0a407109d25fe126c24a3
6
+ metadata.gz: af3288c1e54e2de58fb25363701cc9bcf2b8edcfdda0075df4f2193f35fa505fbf2dda47f27f43387c28e48db425004298c22532e7ba7f6753ef657978b21229
7
+ data.tar.gz: 0da06a1707b5c849b7eed20fa6a6adbc4d4d78dc7887243b8eb363b6b7d6a6d00b711eb185d0f0c10221d05b6fbc86d0ee66e0955a8a221e20fe14c97084313d
data/lib/wework.rb CHANGED
@@ -21,6 +21,7 @@ module Wework
21
21
  AUTHORIZE_ENDPOINT = 'https://open.weixin.qq.com/connect/oauth2/authorize'.freeze
22
22
  SSO_AUTHORIZE_ENDPOINT = 'https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect'.freeze
23
23
  APP_AUTHORIZE_ENDPOINT = 'https://open.work.weixin.qq.com/3rdapp/install'.freeze
24
+ REGISTER_ENDPOINT = 'https://open.work.weixin.qq.com/3rdservice/wework/register'.freeze
24
25
  HTTP_OK_STATUS = [200, 201].freeze
25
26
  SUCCESS_CODE = 0
26
27
 
@@ -15,6 +15,11 @@ module Wework
15
15
  params = {template_id: template_id}
16
16
  post 'service/get_register_code', params.merge(options)
17
17
  end
18
+
19
+ def get_register_url template_id, options={}
20
+ register_code = get_register_code(template_id, options).register_code
21
+ "#{REGISTER_ENDPOINT}?register_code=#{register_code}"
22
+ end
18
23
  end
19
24
  end
20
25
  end
@@ -1,3 +1,3 @@
1
1
  module Wework
2
- VERSION = '1.1.8'.freeze
2
+ VERSION = '1.1.9'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wework
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - seandong