diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..2a3065d0b --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +docs/**/* diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 000000000..6183824db --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,238 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (4.2.9) + i18n (~> 0.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.11.1) + colorator (1.1.0) + commonmarker (0.17.7.1) + ruby-enum (~> 0.5) + concurrent-ruby (1.0.5) + ethon (0.11.0) + ffi (>= 1.3.0) + execjs (2.7.0) + faraday (0.13.1) + multipart-post (>= 1.2, < 3) + ffi (1.9.18) + forwardable-extended (2.6.0) + gemoji (3.0.0) + github-pages (172) + activesupport (= 4.2.9) + github-pages-health-check (= 1.3.5) + jekyll (= 3.6.2) + jekyll-avatar (= 0.5.0) + jekyll-coffeescript (= 1.0.2) + jekyll-commonmark-ghpages (= 0.1.3) + jekyll-default-layout (= 0.1.4) + jekyll-feed (= 0.9.2) + jekyll-gist (= 1.4.1) + jekyll-github-metadata (= 2.9.3) + jekyll-mentions (= 1.2.0) + jekyll-optional-front-matter (= 0.3.0) + jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.2.0) + jekyll-redirect-from (= 0.12.1) + jekyll-relative-links (= 0.5.2) + jekyll-remote-theme (= 0.2.3) + jekyll-sass-converter (= 1.5.0) + jekyll-seo-tag (= 2.3.0) + jekyll-sitemap (= 1.1.1) + jekyll-swiss (= 0.4.0) + jekyll-theme-architect (= 0.1.0) + jekyll-theme-cayman (= 0.1.0) + jekyll-theme-dinky (= 0.1.0) + jekyll-theme-hacker (= 0.1.0) + jekyll-theme-leap-day (= 0.1.0) + jekyll-theme-merlot (= 0.1.0) + jekyll-theme-midnight (= 0.1.0) + jekyll-theme-minimal (= 0.1.0) + jekyll-theme-modernist (= 0.1.0) + jekyll-theme-primer (= 0.5.2) + jekyll-theme-slate (= 0.1.0) + jekyll-theme-tactile (= 0.1.0) + jekyll-theme-time-machine (= 0.1.0) + jekyll-titles-from-headings (= 0.5.0) + jemoji (= 0.8.1) + kramdown (= 1.14.0) + liquid (= 4.0.0) + listen (= 3.0.6) + mercenary (~> 0.3) + minima (= 2.1.1) + rouge (= 2.2.1) + terminal-table (~> 1.4) + github-pages-health-check (1.3.5) + addressable (~> 2.3) + net-dns (~> 0.8) + octokit (~> 4.0) + public_suffix (~> 2.0) + typhoeus (~> 0.7) + html-pipeline (2.7.1) + activesupport (>= 2) + nokogiri (>= 1.4) + i18n (0.9.1) + concurrent-ruby (~> 1.0) + jekyll (3.6.2) + addressable (~> 2.4) + colorator (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.14) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 3) + safe_yaml (~> 1.0) + jekyll-avatar (0.5.0) + jekyll (~> 3.0) + jekyll-coffeescript (1.0.2) + coffee-script (~> 2.2) + coffee-script-source (~> 1.11.1) + jekyll-commonmark (1.1.0) + commonmarker (~> 0.14) + jekyll (>= 3.0, < 4.0) + jekyll-commonmark-ghpages (0.1.3) + commonmarker (~> 0.17.6) + jekyll-commonmark (~> 1) + rouge (~> 2) + jekyll-default-layout (0.1.4) + jekyll (~> 3.0) + jekyll-feed (0.9.2) + jekyll (~> 3.3) + jekyll-gist (1.4.1) + octokit (~> 4.2) + jekyll-github-metadata (2.9.3) + jekyll (~> 3.1) + octokit (~> 4.0, != 4.4.0) + jekyll-mentions (1.2.0) + activesupport (~> 4.0) + html-pipeline (~> 2.3) + jekyll (~> 3.0) + jekyll-optional-front-matter (0.3.0) + jekyll (~> 3.0) + jekyll-paginate (1.1.0) + jekyll-readme-index (0.2.0) + jekyll (~> 3.0) + jekyll-redirect-from (0.12.1) + jekyll (~> 3.3) + jekyll-relative-links (0.5.2) + jekyll (~> 3.3) + jekyll-remote-theme (0.2.3) + jekyll (~> 3.5) + rubyzip (>= 1.2.1, < 3.0) + typhoeus (>= 0.7, < 2.0) + jekyll-sass-converter (1.5.0) + sass (~> 3.4) + jekyll-seo-tag (2.3.0) + jekyll (~> 3.3) + jekyll-sitemap (1.1.1) + jekyll (~> 3.3) + jekyll-swiss (0.4.0) + jekyll-theme-architect (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.5.2) + jekyll (~> 3.5) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.2) + jekyll-theme-slate (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.1.0) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.5.0) + jekyll (~> 3.3) + jekyll-watch (1.5.1) + listen (~> 3.0) + jemoji (0.8.1) + activesupport (~> 4.0, >= 4.2.9) + gemoji (~> 3.0) + html-pipeline (~> 2.2) + jekyll (>= 3.0) + kramdown (1.14.0) + liquid (4.0.0) + listen (3.0.6) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9.7) + mercenary (0.3.6) + mini_portile2 (2.3.0) + minima (2.1.1) + jekyll (~> 3.3) + minitest (5.10.3) + multipart-post (2.0.0) + net-dns (0.8.0) + nokogiri (1.8.1) + mini_portile2 (~> 2.3.0) + octokit (4.8.0) + sawyer (~> 0.8.0, >= 0.5.3) + pathutil (0.16.1) + forwardable-extended (~> 2.6) + public_suffix (2.0.5) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + rouge (2.2.1) + ruby-enum (0.7.1) + i18n + rubyzip (1.2.1) + safe_yaml (1.0.4) + sass (3.5.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.8.1) + addressable (>= 2.3.5, < 2.6) + faraday (~> 0.8, < 1.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) + typhoeus (0.8.0) + ethon (>= 0.8.0) + tzinfo (1.2.4) + thread_safe (~> 0.1) + unicode-display_width (1.3.0) + +PLATFORMS + ruby + +DEPENDENCIES + github-pages + +BUNDLED WITH + 1.16.0 diff --git a/docs/_reference/ApiFacet.md b/docs/_reference/ApiFacet.md new file mode 100644 index 000000000..68ce39365 --- /dev/null +++ b/docs/_reference/ApiFacet.md @@ -0,0 +1,21 @@ +--- +layout: page +title: ApiFacet +permalink: /reference/ApiFacet +--- +**Kind**: global class + + +### apiFacet.test([opts], [optCb]) +Checks API calling code. + +**Kind**: instance method of [ApiFacet](#ApiFacet) +**See**: [api.test](https://api.slack.com/methods/api.test) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.error | ? | Error response to return | +| opts.foo | ? | example property to return | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/AuthFacet.md b/docs/_reference/AuthFacet.md new file mode 100644 index 000000000..2b0f3bd61 --- /dev/null +++ b/docs/_reference/AuthFacet.md @@ -0,0 +1,37 @@ +--- +layout: page +title: AuthFacet +permalink: /reference/AuthFacet +--- +**Kind**: global class + +* [AuthFacet](#AuthFacet) + * [.revoke([opts], [optCb])](#AuthFacet+revoke) + * [.test([optCb])](#AuthFacet+test) + + + +### authFacet.revoke([opts], [optCb]) +Revokes a token. + +**Kind**: instance method of [AuthFacet](#AuthFacet) +**See**: [auth.revoke](https://api.slack.com/methods/auth.revoke) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.test | ? | Setting this parameter to `1` triggers a _testing mode_ where the specified token will not actually be revoked. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### authFacet.test([optCb]) +Checks authentication & identity. + +**Kind**: instance method of [AuthFacet](#AuthFacet) +**See**: [auth.test](https://api.slack.com/methods/auth.test) + +| Param | Type | Description | +| --- | --- | --- | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/BotsFacet.md b/docs/_reference/BotsFacet.md new file mode 100644 index 000000000..060dc4270 --- /dev/null +++ b/docs/_reference/BotsFacet.md @@ -0,0 +1,20 @@ +--- +layout: page +title: BotsFacet +permalink: /reference/BotsFacet +--- +**Kind**: global class + + +### botsFacet.info([opts], [optCb]) +Gets information about a bot user. + +**Kind**: instance method of [BotsFacet](#BotsFacet) +**See**: [bots.info](https://api.slack.com/methods/bots.info) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.bot | ? | Bot user to get info on | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/ChannelsFacet.md b/docs/_reference/ChannelsFacet.md new file mode 100644 index 000000000..37332e2a4 --- /dev/null +++ b/docs/_reference/ChannelsFacet.md @@ -0,0 +1,233 @@ +--- +layout: page +title: ChannelsFacet +permalink: /reference/ChannelsFacet +--- +**Kind**: global class + +* [ChannelsFacet](#ChannelsFacet) + * [.archive(channel, [optCb])](#ChannelsFacet+archive) + * [.create(name, [optCb])](#ChannelsFacet+create) + * [.history(channel, [opts], [optCb])](#ChannelsFacet+history) + * [.info(channel, [optCb])](#ChannelsFacet+info) + * [.invite(channel, user, [optCb])](#ChannelsFacet+invite) + * [.join(name, [optCb])](#ChannelsFacet+join) + * [.kick(channel, user, [optCb])](#ChannelsFacet+kick) + * [.leave(channel, [optCb])](#ChannelsFacet+leave) + * [.list([opts], [optCb])](#ChannelsFacet+list) + * [.mark(channel, ts, [optCb])](#ChannelsFacet+mark) + * [.rename(channel, name, [optCb])](#ChannelsFacet+rename) + * [.replies(channel, thread_ts, [optCb])](#ChannelsFacet+replies) + * [.setPurpose(channel, purpose, [optCb])](#ChannelsFacet+setPurpose) + * [.setTopic(channel, topic, [optCb])](#ChannelsFacet+setTopic) + * [.unarchive(channel, [optCb])](#ChannelsFacet+unarchive) + + + +### channelsFacet.archive(channel, [optCb]) +Archives a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.archive](https://api.slack.com/methods/channels.archive) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to archive | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.create(name, [optCb]) +Creates a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.create](https://api.slack.com/methods/channels.create) + +| Param | Type | Description | +| --- | --- | --- | +| name | ? | Name of channel to create | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.history(channel, [opts], [optCb]) +Fetches history of messages and events from a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.history](https://api.slack.com/methods/channels.history) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | 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. | + + + +### channelsFacet.info(channel, [optCb]) +Gets information about a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.info](https://api.slack.com/methods/channels.info) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to get info on | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.invite(channel, user, [optCb]) +Invites a user to a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.invite](https://api.slack.com/methods/channels.invite) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to invite user to. | +| user | ? | User to invite to channel. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.join(name, [optCb]) +Joins a channel, creating it if needed. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.join](https://api.slack.com/methods/channels.join) + +| Param | Type | Description | +| --- | --- | --- | +| name | ? | Name of channel to join | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.kick(channel, user, [optCb]) +Removes a user from a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.kick](https://api.slack.com/methods/channels.kick) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to remove user from. | +| user | ? | User to remove from channel. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.leave(channel, [optCb]) +Leaves a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.leave](https://api.slack.com/methods/channels.leave) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to leave | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.list([opts], [optCb]) +Lists all channels in a Slack team. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.list](https://api.slack.com/methods/channels.list) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.exclude_archived | ? | Don't return archived channels. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.mark(channel, ts, [optCb]) +Sets the read cursor in a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.mark](https://api.slack.com/methods/channels.mark) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to set reading cursor in. | +| ts | ? | Timestamp of the most recently seen message. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.rename(channel, name, [optCb]) +Renames a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.rename](https://api.slack.com/methods/channels.rename) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to rename | +| name | ? | New name for channel. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.replies(channel, thread_ts, [optCb]) +Retrieve a thread of messages posted to a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.replies](https://api.slack.com/methods/channels.replies) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to fetch thread from | +| thread_ts | ? | Unique identifier of a thread's parent message. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.setPurpose(channel, purpose, [optCb]) +Sets the purpose for a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.setPurpose](https://api.slack.com/methods/channels.setPurpose) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to set the purpose of | +| purpose | ? | The new purpose | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.setTopic(channel, topic, [optCb]) +Sets the topic for a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.setTopic](https://api.slack.com/methods/channels.setTopic) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to set the topic of | +| topic | ? | The new topic | +| [optCb] | function | Optional callback, if not using promises. | + + + +### channelsFacet.unarchive(channel, [optCb]) +Unarchives a channel. + +**Kind**: instance method of [ChannelsFacet](#ChannelsFacet) +**See**: [channels.unarchive](https://api.slack.com/methods/channels.unarchive) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to unarchive | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/ChatFacet.md b/docs/_reference/ChatFacet.md new file mode 100644 index 000000000..ba2ba6384 --- /dev/null +++ b/docs/_reference/ChatFacet.md @@ -0,0 +1,141 @@ +--- +layout: page +title: ChatFacet +permalink: /reference/ChatFacet +--- +**Kind**: global class + +* [ChatFacet](#ChatFacet) + * [.delete(ts, channel, [opts], [optCb])](#ChatFacet+delete) + * [.meMessage(channel, text, [optCb])](#ChatFacet+meMessage) + * [.postEphemeral(channel, text, user, [opts], [optCb])](#ChatFacet+postEphemeral) + * [.postMessage(channel, text, [opts], [optCb])](#ChatFacet+postMessage) + * [.update(ts, channel, text, [opts], [optCb])](#ChatFacet+update) + * [.unfurl(ts, channel, unfurls, [opts], [optCb])](#ChatFacet+unfurl) + * [.getPermalink(channel, ts, [optCb])](#ChatFacet+getPermalink) + + + +### chatFacet.delete(ts, channel, [opts], [optCb]) +Deletes a message. + +**Kind**: instance method of [ChatFacet](#ChatFacet) +**See**: [chat.delete](https://api.slack.com/methods/chat.delete) + +| Param | Type | Description | +| --- | --- | --- | +| ts | ? | Timestamp of the message to be deleted. | +| channel | ? | Channel containing the message to be deleted. | +| [opts] | Object | | +| opts.as_user | ? | Pass true to delete the message as the authed user. [Bot users](/bot-users) in this context are considered authed users. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### chatFacet.meMessage(channel, text, [optCb]) +Share a me message into a channel. + +**Kind**: instance method of [ChatFacet](#ChatFacet) +**See**: [chat.meMessage](https://api.slack.com/methods/chat.meMessage) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name. | +| text | ? | Text of the message to send. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### chatFacet.postEphemeral(channel, text, user, [opts], [optCb]) +Sends an ephemeral message to a user in a channel. + +**Kind**: instance method of [ChatFacet](#ChatFacet) +**See**: [chat.postEphemeral](https://api.slack.com/methods/chat.postEphemeral) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details. | +| text | ? | Text of the message to send. See below for an explanation of [formatting](#formatting). This field is usually required, unless you're providing only `attachments` instead. | +| user | ? | `id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument. | +| [opts] | Object | | +| opts.parse | ? | Change how messages are treated. Defaults to `none`. See [below](#formatting). | +| opts.link_names | ? | Find and link channel names and usernames. | +| opts.attachments | ? | Structured message attachments. | +| opts.as_user | ? | Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### chatFacet.postMessage(channel, text, [opts], [optCb]) +Sends a message to a channel. + +**Kind**: instance method of [ChatFacet](#ChatFacet) +**See**: [chat.postMessage](https://api.slack.com/methods/chat.postMessage) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details. | +| text | ? | Text of the message to send. See below for an explanation of [formatting](#formatting). This field is usually required, unless you're providing only `attachments` instead. | +| [opts] | Object | | +| opts.parse | ? | Change how messages are treated. Defaults to `none`. See [below](#formatting). | +| opts.link_names | ? | Find and link channel names and usernames. | +| opts.attachments | ? | Structured message attachments. | +| opts.unfurl_links | ? | Pass true to enable unfurling of primarily text-based content. | +| opts.unfurl_media | ? | Pass false to disable unfurling of media content. | +| opts.username | ? | Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. | +| opts.as_user | ? | Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below. | +| opts.icon_url | ? | URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. | +| opts.icon_emoji | ? | emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### chatFacet.update(ts, channel, text, [opts], [optCb]) +Updates a message. + +**Kind**: instance method of [ChatFacet](#ChatFacet) +**See**: [chat.update](https://api.slack.com/methods/chat.update) + +| Param | Type | Description | +| --- | --- | --- | +| ts | ? | Timestamp of the message to be updated. | +| channel | ? | Channel containing the message to be updated. | +| text | ? | New text for the message, using the [default formatting rules](/docs/formatting). | +| [opts] | Object | | +| opts.attachments | ? | Structured message attachments. | +| opts.parse | ? | Change how messages are treated. Defaults to `client`, unlike `chat.postMessage`. See [below](#formatting). | +| opts.link_names | ? | Find and link channel names and usernames. Defaults to `none`. This parameter should be used in conjunction with `parse`. To set `link_names` to `1`, specify a `parse` mode of `full`. | +| opts.as_user | ? | Pass true to update the message as the authed user. [Bot users](/bot-users) in this context are considered authed users. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### chatFacet.unfurl(ts, channel, unfurls, [opts], [optCb]) +Unfurl a URL within a message by defining its message attachment. + +**Kind**: instance method of [ChatFacet](#ChatFacet) +**See**: [chat.unfurl](https://api.slack.com/methods/chat.unfurl) + +| Param | Type | Description | +| --- | --- | --- | +| ts | ? | Timestamp of the message to be updated. | +| channel | ? | Channel of the message to be updated. | +| unfurls | string | a map of URLs to structured message attachments | +| [opts] | Object | | +| opts.user_auth_required | ? | Pass true to require user authorization. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### chatFacet.getPermalink(channel, ts, [optCb]) +Retrieve a permalink URL for a specific extant message. + +**Kind**: instance method of [ChatFacet](#ChatFacet) +**See**: [chat.getPermalink](https://api.slack.com/methods/chat.getPermalink) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | The ID of the conversation or channel containing the message. | +| ts | ? | A message's ts value, uniquely identifying it within a channel. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/ConversationsFacet.md b/docs/_reference/ConversationsFacet.md new file mode 100644 index 000000000..79d52d37a --- /dev/null +++ b/docs/_reference/ConversationsFacet.md @@ -0,0 +1,275 @@ +--- +layout: page +title: ConversationsFacet +permalink: /reference/ConversationsFacet +--- +**Kind**: global class + +* [ConversationsFacet](#ConversationsFacet) + * [.archive(channel, [optCb])](#ConversationsFacet+archive) + * [.close(channel, [optCb])](#ConversationsFacet+close) + * [.create(name, [opts], [optCb])](#ConversationsFacet+create) + * [.history(channel, [opts], [optCb])](#ConversationsFacet+history) + * [.info(channel, [opts], [optCb])](#ConversationsFacet+info) + * [.invite(channel, users, [optCb])](#ConversationsFacet+invite) + * [.join(channel, [optCb])](#ConversationsFacet+join) + * [.kick(channel, user, [optCb])](#ConversationsFacet+kick) + * [.leave(channel, [optCb])](#ConversationsFacet+leave) + * [.list([opts], [optCb])](#ConversationsFacet+list) + * [.members(channel, [opts], [optCb])](#ConversationsFacet+members) + * [.open([opts], [optCb])](#ConversationsFacet+open) + * [.rename(channel, name, [optCb])](#ConversationsFacet+rename) + * [.replies(channel, ts, [opts], [optCb])](#ConversationsFacet+replies) + * [.setPurpose(channel, purpose, [optCb])](#ConversationsFacet+setPurpose) + * [.setTopic(channel, topic, [optCb])](#ConversationsFacet+setTopic) + * [.unarchive(channel, [optCb])](#ConversationsFacet+unarchive) + + + +### conversationsFacet.archive(channel, [optCb]) +Archives a conversation. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.archive](https://api.slack.com/methods/conversations.archive) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | ID of conversation to archive | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.close(channel, [optCb]) +Closes a direct message or multi-person direct message. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.close](https://api.slack.com/methods/conversations.close) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Conversation to close. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.create(name, [opts], [optCb]) +Initiates a public or private channel-based conversation + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.create](https://api.slack.com/methods/conversations.create) + +| Param | Type | Description | +| --- | --- | --- | +| name | ? | Name of the public or private channel to create | +| [opts] | Object | | +| opts.is_private | ? | Create a private channel instead of a public one | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.history(channel, [opts], [optCb]) +Fetches a conversation's history of messages and events. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.history](https://api.slack.com/methods/conversations.history) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Conversation ID 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.cursor | ? | Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. | +| opts.limit | ? | The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.info(channel, [opts], [optCb]) +Retrieve information about a conversation. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.info](https://api.slack.com/methods/conversations.info) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to get info on | +| [opts] | Object | | +| opts.include_locale | ? | Set this to `true` to receive the locale for this conversation. Defaults to `false` | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.invite(channel, users, [optCb]) +Invites users to a channel. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.invite](https://api.slack.com/methods/conversations.invite) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | The ID of the public or private channel to invite user(s) to. | +| users | ? | A comma separated list of user IDs. Up to 30 users may be listed. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.join(channel, [optCb]) +Joins an existing conversation. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.join](https://api.slack.com/methods/conversations.join) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | ID of conversation to join | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.kick(channel, user, [optCb]) +Removes a user from a conversation. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.kick](https://api.slack.com/methods/conversations.kick) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | ID of conversation to remove user from. | +| user | ? | User to remove from channel. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.leave(channel, [optCb]) +Leaves a channel. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.leave](https://api.slack.com/methods/conversations.leave) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to leave | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.list([opts], [optCb]) +Lists all conversations in a Slack team. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.list](https://api.slack.com/methods/conversations.list) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.exclude_archived | ? | Set to `true` to exclude archived channels from the list | +| opts.types | ? | Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im` | +| opts.cursor | ? | Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. | +| opts.limit | ? | The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.members(channel, [opts], [optCb]) +Retrieve members of a conversation. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.members](https://api.slack.com/methods/conversations.members) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | ID of the conversation to retrieve members for | +| [opts] | Object | | +| opts.cursor | ? | Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. | +| opts.limit | ? | The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.open([opts], [optCb]) +Opens or resumes a direct message or multi-person direct message. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.open](https://api.slack.com/methods/conversations.open) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.channel | ? | Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead. | +| opts.return_im | ? | Boolean, indicates you want the full IM channel definition in the response. | +| opts.users | ? | Comma separated lists of users. If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a channel when not supplying users. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.rename(channel, name, [optCb]) +Renames a conversation. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.rename](https://api.slack.com/methods/conversations.rename) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | ID of conversation to rename | +| name | ? | New name for conversation. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.replies(channel, ts, [opts], [optCb]) +Retrieve a thread of messages posted to a conversation + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.replies](https://api.slack.com/methods/conversations.replies) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Conversation ID to fetch thread from | +| ts | ? | Unique identifier of a thread's parent message | +| [opts] | Object | | +| opts.cursor | ? | Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. | +| opts.limit | ? | The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.setPurpose(channel, purpose, [optCb]) +Sets the purpose for a conversation. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.setPurpose](https://api.slack.com/methods/conversations.setPurpose) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Conversation to set the purpose of | +| purpose | ? | A new, specialer purpose | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.setTopic(channel, topic, [optCb]) +Sets the topic for a conversation. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.setTopic](https://api.slack.com/methods/conversations.setTopic) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Conversation to set the topic of | +| topic | ? | The new topic string. Does not support formatting or linkification. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### conversationsFacet.unarchive(channel, [optCb]) +Reverses conversation archival. + +**Kind**: instance method of [ConversationsFacet](#ConversationsFacet) +**See**: [conversations.unarchive](https://api.slack.com/methods/conversations.unarchive) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | ID of conversation to unarchive | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/DialogFacet.md b/docs/_reference/DialogFacet.md new file mode 100644 index 000000000..0e7d47600 --- /dev/null +++ b/docs/_reference/DialogFacet.md @@ -0,0 +1,20 @@ +--- +layout: page +title: DialogFacet +permalink: /reference/DialogFacet +--- +**Kind**: global class + + +### dialogFacet.open(dialog, triggerId, [optCb]) +Opens a dialog corresponding to the trigger. + +**Kind**: instance method of [DialogFacet](#DialogFacet) +**See**: [dialog.open](https://api.slack.com/methods/dialog.open) + +| Param | Type | Description | +| --- | --- | --- | +| dialog | ? | The dialog definition, as a JSON-encoded string. | +| triggerId | ? | The trigger that this dialog opens in response to. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/DndFacet.md b/docs/_reference/DndFacet.md new file mode 100644 index 000000000..dc01e77ed --- /dev/null +++ b/docs/_reference/DndFacet.md @@ -0,0 +1,79 @@ +--- +layout: page +title: DndFacet +permalink: /reference/DndFacet +--- +**Kind**: global class + +* [DndFacet](#DndFacet) + * [.endDnd([optCb])](#DndFacet+endDnd) + * [.endSnooze([optCb])](#DndFacet+endSnooze) + * [.info([opts], [optCb])](#DndFacet+info) + * [.setSnooze(num_minutes, [optCb])](#DndFacet+setSnooze) + * [.teamInfo([opts], [optCb])](#DndFacet+teamInfo) + + + +### dndFacet.endDnd([optCb]) +Ends the current user's Do Not Disturb session immediately. + +**Kind**: instance method of [DndFacet](#DndFacet) +**See**: [dnd.endDnd](https://api.slack.com/methods/dnd.endDnd) + +| Param | Type | Description | +| --- | --- | --- | +| [optCb] | function | Optional callback, if not using promises. | + + + +### dndFacet.endSnooze([optCb]) +Ends the current user's snooze mode immediately. + +**Kind**: instance method of [DndFacet](#DndFacet) +**See**: [dnd.endSnooze](https://api.slack.com/methods/dnd.endSnooze) + +| Param | Type | Description | +| --- | --- | --- | +| [optCb] | function | Optional callback, if not using promises. | + + + +### dndFacet.info([opts], [optCb]) +Retrieves a user's current Do Not Disturb status. + +**Kind**: instance method of [DndFacet](#DndFacet) +**See**: [dnd.info](https://api.slack.com/methods/dnd.info) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.user | ? | User to fetch status for (defaults to current user) | +| [optCb] | function | Optional callback, if not using promises. | + + + +### dndFacet.setSnooze(num_minutes, [optCb]) +Turns on Do Not Disturb mode for the current user, or changes its duration. + +**Kind**: instance method of [DndFacet](#DndFacet) +**See**: [dnd.setSnooze](https://api.slack.com/methods/dnd.setSnooze) + +| Param | Type | Description | +| --- | --- | --- | +| num_minutes | ? | Number of minutes, from now, to snooze until. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### dndFacet.teamInfo([opts], [optCb]) +Retrieves the Do Not Disturb status for users on a team. + +**Kind**: instance method of [DndFacet](#DndFacet) +**See**: [dnd.teamInfo](https://api.slack.com/methods/dnd.teamInfo) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.users | ? | Comma-separated list of users to fetch Do Not Disturb status for | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/EmojiFacet.md b/docs/_reference/EmojiFacet.md new file mode 100644 index 000000000..a35b5dc3c --- /dev/null +++ b/docs/_reference/EmojiFacet.md @@ -0,0 +1,18 @@ +--- +layout: page +title: EmojiFacet +permalink: /reference/EmojiFacet +--- +**Kind**: global class + + +### emojiFacet.list([optCb]) +Lists custom emoji for a team. + +**Kind**: instance method of [EmojiFacet](#EmojiFacet) +**See**: [emoji.list](https://api.slack.com/methods/emoji.list) + +| Param | Type | Description | +| --- | --- | --- | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/FilesCommentsFacet.md b/docs/_reference/FilesCommentsFacet.md new file mode 100644 index 000000000..a1ed75401 --- /dev/null +++ b/docs/_reference/FilesCommentsFacet.md @@ -0,0 +1,57 @@ +--- +layout: page +title: FilesCommentsFacet +permalink: /reference/FilesCommentsFacet +--- +**Kind**: global class + +* [FilesCommentsFacet](#FilesCommentsFacet) + * [.add(file, comment, [opts], [optCb])](#FilesCommentsFacet+add) + * [.delete(file, id, [optCb])](#FilesCommentsFacet+delete) + * [.edit(file, id, comment, [optCb])](#FilesCommentsFacet+edit) + + + +### filesCommentsFacet.add(file, comment, [opts], [optCb]) +Add a comment to an existing file. + +**Kind**: instance method of [FilesCommentsFacet](#FilesCommentsFacet) +**See**: [files.comments.add](https://api.slack.com/methods/files.comments.add) + +| Param | Type | Description | +| --- | --- | --- | +| file | ? | File to add a comment to. | +| comment | ? | Text of the comment to add. | +| [opts] | Object | | +| opts.channel | ? | Channel id (encoded) of which location to associate with the new comment. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### filesCommentsFacet.delete(file, id, [optCb]) +Deletes an existing comment on a file. + +**Kind**: instance method of [FilesCommentsFacet](#FilesCommentsFacet) +**See**: [files.comments.delete](https://api.slack.com/methods/files.comments.delete) + +| Param | Type | Description | +| --- | --- | --- | +| file | ? | File to delete a comment from. | +| id | ? | The comment to delete. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### filesCommentsFacet.edit(file, id, comment, [optCb]) +Edit an existing file comment. + +**Kind**: instance method of [FilesCommentsFacet](#FilesCommentsFacet) +**See**: [files.comments.edit](https://api.slack.com/methods/files.comments.edit) + +| Param | Type | Description | +| --- | --- | --- | +| file | ? | File containing the comment to edit. | +| id | ? | The comment to edit. | +| comment | ? | Text of the comment to edit. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/FilesFacet.md b/docs/_reference/FilesFacet.md new file mode 100644 index 000000000..7f9a5f27f --- /dev/null +++ b/docs/_reference/FilesFacet.md @@ -0,0 +1,106 @@ +--- +layout: page +title: FilesFacet +permalink: /reference/FilesFacet +--- +**Kind**: global class + +* [FilesFacet](#FilesFacet) + * [.delete(file, [optCb])](#FilesFacet+delete) + * [.info(file, [opts], [optCb])](#FilesFacet+info) + * [.list([opts], [optCb])](#FilesFacet+list) + * [.revokePublicURL(file, [optCb])](#FilesFacet+revokePublicURL) + * [.sharedPublicURL(file, [optCb])](#FilesFacet+sharedPublicURL) + * [.upload(filename, [opts], [optCb])](#FilesFacet+upload) + + + +### filesFacet.delete(file, [optCb]) +Deletes a file. + +**Kind**: instance method of [FilesFacet](#FilesFacet) +**See**: [files.delete](https://api.slack.com/methods/files.delete) + +| Param | Type | Description | +| --- | --- | --- | +| file | ? | ID of file to delete. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### filesFacet.info(file, [opts], [optCb]) +Gets information about a team file. + +**Kind**: instance method of [FilesFacet](#FilesFacet) +**See**: [files.info](https://api.slack.com/methods/files.info) + +| Param | Type | Description | +| --- | --- | --- | +| file | ? | Specify a file by providing its ID. | +| [opts] | Object | | +| [optCb] | function | Optional callback, if not using promises. | + + + +### filesFacet.list([opts], [optCb]) +Lists & filters team files. + +**Kind**: instance method of [FilesFacet](#FilesFacet) +**See**: [files.list](https://api.slack.com/methods/files.list) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.user | ? | Filter files created by a single user. | +| opts.channel | ? | Filter files appearing in a specific channel, indicated by its ID. | +| opts.ts_from | ? | Filter files created after this timestamp (inclusive). | +| opts.ts_to | ? | Filter files created before this timestamp (inclusive). | +| opts.types | ? | Filter files by type: * `all` - All files * `spaces` - Posts * `snippets` - Snippets * `images` - Image files * `gdocs` - Google docs * `zips` - Zip files * `pdfs` - PDF files You can pass multiple values in the types argument, like `types=spaces,snippets`.The default value is `all`, which does not filter the list. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### filesFacet.revokePublicURL(file, [optCb]) +Revokes public/external sharing access for a file + +**Kind**: instance method of [FilesFacet](#FilesFacet) +**See**: [files.revokePublicURL](https://api.slack.com/methods/files.revokePublicURL) + +| Param | Type | Description | +| --- | --- | --- | +| file | ? | File to revoke | +| [optCb] | function | Optional callback, if not using promises. | + + + +### filesFacet.sharedPublicURL(file, [optCb]) +Enables a file for public/external sharing. + +**Kind**: instance method of [FilesFacet](#FilesFacet) +**See**: [files.sharedPublicURL](https://api.slack.com/methods/files.sharedPublicURL) + +| Param | Type | Description | +| --- | --- | --- | +| file | ? | File to share | +| [optCb] | function | Optional callback, if not using promises. | + + + +### filesFacet.upload(filename, [opts], [optCb]) +Uploads or creates a file. + +**Kind**: instance method of [FilesFacet](#FilesFacet) +**See**: [files.upload](https://api.slack.com/methods/files.upload) + +| Param | Type | Description | +| --- | --- | --- | +| filename | ? | Filename of file. | +| [opts] | Object | | +| opts.file | ? | File contents via `multipart/form-data`. If omitting this parameter, you must submit `content`. | +| opts.content | ? | File contents via a POST variable. If omitting this parameter, you must provide a `file`. | +| opts.filetype | ? | A [file type](/types/file#file_types) identifier. | +| opts.title | ? | Title of file. | +| opts.initial_comment | ? | Initial comment to add to file. | +| opts.channels | ? | Comma-separated list of channel names or IDs where the file will be shared. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/GroupsFacet.md b/docs/_reference/GroupsFacet.md new file mode 100644 index 000000000..705dd6484 --- /dev/null +++ b/docs/_reference/GroupsFacet.md @@ -0,0 +1,261 @@ +--- +layout: page +title: GroupsFacet +permalink: /reference/GroupsFacet +--- +**Kind**: global class + +* [GroupsFacet](#GroupsFacet) + * [.archive(channel, [optCb])](#GroupsFacet+archive) + * [.close(channel, [optCb])](#GroupsFacet+close) + * [.create(name, [optCb])](#GroupsFacet+create) + * [.createChild(channel, [optCb])](#GroupsFacet+createChild) + * [.history(channel, [opts], [optCb])](#GroupsFacet+history) + * [.info(channel, [optCb])](#GroupsFacet+info) + * [.invite(channel, user, [optCb])](#GroupsFacet+invite) + * [.kick(channel, user, [optCb])](#GroupsFacet+kick) + * [.leave(channel, [optCb])](#GroupsFacet+leave) + * [.list([opts], [optCb])](#GroupsFacet+list) + * [.mark(channel, ts, [optCb])](#GroupsFacet+mark) + * [.open(channel, [optCb])](#GroupsFacet+open) + * [.rename(channel, name, [optCb])](#GroupsFacet+rename) + * [.replies(channel, thread_ts, [optCb])](#GroupsFacet+replies) + * [.setPurpose(channel, purpose, [optCb])](#GroupsFacet+setPurpose) + * [.setTopic(channel, topic, [optCb])](#GroupsFacet+setTopic) + * [.unarchive(channel, [optCb])](#GroupsFacet+unarchive) + + + +### groupsFacet.archive(channel, [optCb]) +Archives a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.archive](https://api.slack.com/methods/groups.archive) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to archive | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.close(channel, [optCb]) +Closes a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.close](https://api.slack.com/methods/groups.close) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to close. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.create(name, [optCb]) +Creates a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.create](https://api.slack.com/methods/groups.create) + +| Param | Type | Description | +| --- | --- | --- | +| name | ? | Name of private channel to create | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.createChild(channel, [optCb]) +Clones and archives a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.createChild](https://api.slack.com/methods/groups.createChild) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to clone and archive. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.history(channel, [opts], [optCb]) +Fetches history of messages and events from a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.history](https://api.slack.com/methods/groups.history) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private 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. | + + + +### groupsFacet.info(channel, [optCb]) +Gets information about a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.info](https://api.slack.com/methods/groups.info) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to get info on | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.invite(channel, user, [optCb]) +Invites a user to a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.invite](https://api.slack.com/methods/groups.invite) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to invite user to. | +| user | ? | User to invite. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.kick(channel, user, [optCb]) +Removes a user from a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.kick](https://api.slack.com/methods/groups.kick) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to remove user from. | +| user | ? | User to remove from private channel. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.leave(channel, [optCb]) +Leaves a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.leave](https://api.slack.com/methods/groups.leave) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to leave | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.list([opts], [optCb]) +Lists private channels that the calling user has access to. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.list](https://api.slack.com/methods/groups.list) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.exclude_archived | ? | Don't return archived private channels. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.mark(channel, ts, [optCb]) +Sets the read cursor in a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.mark](https://api.slack.com/methods/groups.mark) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to set reading cursor in. | +| ts | ? | Timestamp of the most recently seen message. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.open(channel, [optCb]) +Opens a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.open](https://api.slack.com/methods/groups.open) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to open. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.rename(channel, name, [optCb]) +Renames a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.rename](https://api.slack.com/methods/groups.rename) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to rename | +| name | ? | New name for private channel. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.replies(channel, thread_ts, [optCb]) +Retrieve a thread of messages posted to a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.replies](https://api.slack.com/methods/groups.replies) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to fetch thread from | +| thread_ts | ? | Unique identifier of a thread's parent message | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.setPurpose(channel, purpose, [optCb]) +Sets the purpose for a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.setPurpose](https://api.slack.com/methods/groups.setPurpose) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to set the purpose of | +| purpose | ? | The new purpose | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.setTopic(channel, topic, [optCb]) +Sets the topic for a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.setTopic](https://api.slack.com/methods/groups.setTopic) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to set the topic of | +| topic | ? | The new topic | +| [optCb] | function | Optional callback, if not using promises. | + + + +### groupsFacet.unarchive(channel, [optCb]) +Unarchives a private channel. + +**Kind**: instance method of [GroupsFacet](#GroupsFacet) +**See**: [groups.unarchive](https://api.slack.com/methods/groups.unarchive) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Private channel to unarchive | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/ImFacet.md b/docs/_reference/ImFacet.md new file mode 100644 index 000000000..8492ade00 --- /dev/null +++ b/docs/_reference/ImFacet.md @@ -0,0 +1,100 @@ +--- +layout: page +title: ImFacet +permalink: /reference/ImFacet +--- +**Kind**: global class + +* [ImFacet](#ImFacet) + * [.close(channel, [optCb])](#ImFacet+close) + * [.history(channel, [opts], [optCb])](#ImFacet+history) + * [.list([optCb])](#ImFacet+list) + * [.mark(channel, ts, [optCb])](#ImFacet+mark) + * [.open(user, [optCb])](#ImFacet+open) + * [.replies(channel, thread_ts, [optCb])](#ImFacet+replies) + + + +### imFacet.close(channel, [optCb]) +Close a direct message channel. + +**Kind**: instance method of [ImFacet](#ImFacet) +**See**: [im.close](https://api.slack.com/methods/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](https://api.slack.com/methods/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](https://api.slack.com/methods/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](https://api.slack.com/methods/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](https://api.slack.com/methods/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](https://api.slack.com/methods/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. | + diff --git a/docs/_reference/MpimFacet.md b/docs/_reference/MpimFacet.md new file mode 100644 index 000000000..2f7c0eabd --- /dev/null +++ b/docs/_reference/MpimFacet.md @@ -0,0 +1,85 @@ +--- +layout: page +title: MpimFacet +permalink: /reference/MpimFacet +--- +**Kind**: global class + +* [MpimFacet](#MpimFacet) + * [.close(channel, [optCb])](#MpimFacet+close) + * [.history(channel, [opts], [optCb])](#MpimFacet+history) + * [.list([optCb])](#MpimFacet+list) + * [.mark(channel, ts, [optCb])](#MpimFacet+mark) + * [.open(users, [optCb])](#MpimFacet+open) + + + +### mpimFacet.close(channel, [optCb]) +Closes a multiparty direct message channel. + +**Kind**: instance method of [MpimFacet](#MpimFacet) +**See**: [mpim.close](https://api.slack.com/methods/mpim.close) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | MPIM to close. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### mpimFacet.history(channel, [opts], [optCb]) +Fetches history of messages and events from a multiparty direct message. + +**Kind**: instance method of [MpimFacet](#MpimFacet) +**See**: [mpim.history](https://api.slack.com/methods/mpim.history) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Multiparty direct message 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. | + + + +### mpimFacet.list([optCb]) +Lists multiparty direct message channels for the calling user. + +**Kind**: instance method of [MpimFacet](#MpimFacet) +**See**: [mpim.list](https://api.slack.com/methods/mpim.list) + +| Param | Type | Description | +| --- | --- | --- | +| [optCb] | function | Optional callback, if not using promises. | + + + +### mpimFacet.mark(channel, ts, [optCb]) +Sets the read cursor in a multiparty direct message channel. + +**Kind**: instance method of [MpimFacet](#MpimFacet) +**See**: [mpim.mark](https://api.slack.com/methods/mpim.mark) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | multiparty direct message channel to set reading cursor in. | +| ts | ? | Timestamp of the most recently seen message. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### mpimFacet.open(users, [optCb]) +This method opens a multiparty direct message. + +**Kind**: instance method of [MpimFacet](#MpimFacet) +**See**: [mpim.open](https://api.slack.com/methods/mpim.open) + +| Param | Type | Description | +| --- | --- | --- | +| users | ? | Comma separated lists of users. The ordering of the users is preserved whenever a MPIM group is returned. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/OauthFacet.md b/docs/_reference/OauthFacet.md new file mode 100644 index 000000000..50883ffd9 --- /dev/null +++ b/docs/_reference/OauthFacet.md @@ -0,0 +1,23 @@ +--- +layout: page +title: OauthFacet +permalink: /reference/OauthFacet +--- +**Kind**: global class + + +### oauthFacet.access(client_id, client_secret, code, [opts], [optCb]) +Exchanges a temporary OAuth code for an API token. + +**Kind**: instance method of [OauthFacet](#OauthFacet) +**See**: [oauth.access](https://api.slack.com/methods/oauth.access) + +| Param | Type | Description | +| --- | --- | --- | +| client_id | ? | Issued when you created your application. | +| client_secret | ? | Issued when you created your application. | +| code | ? | The `code` param returned via the OAuth callback. | +| [opts] | Object | | +| opts.redirect_uri | ? | This must match the originally submitted URI (if one was sent). | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/PinsFacet.md b/docs/_reference/PinsFacet.md new file mode 100644 index 000000000..00b70af1c --- /dev/null +++ b/docs/_reference/PinsFacet.md @@ -0,0 +1,59 @@ +--- +layout: page +title: PinsFacet +permalink: /reference/PinsFacet +--- +**Kind**: global class + +* [PinsFacet](#PinsFacet) + * [.add(channel, [opts], [optCb])](#PinsFacet+add) + * [.list(channel, [optCb])](#PinsFacet+list) + * [.remove(channel, [opts], [optCb])](#PinsFacet+remove) + + + +### pinsFacet.add(channel, [opts], [optCb]) +Pins an item to a channel. + +**Kind**: instance method of [PinsFacet](#PinsFacet) +**See**: [pins.add](https://api.slack.com/methods/pins.add) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to pin the item in. | +| [opts] | Object | | +| opts.file | ? | File to pin. | +| opts.file_comment | ? | File comment to pin. | +| opts.timestamp | ? | Timestamp of the message to pin. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### pinsFacet.list(channel, [optCb]) +Lists items pinned to a channel. + +**Kind**: instance method of [PinsFacet](#PinsFacet) +**See**: [pins.list](https://api.slack.com/methods/pins.list) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel to get pinned items for. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### pinsFacet.remove(channel, [opts], [optCb]) +Un-pins an item from a channel. + +**Kind**: instance method of [PinsFacet](#PinsFacet) +**See**: [pins.remove](https://api.slack.com/methods/pins.remove) + +| Param | Type | Description | +| --- | --- | --- | +| channel | ? | Channel where the item is pinned to. | +| [opts] | Object | | +| opts.file | ? | File to un-pin. | +| opts.file_comment | ? | File comment to un-pin. | +| opts.timestamp | ? | Timestamp of the message to un-pin. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/PresenceFacet.md b/docs/_reference/PresenceFacet.md new file mode 100644 index 000000000..e8dc5a808 --- /dev/null +++ b/docs/_reference/PresenceFacet.md @@ -0,0 +1,19 @@ +--- +layout: page +title: PresenceFacet +permalink: /reference/PresenceFacet +--- +**Kind**: global class + + +### presenceFacet.set(presence, [optCb]) +Manually set user presence + +**Kind**: instance method of [PresenceFacet](#PresenceFacet) +**See**: [presence.set](https://api.slack.com/methods/presence.set) + +| Param | Type | Description | +| --- | --- | --- | +| presence | ? | Either `active` or `away` | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/ReactionsFacet.md b/docs/_reference/ReactionsFacet.md new file mode 100644 index 000000000..1f0b2cba0 --- /dev/null +++ b/docs/_reference/ReactionsFacet.md @@ -0,0 +1,82 @@ +--- +layout: page +title: ReactionsFacet +permalink: /reference/ReactionsFacet +--- +**Kind**: global class + +* [ReactionsFacet](#ReactionsFacet) + * [.add(name, [opts], [optCb])](#ReactionsFacet+add) + * [.get([opts], [optCb])](#ReactionsFacet+get) + * [.list([opts], [optCb])](#ReactionsFacet+list) + * [.remove(name, [opts], [optCb])](#ReactionsFacet+remove) + + + +### reactionsFacet.add(name, [opts], [optCb]) +Adds a reaction to an item. + +**Kind**: instance method of [ReactionsFacet](#ReactionsFacet) +**See**: [reactions.add](https://api.slack.com/methods/reactions.add) + +| Param | Type | Description | +| --- | --- | --- | +| name | ? | Reaction (emoji) name. | +| [opts] | Object | | +| opts.file | ? | File to add reaction to. | +| opts.file_comment | ? | File comment to add reaction to. | +| opts.channel | ? | Channel where the message to add reaction to was posted. | +| opts.timestamp | ? | Timestamp of the message to add reaction to. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### reactionsFacet.get([opts], [optCb]) +Gets reactions for an item. + +**Kind**: instance method of [ReactionsFacet](#ReactionsFacet) +**See**: [reactions.get](https://api.slack.com/methods/reactions.get) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.file | ? | File to get reactions for. | +| opts.file_comment | ? | File comment to get reactions for. | +| opts.channel | ? | Channel where the message to get reactions for was posted. | +| opts.timestamp | ? | Timestamp of the message to get reactions for. | +| opts.full | ? | If true always return the complete reaction list. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### reactionsFacet.list([opts], [optCb]) +Lists reactions made by a user. + +**Kind**: instance method of [ReactionsFacet](#ReactionsFacet) +**See**: [reactions.list](https://api.slack.com/methods/reactions.list) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.user | ? | Show reactions made by this user. Defaults to the authed user. | +| opts.full | ? | If true always return the complete reaction list. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### reactionsFacet.remove(name, [opts], [optCb]) +Removes a reaction from an item. + +**Kind**: instance method of [ReactionsFacet](#ReactionsFacet) +**See**: [reactions.remove](https://api.slack.com/methods/reactions.remove) + +| Param | Type | Description | +| --- | --- | --- | +| name | ? | Reaction (emoji) name. | +| [opts] | Object | | +| opts.file | ? | File to remove reaction from. | +| opts.file_comment | ? | File comment to remove reaction from. | +| opts.channel | ? | Channel where the message to remove reaction from was posted. | +| opts.timestamp | ? | Timestamp of the message to remove reaction from. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/RemindersFacet.md b/docs/_reference/RemindersFacet.md new file mode 100644 index 000000000..1353e84e5 --- /dev/null +++ b/docs/_reference/RemindersFacet.md @@ -0,0 +1,81 @@ +--- +layout: page +title: RemindersFacet +permalink: /reference/RemindersFacet +--- +**Kind**: global class + +* [RemindersFacet](#RemindersFacet) + * [.add(text, time, [opts], [optCb])](#RemindersFacet+add) + * [.complete(reminder, [optCb])](#RemindersFacet+complete) + * [.delete(reminder, [optCb])](#RemindersFacet+delete) + * [.info(reminder, [optCb])](#RemindersFacet+info) + * [.list([optCb])](#RemindersFacet+list) + + + +### remindersFacet.add(text, time, [opts], [optCb]) +Creates a reminder. + +**Kind**: instance method of [RemindersFacet](#RemindersFacet) +**See**: [reminders.add](https://api.slack.com/methods/reminders.add) + +| Param | Type | Description | +| --- | --- | --- | +| text | ? | The content of the reminder | +| time | ? | When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday") | +| [opts] | Object | | +| opts.user | ? | The user who will receive the reminder. If no user is specified, the reminder will go to user who created it. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### remindersFacet.complete(reminder, [optCb]) +Marks a reminder as complete. + +**Kind**: instance method of [RemindersFacet](#RemindersFacet) +**See**: [reminders.complete](https://api.slack.com/methods/reminders.complete) + +| Param | Type | Description | +| --- | --- | --- | +| reminder | ? | The ID of the reminder to be marked as complete | +| [optCb] | function | Optional callback, if not using promises. | + + + +### remindersFacet.delete(reminder, [optCb]) +Deletes a reminder. + +**Kind**: instance method of [RemindersFacet](#RemindersFacet) +**See**: [reminders.delete](https://api.slack.com/methods/reminders.delete) + +| Param | Type | Description | +| --- | --- | --- | +| reminder | ? | The ID of the reminder | +| [optCb] | function | Optional callback, if not using promises. | + + + +### remindersFacet.info(reminder, [optCb]) +Gets information about a reminder. + +**Kind**: instance method of [RemindersFacet](#RemindersFacet) +**See**: [reminders.info](https://api.slack.com/methods/reminders.info) + +| Param | Type | Description | +| --- | --- | --- | +| reminder | ? | The ID of the reminder | +| [optCb] | function | Optional callback, if not using promises. | + + + +### remindersFacet.list([optCb]) +Lists all reminders created by or for a given user. + +**Kind**: instance method of [RemindersFacet](#RemindersFacet) +**See**: [reminders.list](https://api.slack.com/methods/reminders.list) + +| Param | Type | Description | +| --- | --- | --- | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/RtmFacet.md b/docs/_reference/RtmFacet.md new file mode 100644 index 000000000..a20057361 --- /dev/null +++ b/docs/_reference/RtmFacet.md @@ -0,0 +1,44 @@ +--- +layout: page +title: RtmFacet +permalink: /reference/RtmFacet +--- +**Kind**: global class + +* [RtmFacet](#RtmFacet) + * [.start(opts, optCb)](#RtmFacet+start) + * [.connect(opts, optCb)](#RtmFacet+connect) + + + +### rtmFacet.start(opts, optCb) +Starts a Real Time Messaging session. + +**Kind**: instance method of [RtmFacet](#RtmFacet) +**See**: [rtm.start](https://api.slack.com/methods/rtm.start) + +| Param | Type | Description | +| --- | --- | --- | +| opts | Object | | +| opts.simple_latest | Boolean | Return timestamp only for latest message object of each channel (improves performance). | +| opts.no_unreads | Boolean | Skip unread counts for each channel (improves performance). | +| opts.mpim_aware | Boolean | Returns MPIMs to the client in the API response. | +| opts.presence_sub | Boolean | Support presence subscriptions on this socket connection. | +| opts.include_locale | Boolean | Set this to `true` to receive the locale for users and channels. Defaults to `false` | +| optCb | function | Optional callback, if not using promises. | + + + +### rtmFacet.connect(opts, optCb) +Starts a Real Time Messaging session using the lighter-weight rtm.connect. +This will give us a WebSocket URL without the payload of `rtm.start`. + +**Kind**: instance method of [RtmFacet](#RtmFacet) +**See**: [rtm.connect](https://api.slack.com/methods/rtm.connect) + +| Param | Type | Description | +| --- | --- | --- | +| opts | Object | | +| opts.presence_sub | Boolean | Support presence subscriptions on this socket connection. | +| optCb | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/SearchFacet.md b/docs/_reference/SearchFacet.md new file mode 100644 index 000000000..4ea024072 --- /dev/null +++ b/docs/_reference/SearchFacet.md @@ -0,0 +1,63 @@ +--- +layout: page +title: SearchFacet +permalink: /reference/SearchFacet +--- +**Kind**: global class + +* [SearchFacet](#SearchFacet) + * [.all(query, [opts], [optCb])](#SearchFacet+all) + * [.files(query, [opts], [optCb])](#SearchFacet+files) + * [.messages(query, [opts], [optCb])](#SearchFacet+messages) + + + +### searchFacet.all(query, [opts], [optCb]) +Searches for messages and files matching a query. + +**Kind**: instance method of [SearchFacet](#SearchFacet) +**See**: [search.all](https://api.slack.com/methods/search.all) + +| Param | Type | Description | +| --- | --- | --- | +| query | ? | Search query. May contains booleans, etc. | +| [opts] | Object | | +| opts.sort | ? | Return matches sorted by either `score` or `timestamp`. | +| opts.sort_dir | ? | Change sort direction to ascending (`asc`) or descending (`desc`). | +| opts.highlight | ? | Pass a value of `1` to enable query highlight markers (see below). | +| [optCb] | function | Optional callback, if not using promises. | + + + +### searchFacet.files(query, [opts], [optCb]) +Searches for files matching a query. + +**Kind**: instance method of [SearchFacet](#SearchFacet) +**See**: [search.files](https://api.slack.com/methods/search.files) + +| Param | Type | Description | +| --- | --- | --- | +| query | ? | Search query. May contain booleans, etc. | +| [opts] | Object | | +| opts.sort | ? | Return matches sorted by either `score` or `timestamp`. | +| opts.sort_dir | ? | Change sort direction to ascending (`asc`) or descending (`desc`). | +| opts.highlight | ? | Pass a value of `1` to enable query highlight markers (see below). | +| [optCb] | function | Optional callback, if not using promises. | + + + +### searchFacet.messages(query, [opts], [optCb]) +Searches for messages matching a query. + +**Kind**: instance method of [SearchFacet](#SearchFacet) +**See**: [search.messages](https://api.slack.com/methods/search.messages) + +| Param | Type | Description | +| --- | --- | --- | +| query | ? | Search query. May contains booleans, etc. | +| [opts] | Object | | +| opts.sort | ? | Return matches sorted by either `score` or `timestamp`. | +| opts.sort_dir | ? | Change sort direction to ascending (`asc`) or descending (`desc`). | +| opts.highlight | ? | Pass a value of `1` to enable query highlight markers (see below). | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/StarsFacet.md b/docs/_reference/StarsFacet.md new file mode 100644 index 000000000..bebb95dc8 --- /dev/null +++ b/docs/_reference/StarsFacet.md @@ -0,0 +1,59 @@ +--- +layout: page +title: StarsFacet +permalink: /reference/StarsFacet +--- +**Kind**: global class + +* [StarsFacet](#StarsFacet) + * [.add([opts], [optCb])](#StarsFacet+add) + * [.list([opts], [optCb])](#StarsFacet+list) + * [.remove([opts], [optCb])](#StarsFacet+remove) + + + +### starsFacet.add([opts], [optCb]) +Adds a star to an item. + +**Kind**: instance method of [StarsFacet](#StarsFacet) +**See**: [stars.add](https://api.slack.com/methods/stars.add) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.file | ? | File to add star to. | +| opts.file_comment | ? | File comment to add star to. | +| opts.channel | ? | Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`). | +| opts.timestamp | ? | Timestamp of the message to add star to. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### starsFacet.list([opts], [optCb]) +Lists stars for a user. + +**Kind**: instance method of [StarsFacet](#StarsFacet) +**See**: [stars.list](https://api.slack.com/methods/stars.list) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| [optCb] | function | Optional callback, if not using promises. | + + + +### starsFacet.remove([opts], [optCb]) +Removes a star from an item. + +**Kind**: instance method of [StarsFacet](#StarsFacet) +**See**: [stars.remove](https://api.slack.com/methods/stars.remove) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.file | ? | File to remove star from. | +| opts.file_comment | ? | File comment to remove star from. | +| opts.channel | ? | Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`). | +| opts.timestamp | ? | Timestamp of the message to remove star from. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/TeamFacet.md b/docs/_reference/TeamFacet.md new file mode 100644 index 000000000..814c7d1f2 --- /dev/null +++ b/docs/_reference/TeamFacet.md @@ -0,0 +1,69 @@ +--- +layout: page +title: TeamFacet +permalink: /reference/TeamFacet +--- +**Kind**: global class + +* [TeamFacet](#TeamFacet) + * [.accessLogs([opts], [optCb])](#TeamFacet+accessLogs) + * [.billableInfo([opts], [optCb])](#TeamFacet+billableInfo) + * [.info([optCb])](#TeamFacet+info) + * [.integrationLogs([opts], [optCb])](#TeamFacet+integrationLogs) + + + +### teamFacet.accessLogs([opts], [optCb]) +Gets the access logs for the current team. + +**Kind**: instance method of [TeamFacet](#TeamFacet) +**See**: [team.accessLogs](https://api.slack.com/methods/team.accessLogs) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| [optCb] | function | Optional callback, if not using promises. | + + + +### teamFacet.billableInfo([opts], [optCb]) +Gets billable users information for the current team. + +**Kind**: instance method of [TeamFacet](#TeamFacet) +**See**: [team.billableInfo](https://api.slack.com/methods/team.billableInfo) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.user | ? | A user to retrieve the billable information for. Defaults to all users. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### teamFacet.info([optCb]) +Gets information about the current team. + +**Kind**: instance method of [TeamFacet](#TeamFacet) +**See**: [team.info](https://api.slack.com/methods/team.info) + +| Param | Type | Description | +| --- | --- | --- | +| [optCb] | function | Optional callback, if not using promises. | + + + +### teamFacet.integrationLogs([opts], [optCb]) +Gets the integration logs for the current team. + +**Kind**: instance method of [TeamFacet](#TeamFacet) +**See**: [team.integrationLogs](https://api.slack.com/methods/team.integrationLogs) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.service_id | ? | Filter logs to this service. Defaults to all logs. | +| opts.app_id | ? | Filter logs to this Slack app. Defaults to all logs. | +| opts.user | ? | Filter logs generated by this user’s actions. Defaults to all logs. | +| opts.change_type | ? | Filter logs with this change type. Defaults to all logs. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/UsergroupsFacet.md b/docs/_reference/UsergroupsFacet.md new file mode 100644 index 000000000..11df0b064 --- /dev/null +++ b/docs/_reference/UsergroupsFacet.md @@ -0,0 +1,97 @@ +--- +layout: page +title: UsergroupsFacet +permalink: /reference/UsergroupsFacet +--- +**Kind**: global class + +* [UsergroupsFacet](#UsergroupsFacet) + * [.create(name, [opts], [optCb])](#UsergroupsFacet+create) + * [.disable(usergroup, [opts], [optCb])](#UsergroupsFacet+disable) + * [.enable(usergroup, [opts], [optCb])](#UsergroupsFacet+enable) + * [.list([opts], [optCb])](#UsergroupsFacet+list) + * [.update(usergroup, [opts], [optCb])](#UsergroupsFacet+update) + + + +### usergroupsFacet.create(name, [opts], [optCb]) +Create a User Group + +**Kind**: instance method of [UsergroupsFacet](#UsergroupsFacet) +**See**: [usergroups.create](https://api.slack.com/methods/usergroups.create) + +| Param | Type | Description | +| --- | --- | --- | +| name | ? | A name for the User Group. Must be unique among User Groups. | +| [opts] | Object | | +| opts.handle | ? | A mention handle. Must be unique among channels, users and User Groups. | +| opts.description | ? | A short description of the User Group. | +| opts.channels | ? | A comma separated string of encoded channel IDs for which the User Group uses as a default. | +| opts.include_count | ? | Include the number of users in each User Group. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usergroupsFacet.disable(usergroup, [opts], [optCb]) +Disable an existing User Group + +**Kind**: instance method of [UsergroupsFacet](#UsergroupsFacet) +**See**: [usergroups.disable](https://api.slack.com/methods/usergroups.disable) + +| Param | Type | Description | +| --- | --- | --- | +| usergroup | ? | The encoded ID of the User Group to disable. | +| [opts] | Object | | +| opts.include_count | ? | Include the number of users in the User Group. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usergroupsFacet.enable(usergroup, [opts], [optCb]) +Enable a User Group + +**Kind**: instance method of [UsergroupsFacet](#UsergroupsFacet) +**See**: [usergroups.enable](https://api.slack.com/methods/usergroups.enable) + +| Param | Type | Description | +| --- | --- | --- | +| usergroup | ? | The encoded ID of the User Group to enable. | +| [opts] | Object | | +| opts.include_count | ? | Include the number of users in the User Group. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usergroupsFacet.list([opts], [optCb]) +List all User Groups for a team + +**Kind**: instance method of [UsergroupsFacet](#UsergroupsFacet) +**See**: [usergroups.list](https://api.slack.com/methods/usergroups.list) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.include_disabled | ? | Include disabled User Groups. | +| opts.include_count | ? | Include the number of users in each User Group. | +| opts.include_users | ? | Include the list of users for each User Group. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usergroupsFacet.update(usergroup, [opts], [optCb]) +Update an existing User Group + +**Kind**: instance method of [UsergroupsFacet](#UsergroupsFacet) +**See**: [usergroups.update](https://api.slack.com/methods/usergroups.update) + +| Param | Type | Description | +| --- | --- | --- | +| usergroup | ? | The encoded ID of the User Group to update. | +| [opts] | Object | | +| opts.name | ? | A name for the User Group. Must be unique among User Groups. | +| opts.handle | ? | A mention handle. Must be unique among channels, users and User Groups. | +| opts.description | ? | A short description of the User Group. | +| opts.channels | ? | A comma separated string of encoded channel IDs for which the User Group uses as a default. | +| opts.include_count | ? | Include the number of users in the User Group. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/UsergroupsUsersFacet.md b/docs/_reference/UsergroupsUsersFacet.md new file mode 100644 index 000000000..0e55e7221 --- /dev/null +++ b/docs/_reference/UsergroupsUsersFacet.md @@ -0,0 +1,42 @@ +--- +layout: page +title: UsergroupsUsersFacet +permalink: /reference/UsergroupsUsersFacet +--- +**Kind**: global class + +* [UsergroupsUsersFacet](#UsergroupsUsersFacet) + * [.list(usergroup, [opts], [optCb])](#UsergroupsUsersFacet+list) + * [.update(usergroup, users, [opts], [optCb])](#UsergroupsUsersFacet+update) + + + +### usergroupsUsersFacet.list(usergroup, [opts], [optCb]) +List all users in a User Group + +**Kind**: instance method of [UsergroupsUsersFacet](#UsergroupsUsersFacet) +**See**: [usergroups.users.list](https://api.slack.com/methods/usergroups.users.list) + +| Param | Type | Description | +| --- | --- | --- | +| usergroup | ? | The encoded ID of the User Group to update. | +| [opts] | Object | | +| opts.include_disabled | ? | Allow results that involve disabled User Groups. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usergroupsUsersFacet.update(usergroup, users, [opts], [optCb]) +Update the list of users for a User Group + +**Kind**: instance method of [UsergroupsUsersFacet](#UsergroupsUsersFacet) +**See**: [usergroups.users.update](https://api.slack.com/methods/usergroups.users.update) + +| Param | Type | Description | +| --- | --- | --- | +| usergroup | ? | The encoded ID of the User Group to update. | +| users | ? | A comma separated string of encoded user IDs that represent the entire list of users for the User Group. | +| [opts] | Object | | +| opts.include_count | ? | Include the number of users in the User Group. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/UsersFacet.md b/docs/_reference/UsersFacet.md new file mode 100644 index 000000000..ed675aaa6 --- /dev/null +++ b/docs/_reference/UsersFacet.md @@ -0,0 +1,95 @@ +--- +layout: page +title: UsersFacet +permalink: /reference/UsersFacet +--- +**Kind**: global class + +* [UsersFacet](#UsersFacet) + * [.getPresence(user, [optCb])](#UsersFacet+getPresence) + * [.identity([options], [optCb])](#UsersFacet+identity) + * [.info(user, [optCb])](#UsersFacet+info) + * [.list([opts], [optCb])](#UsersFacet+list) + * [.setActive([optCb])](#UsersFacet+setActive) + * [.setPresence(presence, [optCb])](#UsersFacet+setPresence) + + + +### usersFacet.getPresence(user, [optCb]) +Gets user presence information. + +**Kind**: instance method of [UsersFacet](#UsersFacet) +**See**: [users.getPresence](https://api.slack.com/methods/users.getPresence) + +| Param | Type | Description | +| --- | --- | --- | +| user | ? | User to get presence info on. Defaults to the authed user. | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usersFacet.identity([options], [optCb]) +Get a user's identity. + +**Kind**: instance method of [UsersFacet](#UsersFacet) +**See**: [users.identity](https://api.slack.com/methods/users.identity) + +| Param | Type | Description | +| --- | --- | --- | +| [options] | Object | | +| opts.user | ? | When calling this method with a workspace token, set this to the user ID of the user to retrieve the identity of | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usersFacet.info(user, [optCb]) +Gets information about a user. + +**Kind**: instance method of [UsersFacet](#UsersFacet) +**See**: [users.info](https://api.slack.com/methods/users.info) + +| Param | Type | Description | +| --- | --- | --- | +| user | ? | User to get info on | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usersFacet.list([opts], [optCb]) +Lists all users in a Slack team. + +**Kind**: instance method of [UsersFacet](#UsersFacet) +**See**: [users.list](https://api.slack.com/methods/users.list) + +| Param | Type | Description | +| --- | --- | --- | +| [opts] | Object | | +| opts.presence | ? | Whether to include presence data in the output | +| opts.include_locale | ? | Set this to `true` to receive the locale for users. Defaults to `false` | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usersFacet.setActive([optCb]) +Marks a user as active. + +**Kind**: instance method of [UsersFacet](#UsersFacet) +**See**: [users.setActive](https://api.slack.com/methods/users.setActive) + +| Param | Type | Description | +| --- | --- | --- | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usersFacet.setPresence(presence, [optCb]) +Manually sets user presence. + +**Kind**: instance method of [UsersFacet](#UsersFacet) +**See**: [users.setPresence](https://api.slack.com/methods/users.setPresence) + +| Param | Type | Description | +| --- | --- | --- | +| presence | ? | Either `auto` or `away` | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/UsersProfileFacet.md b/docs/_reference/UsersProfileFacet.md new file mode 100644 index 000000000..932fd06ed --- /dev/null +++ b/docs/_reference/UsersProfileFacet.md @@ -0,0 +1,41 @@ +--- +layout: page +title: UsersProfileFacet +permalink: /reference/UsersProfileFacet +--- +**Kind**: global class + +* [UsersProfileFacet](#UsersProfileFacet) + * [.get(user, include_labels, [optCb])](#UsersProfileFacet+get) + * [.set(user, profile, name, value, [optCb])](#UsersProfileFacet+set) + + + +### usersProfileFacet.get(user, include_labels, [optCb]) +This method is used to get the profile information for a user. + +**Kind**: instance method of [UsersProfileFacet](#UsersProfileFacet) +**See**: [users.profile.get](https://api.slack.com/methods/users.profile.get) + +| Param | Type | Description | +| --- | --- | --- | +| user | ? | User to retrieve profile info for | +| include_labels | ? | Include labels for each ID in custom profile fields | +| [optCb] | function | Optional callback, if not using promises. | + + + +### usersProfileFacet.set(user, profile, name, value, [optCb]) +This method is used to set the profile information for a user. + +**Kind**: instance method of [UsersProfileFacet](#UsersProfileFacet) +**See**: [users.profile.set](https://api.slack.com/methods/users.profile.set) + +| Param | Type | Description | +| --- | --- | --- | +| user | ? | ID of user to change. This argument may only be specified by team admins on paid teams. | +| profile | ? | Collection of key:value pairs presented as a URL-encoded JSON hash. | +| name | ? | Name of a single key to set. Usable only if profile is not passed. | +| value | ? | Value to set a single key to. Usable only if profile is not passed. | +| [optCb] | function | Optional callback, if not using promises. | + diff --git a/docs/_reference/WebAPIClient.md b/docs/_reference/WebAPIClient.md index 858e05831..2b306b3ca 100644 --- a/docs/_reference/WebAPIClient.md +++ b/docs/_reference/WebAPIClient.md @@ -7,6 +7,33 @@ permalink: /reference/WebAPIClient * [WebAPIClient](#WebAPIClient) * [new WebAPIClient(token, [opts])](#new_WebAPIClient_new) + * [.api](#WebAPIClient+api) : [ApiFacet](#ApiFacet) + * [.auth](#WebAPIClient+auth) : [AuthFacet](#AuthFacet) + * [.bots](#WebAPIClient+bots) : [BotsFacet](#BotsFacet) + * [.channels](#WebAPIClient+channels) : [ChannelsFacet](#ChannelsFacet) + * [.chat](#WebAPIClient+chat) : [ChatFacet](#ChatFacet) + * [.conversations](#WebAPIClient+conversations) : [ConversationsFacet](#ConversationsFacet) + * [.dialog](#WebAPIClient+dialog) : [DialogFacet](#DialogFacet) + * [.dnd](#WebAPIClient+dnd) : [DndFacet](#DndFacet) + * [.emoji](#WebAPIClient+emoji) : [EmojiFacet](#EmojiFacet) + * [.files](#WebAPIClient+files) : [FilesFacet](#FilesFacet) + * [.comments](#WebAPIClient+files.comments) : [FilesCommentsFacet](#FilesCommentsFacet) + * [.groups](#WebAPIClient+groups) : [GroupsFacet](#GroupsFacet) + * [.im](#WebAPIClient+im) : [ImFacet](#ImFacet) + * [.mpim](#WebAPIClient+mpim) : [MpimFacet](#MpimFacet) + * [.oauth](#WebAPIClient+oauth) : [OauthFacet](#OauthFacet) + * [.pins](#WebAPIClient+pins) : [PinsFacet](#PinsFacet) + * [.presence](#WebAPIClient+presence) : [PresenceFacet](#PresenceFacet) + * [.reactions](#WebAPIClient+reactions) : [ReactionsFacet](#ReactionsFacet) + * [.reminders](#WebAPIClient+reminders) : [RemindersFacet](#RemindersFacet) + * [.rtm](#WebAPIClient+rtm) : [RtmFacet](#RtmFacet) + * [.search](#WebAPIClient+search) : [SearchFacet](#SearchFacet) + * [.stars](#WebAPIClient+stars) : [StarsFacet](#StarsFacet) + * [.team](#WebAPIClient+team) : [TeamFacet](#TeamFacet) + * [.usergroups](#WebAPIClient+usergroups) : [UsergroupsFacet](#UsergroupsFacet) + * [.users](#WebAPIClient+usergroups.users) : [UsergroupsUsersFacet](#UsergroupsUsersFacet) + * [.users](#WebAPIClient+users) : [UsersFacet](#UsersFacet) + * [.profiles](#WebAPIClient+users.profiles) : UsersProfilesFacet * [._createFacets()](#WebAPIClient+_createFacets) @@ -21,6 +48,141 @@ Slack Web API client. | [opts] | Object | | | [opts.retryConfig] | Object | The configuration to use for the retry operation, see [node-retry](https://github.com/tim-kos/node-retry) for more details. | + + +### webAPIClient.api : [ApiFacet](#ApiFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [ApiFacet](/node-slack-sdk/reference/ApiFacet) + + +### webAPIClient.auth : [AuthFacet](#AuthFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [AuthFacet](/node-slack-sdk/reference/AuthFacet) + + +### webAPIClient.bots : [BotsFacet](#BotsFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [BotsFacet](/node-slack-sdk/reference/BotsFacet) + + +### webAPIClient.channels : [ChannelsFacet](#ChannelsFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [ChannelsFacet](/node-slack-sdk/reference/ChannelsFacet) + + +### webAPIClient.chat : [ChatFacet](#ChatFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [ChatFacet](/node-slack-sdk/reference/ChatFacet) + + +### webAPIClient.conversations : [ConversationsFacet](#ConversationsFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [ConversationsFacet](/node-slack-sdk/reference/ConversationsFacet) + + +### webAPIClient.dialog : [DialogFacet](#DialogFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [DialogFacet](/node-slack-sdk/reference/DialogFacet) + + +### webAPIClient.dnd : [DndFacet](#DndFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [DndFacet](/node-slack-sdk/reference/DndFacet) + + +### webAPIClient.emoji : [EmojiFacet](#EmojiFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [EmojiFacet](/node-slack-sdk/reference/EmojiFacet) + + +### webAPIClient.files : [FilesFacet](#FilesFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [FilesFacet](/node-slack-sdk/reference/FilesFacet) + + +#### files.comments : [FilesCommentsFacet](#FilesCommentsFacet) +**Kind**: static property of [files](#WebAPIClient+files) +**See**: [FilesCommentsFacet](/node-slack-sdk/reference/FilesCommentsFacet) + + +### webAPIClient.groups : [GroupsFacet](#GroupsFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [GroupsFacet](/node-slack-sdk/reference/GroupsFacet) + + +### webAPIClient.im : [ImFacet](#ImFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [ImFacet](/node-slack-sdk/reference/ImFacet) + + +### webAPIClient.mpim : [MpimFacet](#MpimFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [MpimFacet](/node-slack-sdk/reference/MpimFacet) + + +### webAPIClient.oauth : [OauthFacet](#OauthFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [OauthFacet](/node-slack-sdk/reference/OauthFacet) + + +### webAPIClient.pins : [PinsFacet](#PinsFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [PinsFacet](/node-slack-sdk/reference/PinsFacet) + + +### webAPIClient.presence : [PresenceFacet](#PresenceFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [PresenceFacet](/node-slack-sdk/reference/PresenceFacet) + + +### webAPIClient.reactions : [ReactionsFacet](#ReactionsFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [ReactionsFacet](/node-slack-sdk/reference/ReactionsFacet) + + +### webAPIClient.reminders : [RemindersFacet](#RemindersFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [RemindersFacet](/node-slack-sdk/reference/RemindersFacet) + + +### webAPIClient.rtm : [RtmFacet](#RtmFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [RtmFacet](/node-slack-sdk/reference/RtmFacet) + + +### webAPIClient.search : [SearchFacet](#SearchFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [SearchFacet](/node-slack-sdk/reference/SearchFacet) + + +### webAPIClient.stars : [StarsFacet](#StarsFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [StarsFacet](/node-slack-sdk/reference/StarsFacet) + + +### webAPIClient.team : [TeamFacet](#TeamFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [TeamFacet](/node-slack-sdk/reference/TeamFacet) + + +### webAPIClient.usergroups : [UsergroupsFacet](#UsergroupsFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [UsergroupsFacet](/node-slack-sdk/reference/UsergroupsFacet) + + +#### usergroups.users : [UsergroupsUsersFacet](#UsergroupsUsersFacet) +**Kind**: static property of [usergroups](#WebAPIClient+usergroups) +**See**: [UsergroupsUsersFacet](/node-slack-sdk/reference/UsergroupsUsersFacet) + + +### webAPIClient.users : [UsersFacet](#UsersFacet) +**Kind**: instance property of [WebAPIClient](#WebAPIClient) +**See**: [UsersFacet](/node-slack-sdk/reference/UsersFacet) + + +#### users.profiles : UsersProfilesFacet +**Kind**: static property of [users](#WebAPIClient+users) +**See**: [UsersProfilesFacet](/node-slack-sdk/reference/UsersProfilesFacet) ### webAPIClient._createFacets() diff --git a/lib/clients/web/client.js b/lib/clients/web/client.js index fc7c7be7d..14f876bed 100644 --- a/lib/clients/web/client.js +++ b/lib/clients/web/client.js @@ -27,6 +27,167 @@ function WebAPIClient(token, opts) { inherits(WebAPIClient, BaseAPIClient); +/** + * @name WebAPIClient#api + * @type {ApiFacet} + * @see {@link /node-slack-sdk/reference/ApiFacet|ApiFacet} + */ + + /** + * @name WebAPIClient#auth + * @type {AuthFacet} + * @see {@link /node-slack-sdk/reference/AuthFacet|AuthFacet} + */ + + /** + * @name WebAPIClient#bots + * @type {BotsFacet} + * @see {@link /node-slack-sdk/reference/BotsFacet|BotsFacet} + */ + + /** + * @name WebAPIClient#channels + * @type {ChannelsFacet} + * @see {@link /node-slack-sdk/reference/ChannelsFacet|ChannelsFacet} + */ + + /** + * @name WebAPIClient#chat + * @type {ChatFacet} + * @see {@link /node-slack-sdk/reference/ChatFacet|ChatFacet} + */ + + /** + * @name WebAPIClient#conversations + * @type {ConversationsFacet} + * @see {@link /node-slack-sdk/reference/ConversationsFacet|ConversationsFacet} + */ + + /** + * @name WebAPIClient#dialog + * @type {DialogFacet} + * @see {@link /node-slack-sdk/reference/DialogFacet|DialogFacet} + */ + + /** + * @name WebAPIClient#dnd + * @type {DndFacet} + * @see {@link /node-slack-sdk/reference/DndFacet|DndFacet} + */ + + /** + * @name WebAPIClient#emoji + * @type {EmojiFacet} + * @see {@link /node-slack-sdk/reference/EmojiFacet|EmojiFacet} + */ + + /** + * @name WebAPIClient#files.comments + * @type {FilesCommentsFacet} + * @see {@link /node-slack-sdk/reference/FilesCommentsFacet|FilesCommentsFacet} + */ + + /** + * @name WebAPIClient#files + * @type {FilesFacet} + * @see {@link /node-slack-sdk/reference/FilesFacet|FilesFacet} + */ + + /** + * @name WebAPIClient#groups + * @type {GroupsFacet} + * @see {@link /node-slack-sdk/reference/GroupsFacet|GroupsFacet} + */ + + /** + * @name WebAPIClient#im + * @type {ImFacet} + * @see {@link /node-slack-sdk/reference/ImFacet|ImFacet} + */ + + /** + * @name WebAPIClient#mpim + * @type {MpimFacet} + * @see {@link /node-slack-sdk/reference/MpimFacet|MpimFacet} + */ + + /** + * @name WebAPIClient#oauth + * @type {OauthFacet} + * @see {@link /node-slack-sdk/reference/OauthFacet|OauthFacet} + */ + + /** + * @name WebAPIClient#pins + * @type {PinsFacet} + * @see {@link /node-slack-sdk/reference/PinsFacet|PinsFacet} + */ + + /** + * @name WebAPIClient#presence + * @type {PresenceFacet} + * @see {@link /node-slack-sdk/reference/PresenceFacet|PresenceFacet} + */ + + /** + * @name WebAPIClient#reactions + * @type {ReactionsFacet} + * @see {@link /node-slack-sdk/reference/ReactionsFacet|ReactionsFacet} + */ + + /** + * @name WebAPIClient#reminders + * @type {RemindersFacet} + * @see {@link /node-slack-sdk/reference/RemindersFacet|RemindersFacet} + */ + + /** + * @name WebAPIClient#rtm + * @type {RtmFacet} + * @see {@link /node-slack-sdk/reference/RtmFacet|RtmFacet} + */ + + /** + * @name WebAPIClient#search + * @type {SearchFacet} + * @see {@link /node-slack-sdk/reference/SearchFacet|SearchFacet} + */ + + /** + * @name WebAPIClient#stars + * @type {StarsFacet} + * @see {@link /node-slack-sdk/reference/StarsFacet|StarsFacet} + */ + + /** + * @name WebAPIClient#team + * @type {TeamFacet} + * @see {@link /node-slack-sdk/reference/TeamFacet|TeamFacet} + */ + + /** + * @name WebAPIClient#usergroups + * @type {UsergroupsFacet} + * @see {@link /node-slack-sdk/reference/UsergroupsFacet|UsergroupsFacet} + */ + + /** + * @name WebAPIClient#usergroups.users + * @type {UsergroupsUsersFacet} + * @see {@link /node-slack-sdk/reference/UsergroupsUsersFacet|UsergroupsUsersFacet} + */ + + /** + * @name WebAPIClient#users + * @type {UsersFacet} + * @see {@link /node-slack-sdk/reference/UsersFacet|UsersFacet} + */ + + /** + * @name WebAPIClient#users.profiles + * @type {UsersProfilesFacet} + * @see {@link /node-slack-sdk/reference/UsersProfilesFacet|UsersProfilesFacet} + */ /** @inheritDocs **/ WebAPIClient.prototype._createFacets = function _createFacets() { diff --git a/lib/clients/web/facets/api.js b/lib/clients/web/facets/api.js index 7505c219d..3a5fd446d 100644 --- a/lib/clients/web/facets/api.js +++ b/lib/clients/web/facets/api.js @@ -7,6 +7,9 @@ */ + /** + * @constructor + */ function ApiFacet(makeAPICall) { this.name = 'api'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/auth.js b/lib/clients/web/facets/auth.js index 865136b52..a6bcafd98 100644 --- a/lib/clients/web/facets/auth.js +++ b/lib/clients/web/facets/auth.js @@ -7,7 +7,9 @@ * */ - +/** + * @constructor + */ function AuthFacet(makeAPICall) { this.name = 'auth'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/bots.js b/lib/clients/web/facets/bots.js index 43279fcb1..69a2d5595 100644 --- a/lib/clients/web/facets/bots.js +++ b/lib/clients/web/facets/bots.js @@ -6,7 +6,9 @@ * */ - +/** + * @constructor + */ function BotsFacet(makeAPICall) { this.name = 'bots'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/channels.js b/lib/clients/web/facets/channels.js index cf32aadaa..55046a23e 100644 --- a/lib/clients/web/facets/channels.js +++ b/lib/clients/web/facets/channels.js @@ -20,7 +20,9 @@ * */ - +/** + * @constructor + */ function ChannelsFacet(makeAPICall) { this.name = 'channels'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/chat.js b/lib/clients/web/facets/chat.js index 6f67513a0..ce51506dc 100644 --- a/lib/clients/web/facets/chat.js +++ b/lib/clients/web/facets/chat.js @@ -11,7 +11,9 @@ * */ - +/** + * @constructor + */ function ChatFacet(makeAPICall) { this.name = 'chat'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/conversations.js b/lib/clients/web/facets/conversations.js index 809cde374..52449a617 100644 --- a/lib/clients/web/facets/conversations.js +++ b/lib/clients/web/facets/conversations.js @@ -22,7 +22,9 @@ * */ - +/** + * @constructor + */ function ConversationsFacet(makeAPICall) { this.name = 'conversations'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/dialog.js b/lib/clients/web/facets/dialog.js index c12f352d5..799bdf1c9 100644 --- a/lib/clients/web/facets/dialog.js +++ b/lib/clients/web/facets/dialog.js @@ -6,7 +6,9 @@ * */ - +/** + * @constructor + */ function DialogFacet(makeAPICall) { this.name = 'dialog'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/dnd.js b/lib/clients/web/facets/dnd.js index 70d251130..6b5a804b1 100644 --- a/lib/clients/web/facets/dnd.js +++ b/lib/clients/web/facets/dnd.js @@ -10,7 +10,9 @@ * */ - +/** + * @constructor + */ function DndFacet(makeAPICall) { this.name = 'dnd'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/emoji.js b/lib/clients/web/facets/emoji.js index a4dadf15c..9407c3339 100644 --- a/lib/clients/web/facets/emoji.js +++ b/lib/clients/web/facets/emoji.js @@ -6,7 +6,9 @@ * */ - +/** + * @constructor + */ function EmojiFacet(makeAPICall) { this.name = 'emoji'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/files.comments.js b/lib/clients/web/facets/files.comments.js index 42934ba63..e7d14479b 100644 --- a/lib/clients/web/facets/files.comments.js +++ b/lib/clients/web/facets/files.comments.js @@ -8,7 +8,9 @@ * */ - +/** + * @constructor + */ function FilesCommentsFacet(makeAPICall) { this.name = 'files.comments'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/files.js b/lib/clients/web/facets/files.js index a48e5631f..4236a660f 100644 --- a/lib/clients/web/facets/files.js +++ b/lib/clients/web/facets/files.js @@ -11,7 +11,9 @@ * */ - +/** + * @constructor + */ function FilesFacet(makeAPICall) { this.name = 'files'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/groups.js b/lib/clients/web/facets/groups.js index dbb8ecc88..eb94a9c1a 100644 --- a/lib/clients/web/facets/groups.js +++ b/lib/clients/web/facets/groups.js @@ -22,7 +22,9 @@ * */ - +/** + * @constructor + */ function GroupsFacet(makeAPICall) { this.name = 'groups'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/im.js b/lib/clients/web/facets/im.js index fba07d6a7..b6e72929d 100644 --- a/lib/clients/web/facets/im.js +++ b/lib/clients/web/facets/im.js @@ -11,7 +11,9 @@ * */ - +/** + * @constructor + */ function ImFacet(makeAPICall) { this.name = 'im'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/mpim.js b/lib/clients/web/facets/mpim.js index 3c69a9e85..a8a2e566c 100644 --- a/lib/clients/web/facets/mpim.js +++ b/lib/clients/web/facets/mpim.js @@ -10,7 +10,9 @@ * */ - +/** + * @constructor + */ function MpimFacet(makeAPICall) { this.name = 'mpim'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/oauth.js b/lib/clients/web/facets/oauth.js index 2ab62ee6d..7d76fed31 100644 --- a/lib/clients/web/facets/oauth.js +++ b/lib/clients/web/facets/oauth.js @@ -6,7 +6,9 @@ * */ - +/** + * @constructor + */ function OauthFacet(makeAPICall) { this.name = 'oauth'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/pins.js b/lib/clients/web/facets/pins.js index ed09f2d34..c2c8bad4f 100644 --- a/lib/clients/web/facets/pins.js +++ b/lib/clients/web/facets/pins.js @@ -8,7 +8,9 @@ * */ - +/** + * @constructor + */ function PinsFacet(makeAPICall) { this.name = 'pins'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/presence.js b/lib/clients/web/facets/presence.js index bb101180c..0037b51e1 100644 --- a/lib/clients/web/facets/presence.js +++ b/lib/clients/web/facets/presence.js @@ -6,7 +6,9 @@ * */ - +/** + * @constructor + */ function PresenceFacet(makeAPICall) { this.name = 'presence'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/reactions.js b/lib/clients/web/facets/reactions.js index 7057e841a..54489bcd5 100644 --- a/lib/clients/web/facets/reactions.js +++ b/lib/clients/web/facets/reactions.js @@ -9,7 +9,9 @@ * */ - +/** + * @constructor + */ function ReactionsFacet(makeAPICall) { this.name = 'reactions'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/reminders.js b/lib/clients/web/facets/reminders.js index a6faaf12f..b48b20656 100644 --- a/lib/clients/web/facets/reminders.js +++ b/lib/clients/web/facets/reminders.js @@ -10,7 +10,9 @@ * */ - +/** + * @constructor + */ function RemindersFacet(makeAPICall) { this.name = 'reminders'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/rtm.js b/lib/clients/web/facets/rtm.js index 8c1890adb..b121cf08a 100644 --- a/lib/clients/web/facets/rtm.js +++ b/lib/clients/web/facets/rtm.js @@ -6,7 +6,9 @@ * - connect: {@link https://api.slack.com/methods/rtm.connect|rtm.connect} */ - +/** + * @constructor + */ function RtmFacet(makeAPICall) { this.name = 'rtm'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/search.js b/lib/clients/web/facets/search.js index b0f2220cc..3d3c888a4 100644 --- a/lib/clients/web/facets/search.js +++ b/lib/clients/web/facets/search.js @@ -8,7 +8,9 @@ * */ - +/** + * @constructor + */ function SearchFacet(makeAPICall) { this.name = 'search'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/stars.js b/lib/clients/web/facets/stars.js index 08a05e1c4..cc61bd71b 100644 --- a/lib/clients/web/facets/stars.js +++ b/lib/clients/web/facets/stars.js @@ -8,7 +8,9 @@ * */ - +/** + * @constructor + */ function StarsFacet(makeAPICall) { this.name = 'stars'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/team.js b/lib/clients/web/facets/team.js index 3298b7e0d..61b09909c 100644 --- a/lib/clients/web/facets/team.js +++ b/lib/clients/web/facets/team.js @@ -9,7 +9,9 @@ * */ - +/** + * @constructor + */ function TeamFacet(makeAPICall) { this.name = 'team'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/usergroups.js b/lib/clients/web/facets/usergroups.js index 84c4e5652..1c2c3e179 100644 --- a/lib/clients/web/facets/usergroups.js +++ b/lib/clients/web/facets/usergroups.js @@ -10,7 +10,9 @@ * */ - +/** + * @constructor + */ function UsergroupsFacet(makeAPICall) { this.name = 'usergroups'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/usergroups.users.js b/lib/clients/web/facets/usergroups.users.js index 89938694b..46809ef2d 100644 --- a/lib/clients/web/facets/usergroups.users.js +++ b/lib/clients/web/facets/usergroups.users.js @@ -7,7 +7,9 @@ * */ - +/** + * @constructor + */ function UsergroupsUsersFacet(makeAPICall) { this.name = 'usergroups.users'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/users.js b/lib/clients/web/facets/users.js index ca3c56f8e..d76c4c535 100644 --- a/lib/clients/web/facets/users.js +++ b/lib/clients/web/facets/users.js @@ -13,7 +13,9 @@ var isFunction = require('lodash').isFunction; * */ - +/** + * @constructor + */ function UsersFacet(makeAPICall) { this.name = 'users'; this.makeAPICall = makeAPICall; diff --git a/lib/clients/web/facets/users.profile.js b/lib/clients/web/facets/users.profile.js index 57f1b0a85..ed88687ba 100644 --- a/lib/clients/web/facets/users.profile.js +++ b/lib/clients/web/facets/users.profile.js @@ -7,7 +7,9 @@ * */ - +/** + * @constructor + */ function UsersProfileFacet(makeAPICall) { this.name = 'users.profile'; this.makeAPICall = makeAPICall;