class Sendbird::MessageApi
Public Class Methods
build_url(*args)
click to toggle source
# File lib/sendbird/message_api.rb, line 37 def self.build_url(*args) args_dup = args.dup args_dup.join('/') end
count(channel_type, channel_url)
click to toggle source
# File lib/sendbird/message_api.rb, line 28 def count(channel_type, channel_url) get(path: build_url(channel_type, channel_url, 'messages', 'total_count')) end
destroy(channel_type, channel_url, message_id)
click to toggle source
# File lib/sendbird/message_api.rb, line 20 def destroy(channel_type, channel_url, message_id) delete(path: build_url(channel_type, channel_url, 'messages', message_id)) end
list(channel_type, channel_url, params)
click to toggle source
Get messages function can be called only
from Park or Enterprise plan.
# File lib/sendbird/message_api.rb, line 12 def list(channel_type, channel_url, params) get(path: build_url(channel_type, channel_url, 'messages'), params: params) end
mark_as_read(channel_type, channel_url, body)
click to toggle source
# File lib/sendbird/message_api.rb, line 24 def mark_as_read(channel_type, channel_url, body) put(path: build_url(channel_type, channel_url, 'messages', 'mark_as_read'), body: body) end
send(channel_type, channel_url, body)
click to toggle source
# File lib/sendbird/message_api.rb, line 6 def send(channel_type, channel_url, body) post(path: build_url(channel_type, channel_url, 'messages'), body: body) end
unread_count(channel_type, channel_url, params)
click to toggle source
# File lib/sendbird/message_api.rb, line 32 def unread_count(channel_type, channel_url, params) get(path: build_url(channel_type, channel_url, 'messages', 'unread_count'), params: params) end
view(channel_type, channel_url, message_id)
click to toggle source
# File lib/sendbird/message_api.rb, line 16 def view(channel_type, channel_url, message_id) get(path: build_url(channel_type, channel_url, 'messages', message_id)) end