Slack Developer Kit for Node.js
Go to GitHub

ImFacet

Kind: global class

imFacet.close(channel, [optCb])

Close a direct message channel.

Kind: instance method of [ImFacet](#ImFacet)
See: im.close

Param Type Description
channel ? Direct message channel to close.
[optCb] function Optional callback, if not using promises.

imFacet.history(channel, [opts], [optCb])

Fetches history of messages and events from direct message channel.

Kind: instance method of [ImFacet](#ImFacet)
See: im.history

Param Type Description
channel ? Direct message channel to fetch history for.
[opts] Object  
opts.latest ? End of time range of messages to include in results.
opts.oldest ? Start of time range of messages to include in results.
opts.inclusive ? Include messages with latest or oldest timestamp in results.
opts.count ? Number of messages to return, between 1 and 1000.
opts.unreads ? Include unread_count_display in the output?
[optCb] function Optional callback, if not using promises.

imFacet.list([optCb])

Lists direct message channels for the calling user.

Kind: instance method of [ImFacet](#ImFacet)
See: im.list

Param Type Description
[optCb] function Optional callback, if not using promises.

imFacet.mark(channel, ts, [optCb])

Sets the read cursor in a direct message channel.

Kind: instance method of [ImFacet](#ImFacet)
See: im.mark

Param Type Description
channel ? Direct message channel to set reading cursor in.
ts ? Timestamp of the most recently seen message.
[optCb] function Optional callback, if not using promises.

imFacet.open(user, [optCb])

Opens a direct message channel.

Kind: instance method of [ImFacet](#ImFacet)
See: im.open

Param Type Description
user ? User to open a direct message channel with.
[optCb] function Optional callback, if not using promises.

imFacet.replies(channel, thread_ts, [optCb])

Returns an entire thread (a message plus all the messages in reply to it).

Kind: instance method of [ImFacet](#ImFacet)
See: im.replies

Param Type Description
channel ? Direct message channel to get replies from.
thread_ts ? Timestamp of the parent message.
[optCb] function Optional callback, if not using promises.