Class: Wework::Token::JsTicket

Inherits:
Base
  • Object
show all
Defined in:
lib/wework/token/js_ticket.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize, #token, #update_token

Constructor Details

This class inherits a constructor from Wework::Token::Base

Instance Method Details

#redis_keyObject



11
12
13
# File 'lib/wework/token/js_ticket.rb', line 11

def redis_key
  @redis_key ||= Digest::MD5.hexdigest "WX_JS_TICKET_#{client.corp_id}_#{client.agent_id}"
end

#refresh_tokenObject



19
20
21
# File 'lib/wework/token/js_ticket.rb', line 19

def refresh_token
  client.get 'get_jsapi_ticket'
end

#token_keyObject



15
16
17
# File 'lib/wework/token/js_ticket.rb', line 15

def token_key
  'ticket'
end