Class: Wework::Api::Agent
- Defined in:
- lib/wework/api/agent.rb
Instance Attribute Summary collapse
-
#agent_id ⇒ Object
readonly
Returns the value of attribute agent_id.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Agent
constructor
A new instance of Agent.
- #jsapi_ticket ⇒ Object
Methods included from Methods::Approval
Methods included from Methods::Checkin
Methods included from Methods::Menu
#menu_create, #menu_delete, #menu_get
Methods included from Methods::Message
#file_message_send, #image_message_send, #miniprogram_message_send, #news_message_send, #text_message_send, #textcard_message_send, #video_message_send, #voice_message_send
Methods included from Methods::Agent
#authorize_url, #get_agent, #get_jssign_package, #get_oauth_userinfo, #get_session_with_jscode, #get_user_detail, #set_agent
Methods inherited from Base
#access_token, #get, #post, #post_file, #request, #valid?
Methods included from Methods::Department
#department_create, #department_delete, #department_list, #department_update
Methods included from Methods::User
#user_batchdelete, #user_create, #user_delete, #user_get, #user_list, #user_simplelist, #user_update
Methods included from Methods::Media
#get_media_url, #media_get, #media_upload
Constructor Details
#initialize(options = {}) ⇒ Agent
Returns a new instance of Agent.
13 14 15 16 17 |
# File 'lib/wework/api/agent.rb', line 13 def initialize(={}) @agent_id = .delete(:agent_id) @agent_id = @agent_id.to_i if @agent_id && @agent_id.match?(/\A\d+\Z/) super() end |
Instance Attribute Details
#agent_id ⇒ Object (readonly)
Returns the value of attribute agent_id.
11 12 13 |
# File 'lib/wework/api/agent.rb', line 11 def agent_id @agent_id end |
Instance Method Details
#jsapi_ticket ⇒ Object
19 20 21 |
# File 'lib/wework/api/agent.rb', line 19 def jsapi_ticket jsticket_store.ticket end |