ChatKittyPlatformAPI.Api.Channels (chatkitty_platform_sdk v0.1.0)
API calls for all endpoints tagged Channels
.
Link to this section Summary
Functions
Add a channel member Makes a user a group channel member
Add a channel moderator Makes a user a group channel moderator
Create a channel Creates a new channel or returns an equivalent existing channel
Delete a channel Deletes a channel by ID
List channel invites Returns a page of invites sent to join this channel
List a channel's members Returns a page of channel members
List channel memberships Returns a page of channel membership info for this channel
List channel messages Returns a page of messages sent in this channel
Lists a channel's moderators Returns a page of channel moderators
List channel participants Returns a page of channel active participants: members that currently online
List channels Returns a page of channels belonging to this application
Remove a channel member Removes a member from a group channel
Remove a channel moderator Removes a moderator from a group channel
Retrieve a channel Returns a channel by ID
Send a channel event Sends a custom channel event
Send a channel invite Sends a channel invite to user
Send a channel message Sends a message in this channel as the system or on behalf of a user
Update a channel Updates a channel properties
Link to this section Functions
add_channel_member(connection, id, add_channel_member_request, opts \\ [])
@spec add_channel_member( Tesla.Env.client(), integer(), ChatKittyPlatformAPI.Model.AddChannelMemberRequest.t(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChannelResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Add a channel member Makes a user a group channel member
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- add_channel_member_request (AddChannelMemberRequest):
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
add_channel_moderator(connection, id, add_channel_member_request, opts \\ [])
@spec add_channel_moderator( Tesla.Env.client(), integer(), ChatKittyPlatformAPI.Model.AddChannelMemberRequest.t(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Add a channel moderator Makes a user a group channel moderator
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- add_channel_member_request (AddChannelMemberRequest):
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
create_channel(connection, create_channel_request, opts \\ [])
@spec create_channel( Tesla.Env.client(), ChatKittyPlatformAPI.Model.CreateChannelRequest.t(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChannelResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Create a channel Creates a new channel or returns an equivalent existing channel
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- create_channel_request (CreateChannelRequest):
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
delete_channel(connection, id, opts \\ [])
@spec delete_channel(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ApplicationResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Delete a channel Deletes a channel by ID
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_channel_invites(connection, id, opts \\ [])
@spec list_channel_invites(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.PagedModelChannelInviteResource.t()} | {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List channel invites Returns a page of invites sent to join this channel
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- opts (KeywordList): [optional] Optional parameters
- :page (integer()): Zero-based page index (0..N)
- :size (integer()): The size of the page to be returned
- :sort ([String.t]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_channel_members(connection, id, opts \\ [])
@spec list_channel_members(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.PagedModelChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List a channel's members Returns a page of channel members
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- opts (KeywordList): [optional] Optional parameters
- :page (integer()): Zero-based page index (0..N)
- :size (integer()): The size of the page to be returned
- :sort ([String.t]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_channel_memberships(connection, id, opts \\ [])
@spec list_channel_memberships(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.PagedModelChannelMembershipResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List channel memberships Returns a page of channel membership info for this channel
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- opts (KeywordList): [optional] Optional parameters
- :page (integer()): Zero-based page index (0..N)
- :size (integer()): The size of the page to be returned
- :sort ([String.t]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_channel_messages(connection, id, opts \\ [])
@spec list_channel_messages(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.CursorPagedModelMessageResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List channel messages Returns a page of messages sent in this channel
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- opts (KeywordList): [optional] Optional parameters
- :size (integer()): The size of the page to be returned
- :start (integer()): Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages
- :next (integer()): Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages
- :relation (String.t): Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages
- :username (String.t):
- :query (String.t):
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_channel_moderators(connection, id, opts \\ [])
@spec list_channel_moderators(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.PagedModelChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Lists a channel's moderators Returns a page of channel moderators
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- opts (KeywordList): [optional] Optional parameters
- :page (integer()): Zero-based page index (0..N)
- :size (integer()): The size of the page to be returned
- :sort ([String.t]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_channel_participants(connection, id, opts \\ [])
@spec list_channel_participants(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.PagedModelChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List channel participants Returns a page of channel active participants: members that currently online
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- opts (KeywordList): [optional] Optional parameters
- :page (integer()): Zero-based page index (0..N)
- :size (integer()): The size of the page to be returned
- :sort ([String.t]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_channels(connection, opts \\ [])
@spec list_channels( Tesla.Env.client(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.PagedModelChannelResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List channels Returns a page of channels belonging to this application
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :page (integer()): Zero-based page index (0..N)
- :size (integer()): The size of the page to be returned
- :sort ([String.t]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
- :type (String.t): Filters by channel type
- :members ([String.t]): Filters by channel members using their usernames
- :start_time (DateTime.t): Filters for channels created within a time range: start time
- :end_time (DateTime.t): Filters for channels created within a time range: end time
- :properties (String.t): Filters by channel custom properties
returns
Returns
on success {:error, Tesla.Env.t} on failure
remove_channel_member(connection, id, user_id, opts \\ [])
@spec remove_channel_member(Tesla.Env.client(), integer(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChannelResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Remove a channel member Removes a member from a group channel
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- user_id (integer()): User ID of member to be removed
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
remove_channel_moderator(connection, id, user_id, opts \\ [])
@spec remove_channel_moderator(Tesla.Env.client(), integer(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChannelResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Remove a channel moderator Removes a moderator from a group channel
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- user_id (integer()): User ID of moderator to be removed
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
retrieve_channel(connection, id, opts \\ [])
@spec retrieve_channel(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChannelResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Retrieve a channel Returns a channel by ID
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
send_channel_event(connection, id, create_channel_generic_event_resource, opts \\ [])
@spec send_channel_event( Tesla.Env.client(), integer(), ChatKittyPlatformAPI.Model.CreateChannelGenericEventResource.t(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChannelGenericEventResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Send a channel event Sends a custom channel event
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- create_channel_generic_event_resource (CreateChannelGenericEventResource):
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
send_channel_invite(connection, id, create_channel_invite_resource, opts \\ [])
@spec send_channel_invite( Tesla.Env.client(), integer(), ChatKittyPlatformAPI.Model.CreateChannelInviteResource.t(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChannelInviteResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Send a channel invite Sends a channel invite to user
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- create_channel_invite_resource (CreateChannelInviteResource):
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
send_channel_message(connection, id, send_channel_message_request, opts \\ [])
@spec send_channel_message( Tesla.Env.client(), integer(), ChatKittyPlatformAPI.Model.SendChannelMessageRequest.t(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.MessageResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Send a channel message Sends a message in this channel as the system or on behalf of a user
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- send_channel_message_request (SendChannelMessageRequest):
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
update_channel(connection, id, opts \\ [])
@spec update_channel(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChannelResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Update a channel Updates a channel properties
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Channel ID
- opts (KeywordList): [optional] Optional parameters
- :body (ChannelPropertiesPatch):
returns
Returns
on success {:error, Tesla.Env.t} on failure