-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from slackhq/update_api_facets
Updates the API facets to latest
- Loading branch information
Showing
6 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* API Facet to make calls to methods in the bots namespace. | ||
* | ||
* This provides functions to call: | ||
* - info: {@link https://api.slack.com/methods/bots.info|bots.info} | ||
* | ||
*/ | ||
|
||
|
||
function BotsFacet(makeAPICall) { | ||
this.name = 'bots'; | ||
this.makeAPICall = makeAPICall; | ||
} | ||
|
||
|
||
/** | ||
* Gets information about a bot user. | ||
* @see {@link https://api.slack.com/methods/bots.info|bots.info} | ||
* | ||
* @param {Object=} opts | ||
* @param {?} opts.bot - Bot user to get info on | ||
* @param {function=} optCb Optional callback, if not using promises. | ||
*/ | ||
BotsFacet.prototype.info = function info(opts, optCb) { | ||
return this.makeAPICall('bots.info', null, opts, optCb); | ||
}; | ||
|
||
|
||
module.exports = BotsFacet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters