Module wicrs_server::api [−][src]
Public API for performing user actions, should be used for creating API implementations like the HTTP API or similar.
Functions
ban_user | Bans a user from a hub. |
change_channel_description | Renames a text channel in a hub. Returns the previous name of the channel if successful. |
change_hub_description | Changes the description of a hub. |
change_nickname | Changes a user’s nickname in a hub. |
change_user_description | Changes a user’s description. Returns the user’s previous description if successful. |
change_user_status | Changes a user’s status. Returns the user’s previous status if successful. |
change_username | Changes a user’s username. Returns the user’s previous username if successful. |
complete_login | Completes the OAuth login request. |
create_channel | Creates a text channel in a hub. Returns the ID of the new channel if successful. |
create_hub | Creates a hub, returning the ID of the new hub if successful. Also adds a default channel named “chat” that all users have access to by default. |
delete_channel | Deletes a text channel in a hub. |
delete_hub | Deletes a hub. |
get_channel | Gets a channel’s information. |
get_hub | Gets a hub stripped of data the given user should not be able to see. |
get_hub_member | Gets the information on a member of a hub. |
get_message | Gets a message from a text channel in a hub. |
get_messages | Gets a set of messages between two times (both in milliseconds since Unix Epoch).
If successful they are returned in an array. The array is orderd oldest message to newest
unless the |
get_messages_after | Gets messages sent after a given message. If successful they are returned in an array. The array is orderd oldest message to newest If there are no messages after the given message or the given message is not found, an empty array is returned. |
get_user_stripped | Gets a user’s data while removing all of their private information. |
invalidate_tokens | Invalidates all of a user’s authentication token sessions. |
join_hub | Adds the given user to a hub. |
kick_user | Kicks a user from a hub. |
leave_hub | Removes the given user from a hub. |
mute_user | Mutes a user in a hub. |
rename_channel | Renames a text channel in a hub. Returns the previous name of the channel if successful. |
rename_hub | Changes the name of a hub. |
send_message | Sends a message in a text channel in a hub. Returns the message if successful. |
set_member_channel_permission | Sets a channel specific permission for a hub member. |
set_member_hub_permission | Sets a hub wide permission for a hub member. |
start_login | Start the OAuth login process. Returns a redirect to the given OAuth service’s page with the correct parameters. |
unban_user | Unbans a user from a hub. |
unmute_user | Unmutes a user in a hub. |
user_banned | Checks if a user is banned from a hub.
Returns |
user_muted | Checks if a user is muted in a hub.
Returns |