rocketchat package

Submodules

rocketchat.api module

class rocketchat.api.RocketChatAPI(settings=None, *args, **kwargs)

Bases: object

close_im_room(room_id, **kwargs)

Close direct message room

Parameters:room_id
Returns:
create_im_room(username, **kwargs)

Create direct message room with user

Parameters:username
Returns:
create_public_room(name, **kwargs)

Create room with given name :param name: Room name :param kwargs: members: The users to add to the channel when it is created.

Optional; Ex.: [“rocket.cat”], Default: []
read_only: Set if the channel is read only or not.
Optional; Ex.: True, Default: False
Returns:
create_user(email, name, password, username, **kwargs)

Create user :param email: E-mail :param name: Full name :param password: Password :param username: Username :param kwargs: active: roles: join_default_channels: require_password_change: send_welcome_email: verified: custom_fields: :return:

delete_public_room(room_id, **kwargs)

Delete room with given ID :param room_id: Room ID :param kwargs: :return:

delete_user(user_id, **kwargs)

Delete user :param user_id: User ID :param kwargs: :return:

get_im_room_history(room_id, oldest=None, latest=datetime.datetime(2020, 6, 4, 8, 16, 19, 313015), inclusive=False, count=20, unreads=False, **kwargs)

Get various history of specific direct message room

Parameters:
  • room_id
  • kwargs
Returns:

get_im_rooms(**kwargs)

Get direct message rooms

Returns:
get_my_info(**kwargs)
get_private_room_history(room_id, oldest=None, **kwargs)

Get various history of specific private group in this case private

Parameters:
  • room_id
  • kwargs
Returns:

get_private_room_info(room_id, **kwargs)

Get various information about a specific private group

Parameters:
  • room_id
  • kwargs
Returns:

get_private_rooms(**kwargs)

Get a listing of all private rooms with their names and IDs

get_public_rooms(**kwargs)

Get a listing of all public rooms with their names and IDs

get_room_history(room_id, oldest=None, latest=datetime.datetime(2020, 6, 4, 8, 16, 19, 313001), inclusive=False, count=20, unreads=False, **kwargs)

Get various history of specific channel/room

Parameters:
  • room_id
  • kwargs
Returns:

get_room_id(room_name, **kwargs)

Get room ID :param room_name: :param kwargs: :return:

get_room_info(room_id, **kwargs)

Get various information about a specific channel/room

Parameters:
  • room_id
  • kwargs
Returns:

get_user_info(user_id, **kwargs)

Retrieves information about a user, the result is only limited to what the callee has access to view. :param user_id: :param kwargs: :return:

get_users(**kwargs)

Gets all of the users in the system and their information :param kwargs: :return:

open_im_room(room_id, **kwargs)

Open direct message room

Parameters:room_id
Returns:
send_message(message, room_id, **kwargs)

Send a message to a given room

set_room_topic(room_id, topic, **kwargs)
settings = None
upload_file(room_id, description, file, message, mime_type='text/plain', **kwargs)

Upload file to room :param room_id: :param description: :param file: :param kwargs: :return:

Module contents