module Wework::Api::Methods::Appchat
Public Instance Methods
appchat_create(group_name, owner_id, group_user_ids, chat_id)
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 8 def appchat_create group_name, owner_id, group_user_ids, chat_id post 'appchat/create', name: group_name, owner: owner_id, userlist: group_user_ids, chatid: chat_id end
appchat_get(chat_id)
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 21 def appchat_get chat_id get 'appchat/get', { params: { chatid: chat_id } } end
appchat_update(chat_id, payload={})
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 16 def appchat_update chat_id, payload={} payload.merge! chatid: chat_id post 'appchat/update', payload end
file_appchat_send(chat_id, media_id)
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 37 def file_appchat_send chat_id, media_id appchat_send chat_id, {file: {media_id: media_id}, msgtype: 'file'} end
image_appchat_send(chat_id, media_id)
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 29 def image_appchat_send chat_id, media_id appchat_send chat_id, {image: {media_id: media_id}, msgtype: 'image'} end
news_appchat_send(chat_id, news=[])
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 49 def news_appchat_send chat_id, news=[] appchat_send chat_id, {news: {articles: news}, msgtype: 'news'} end
text_appchat_send(chat_id, content)
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 25 def text_appchat_send chat_id, content appchat_send chat_id, {text: {content: content}, msgtype: 'text'} end
textcard_appchat_send(chat_id, textcard={})
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 45 def textcard_appchat_send chat_id, textcard={} appchat_send chat_id, {textcard: textcard, msgtype: 'textcard'} end
video_appchat_send(chat_id, video={})
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 41 def video_appchat_send chat_id, video={} appchat_send chat_id, {video: video, msgtype: 'video'} end
voice_appchat_send(chat_id, media_id)
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 33 def voice_appchat_send chat_id, media_id appchat_send chat_id, {voice: {media_id: media_id}, msgtype: 'voice'} end
Private Instance Methods
appchat_send(chat_id, payload={})
click to toggle source
# File lib/wework/api/methods/appchat.rb, line 55 def appchat_send chat_id, payload={} payload.merge!(chatid: chat_id) post 'appchat/send', payload end