Class: Sendbird::GroupChannelApi
- Inherits:
-
Object
- Object
- Sendbird::GroupChannelApi
- Extended by:
- Client
- Defined in:
- lib/sendbird/group_channel_api.rb
Constant Summary collapse
- ENDPOINT =
'group_channels'.freeze
Constants included from Client
Class Method Summary collapse
- .create(body) ⇒ Object
- .destroy(channel_url) ⇒ Object
- .hide(channel_url, body) ⇒ Object
- .invite(channel_url, body) ⇒ Object
- .is_member?(channel_url, user_id) ⇒ Boolean
- .leave(channel_url, body) ⇒ Object
- .list(params = {}) ⇒ Object
- .members(channel_url, params = {}) ⇒ Object
- .update(channel_url, body) ⇒ Object
- .view(channel_url, params = {}) ⇒ Object
Methods included from Client
Class Method Details
.create(body) ⇒ Object
7 8 9 |
# File 'lib/sendbird/group_channel_api.rb', line 7 def create(body) post(path: build_url, body: body) end |
.destroy(channel_url) ⇒ Object
19 20 21 |
# File 'lib/sendbird/group_channel_api.rb', line 19 def destroy(channel_url) delete(path: build_url(channel_url)) end |
.hide(channel_url, body) ⇒ Object
39 40 41 |
# File 'lib/sendbird/group_channel_api.rb', line 39 def hide(channel_url, body) put(path: build_url(channel_url, 'hide'), body: body) end |
.invite(channel_url, body) ⇒ Object
35 36 37 |
# File 'lib/sendbird/group_channel_api.rb', line 35 def invite(channel_url, body) post(path: build_url(channel_url, 'invite'), body: body) end |
.is_member?(channel_url, user_id) ⇒ Boolean
31 32 33 |
# File 'lib/sendbird/group_channel_api.rb', line 31 def is_member?(channel_url, user_id) get(path: build_url(channel_url, 'members', user_id)) end |
.leave(channel_url, body) ⇒ Object
43 44 45 |
# File 'lib/sendbird/group_channel_api.rb', line 43 def leave(channel_url, body) put(path: build_url(channel_url, 'leave'), body: body) end |
.list(params = {}) ⇒ Object
11 12 13 |
# File 'lib/sendbird/group_channel_api.rb', line 11 def list(params={}) get(path: build_url, params: params) end |
.members(channel_url, params = {}) ⇒ Object
27 28 29 |
# File 'lib/sendbird/group_channel_api.rb', line 27 def members(channel_url, params={}) get(path: build_url(channel_url, 'members'), params: params) end |
.update(channel_url, body) ⇒ Object
15 16 17 |
# File 'lib/sendbird/group_channel_api.rb', line 15 def update(channel_url, body) put(path: build_url(channel_url), body: body) end |
.view(channel_url, params = {}) ⇒ Object
23 24 25 |
# File 'lib/sendbird/group_channel_api.rb', line 23 def view(channel_url, params={}) get(path: build_url(channel_url), params: params) end |