Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 604 Bytes

im.md

File metadata and controls

27 lines (18 loc) · 604 Bytes

IM API

RocketChat's IM interface.

im.create

Create a direct message.

require 'rocketchat'

rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
room = session.im.create(username: 'rocket.cat')

im.counters

Retrieves the count information using room_id or username

require 'rocketchat'

rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
im_summary = session.im.counters(room_id: 'room_id', username: 'rocket.cat')