ChatKittyPlatformAPI.Api.Users (chatkitty_platform_sdk v0.1.0)
API calls for all endpoints tagged Users
.
Link to this section Summary
Functions
Check a user exists Checks if a user exists
Create a user Creates a new user
Delete a user Delets a user
List a user's channels Returns a page of channels for this user created or joined
List a user's messages Returns a page of messages sent by this user
List a user's notifications Returns a page of notifications received by this user
List users Returns a page of users belonging to this application
Remove a user secret Removes a user secret's value
Retrieve a user Returns a user by ID
Retrieve a user secret Returns a user secret
Set a user secret Sets a user secret's value
Update a user Updates a user
Update a user's display picture Updates a user's display picture
Link to this section Functions
check_user_exists(connection, name, opts \\ [])
@spec check_user_exists(Tesla.Env.client(), String.t(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, Map.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Check a user exists Checks if a user exists
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- name (String.t): Username of the user
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
create_user(connection, create_person_chat_user_resource, opts \\ [])
@spec create_user( Tesla.Env.client(), ChatKittyPlatformAPI.Model.CreatePersonChatUserResource.t(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Create a user Creates a new user
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- create_person_chat_user_resource (CreatePersonChatUserResource):
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
delete_user(connection, id, opts \\ [])
@spec delete_user(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 user Delets a user
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): User ID
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_user_channels(connection, id, opts \\ [])
@spec list_user_channels(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.PagedModelChannelResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List a user's channels Returns a page of channels for this user created or joined
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): User 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_user_messages(connection, id, opts \\ [])
@spec list_user_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 a user's messages Returns a page of messages sent by this user
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): User 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
- :unread (boolean()): Filters by returning unread messages
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_user_notifications(connection, id, opts \\ [])
@spec list_user_notifications(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.CursorPagedModelNotificationResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List a user's notifications Returns a page of notifications received by this user
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): User 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
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_users(connection, opts \\ [])
@spec list_users( Tesla.Env.client(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.PagedModelChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List users Returns a page of users 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.
- :name (String.t): Filters by username
returns
Returns
on success {:error, Tesla.Env.t} on failure
remove_user_secret(connection, id, name, opts \\ [])
@spec remove_user_secret(Tesla.Env.client(), integer(), String.t(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Remove a user secret Removes a user secret's value
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): User ID
- name (String.t): The secret's name
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
retrieve_user(connection, id, opts \\ [])
@spec retrieve_user(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Retrieve a user Returns a user by ID
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): User ID
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
retrieve_user_secret(connection, id, name, opts \\ [])
@spec retrieve_user_secret(Tesla.Env.client(), integer(), String.t(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.SecretResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Retrieve a user secret Returns a user secret
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): User ID
- name (String.t): The secret's name
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
set_user_secret(connection, id, name, secret_resource, opts \\ [])
@spec set_user_secret( Tesla.Env.client(), integer(), String.t(), ChatKittyPlatformAPI.Model.SecretResource.t(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Set a user secret Sets a user secret's value
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): User ID
- name (String.t): The secret's name
- secret_resource (SecretResource):
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
update_user(connection, id, opts \\ [])
@spec update_user(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Update a user Updates a user
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): User ID
- opts (KeywordList): [optional] Optional parameters
- :body (ChatUserPropertiesPatch):
returns
Returns
on success {:error, Tesla.Env.t} on failure
update_user_display_picture(connection, id, create_external_file_properties, opts \\ [])
@spec update_user_display_picture( Tesla.Env.client(), integer(), ChatKittyPlatformAPI.Model.CreateExternalFileProperties.t(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ChatUserResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Update a user's display picture Updates a user's display picture
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): User ID
- create_external_file_properties (CreateExternalFileProperties):
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure