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 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

Link to this function

add_channel_member(connection, id, add_channel_member_request, opts \\ [])

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

Link to this function

add_channel_moderator(connection, id, add_channel_member_request, opts \\ [])

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

Link to this function

create_channel(connection, create_channel_request, opts \\ [])

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

Link to this function

delete_channel(connection, id, opts \\ [])

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

Link to this function

list_channel_invites(connection, id, opts \\ [])

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

Link to this function

list_channel_members(connection, id, opts \\ [])

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

Link to this function

list_channel_memberships(connection, id, opts \\ [])

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

Link to this function

list_channel_messages(connection, id, opts \\ [])

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

Link to this function

list_channel_moderators(connection, id, opts \\ [])

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

Link to this function

list_channel_participants(connection, id, opts \\ [])

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

Link to this function

list_channels(connection, opts \\ [])

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

Link to this function

remove_channel_member(connection, id, user_id, opts \\ [])

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

Link to this function

remove_channel_moderator(connection, id, user_id, opts \\ [])

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

Link to this function

retrieve_channel(connection, id, opts \\ [])

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

Link to this function

send_channel_event(connection, id, create_channel_generic_event_resource, opts \\ [])

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

Link to this function

send_channel_invite(connection, id, create_channel_invite_resource, opts \\ [])

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

Link to this function

send_channel_message(connection, id, send_channel_message_request, opts \\ [])

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

Link to this function

update_channel(connection, id, opts \\ [])

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