Groups are RocketChat's private rooms.
N.B. groups.list, contrary to the other lists can only be used for listing
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
groups = session.groups.list(offset: 40)
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
success = session.groups.add_all(room_id: 'ByehQjC44FwMeiLbX')
Optional parameter for add_all is active_users_only
(default false)
N.B. the addAll API endpoint requires the calling user to have the admin
role
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
success = session.groups.add_owner(name: 'some_groupname', username: 'some_username')
Either room_id (RocketChat's ID) or name can be used. The same applies to user_id and username.
To remove an owner from a group, the same options as an add_owner
request can be used.
To add a moderator to a group, the same options as an add_owner
request can be used.
To remove a moderator from a group, the same options as an add_owner
request can be used.
This method returns the users of participants of a private group.
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
session.groups.members(name: 'some_channel_name')
Upload file to the room
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
session.groups.upload_file(room_id: 'GENERAL', file: File, filename: "Optional. The name of the file to use.", content_type: "Optional. The content type of the uploaded file", msg: "Optional Message", description: "Optional Description", tmid: "Optional thread message id")