Class: WhopSDK::Resources::ChatChannels
- Inherits:
-
Object
- Object
- WhopSDK::Resources::ChatChannels
- Defined in:
- lib/whop_sdk/resources/chat_channels.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ ChatChannels
constructor
private
A new instance of ChatChannels.
-
#list(company_id: , after: nil, before: nil, first: nil, last: nil, product_id: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::ChatChannelListResponse>
Lists chat channels inside a company.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::ChatChannel
Some parameter documentations has been truncated, see Models::ChatChannelRetrieveParams for more details.
-
#update(id, ban_media: nil, ban_urls: nil, banned_words: nil, user_posts_cooldown_seconds: nil, who_can_post: nil, who_can_react: nil, request_options: {}) ⇒ WhopSDK::Models::ChatChannel
Some parameter documentations has been truncated, see Models::ChatChannelUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ ChatChannels
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ChatChannels.
114 115 116 |
# File 'lib/whop_sdk/resources/chat_channels.rb', line 114 def initialize(client:) @client = client end |
Instance Method Details
#list(company_id: , after: nil, before: nil, first: nil, last: nil, product_id: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::ChatChannelListResponse>
Lists chat channels inside a company
Required permissions:
-
‘chat:read`
99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/whop_sdk/resources/chat_channels.rb', line 99 def list(params) parsed, = WhopSDK::ChatChannelListParams.dump_request(params) @client.request( method: :get, path: "chat_channels", query: parsed, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::ChatChannelListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::ChatChannel
Some parameter documentations has been truncated, see Models::ChatChannelRetrieveParams for more details.
Retrieves a chat channel
Required permissions:
-
‘chat:read`
24 25 26 27 28 29 30 31 |
# File 'lib/whop_sdk/resources/chat_channels.rb', line 24 def retrieve(id, params = {}) @client.request( method: :get, path: ["chat_channels/%1$s", id], model: WhopSDK::ChatChannel, options: params[:request_options] ) end |
#update(id, ban_media: nil, ban_urls: nil, banned_words: nil, user_posts_cooldown_seconds: nil, who_can_post: nil, who_can_react: nil, request_options: {}) ⇒ WhopSDK::Models::ChatChannel
Some parameter documentations has been truncated, see Models::ChatChannelUpdateParams for more details.
Updates a chat channel
Required permissions:
-
‘chat:moderate`
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/whop_sdk/resources/chat_channels.rb', line 63 def update(id, params = {}) parsed, = WhopSDK::ChatChannelUpdateParams.dump_request(params) @client.request( method: :patch, path: ["chat_channels/%1$s", id], body: parsed, model: WhopSDK::ChatChannel, options: ) end |