Class: Wework::Api::Agent
- Includes:
- Methods::Agent, Methods::Appchat, Methods::Approval, Methods::Checkin, Methods::Menu, Methods::Message
- 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::Appchat
#appchat_create, #appchat_get, #appchat_update, #file_appchat_send, #image_appchat_send, #news_appchat_send, #text_appchat_send, #textcard_appchat_send, #video_appchat_send, #voice_appchat_send
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::Batch
#batch_getresult, #batch_invite, #batch_replaceparty, #batch_replaceuser, #batch_syncuser
Methods included from Methods::Crm
Methods included from Methods::Tag
#tag_addtagusers, #tag_create, #tag_delete, #tag_deltagusers, #tag_get, #tag_list, #tag_update
Methods included from Methods::Department
#department_create, #department_delete, #department_list, #department_update
Methods included from Methods::User
#authsucc, #convert_to_openid, #convert_to_userid, #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.
14 15 16 17 18 |
# File 'lib/wework/api/agent.rb', line 14 def initialize(={}) @agent_id = .delete(:agent_id) @agent_id = @agent_id.to_i if @agent_id.to_s =~ /\A\d+\Z/ super() end |
Instance Attribute Details
#agent_id ⇒ Object (readonly)
Returns the value of attribute agent_id.
12 13 14 |
# File 'lib/wework/api/agent.rb', line 12 def agent_id @agent_id end |
Instance Method Details
#jsapi_ticket ⇒ Object
20 21 22 |
# File 'lib/wework/api/agent.rb', line 20 def jsapi_ticket jsticket_store.ticket end |