Module: Wechat::Api::Util
- Included in:
- Client
- Defined in:
- lib/wechat/api/util.rb
Instance Method Summary collapse
- #create_qrcode(scene_str) ⇒ Object
- #create_qrcode_temp(scene_id, expire_seconds = 60_480) ⇒ Object
- #js_ticket ⇒ Object
Instance Method Details
#create_qrcode(scene_str) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/wechat/api/util.rb', line 18 def create_qrcode(scene_str) params = { action_name: 'QR_LIMIT_STR_SCENE', action_info: { scene: { scene_str: scene_str } } } post 'qrcode/create', params end |
#create_qrcode_temp(scene_id, expire_seconds = 60_480) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/wechat/api/util.rb', line 5 def create_qrcode_temp(scene_id, expire_seconds = 60_480) params = { action_name: 'QR_SCENE', expire_seconds: expire_seconds, action_info: { scene: { scene_id: scene_id } } } post 'qrcode/create', params end |
#js_ticket ⇒ Object
31 32 33 34 |
# File 'lib/wechat/api/util.rb', line 31 def js_ticket res = get 'ticket/getticket', type: :jsapi res['ticket'] end |