Skip to content

Commit

Permalink
Updates the API facets to latest and revs version to 3.5.0
Browse files Browse the repository at this point in the history
* Adds the [team.billableInfo](https://api.slack.com/methods/team.billableInfo) endpoint to the team facet
* Adds the [bots.info](https://api.slack.com/methods/bots.info) endpoint and creates the `bots` facet
* Removes the `user` optional argument from the [stars.list](https://api.slack.com/methods/stars.list) method
  • Loading branch information
l12s committed Jun 15, 2016
1 parent 43500e8 commit d9cb65f
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### v3.5.0 (2016-06-14)

* Adds the [team.billableInfo](https://api.slack.com/methods/team.billableInfo) endpoint to the team facet
* Adds the [bots.info](https://api.slack.com/methods/bots.info) endpoint and creates the `bots` facet
* Removes the `user` optional argument from the [stars.list](https://api.slack.com/methods/stars.list) method

### v3.4.0 (2016-05-31)

* Adds the [chat.meMessage](https://api.slack.com/methods/chat.meMessage) endpoint to the chat facet
Expand Down
29 changes: 29 additions & 0 deletions lib/clients/web/facets/bots.js
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;
1 change: 1 addition & 0 deletions lib/clients/web/facets/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
ApiFacet: require('./api.js'),
AuthFacet: require('./auth.js'),
BotsFacet: require('./bots'),
ChannelsFacet: require('./channels.js'),
ChatFacet: require('./chat.js'),
DndFacet: require('./dnd.js'),
Expand Down
1 change: 0 additions & 1 deletion lib/clients/web/facets/stars.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ StarsFacet.prototype.add = function add(opts, optCb) {
* @see {@link https://api.slack.com/methods/stars.list|stars.list}
*
* @param {Object=} opts
* @param {?} opts.user - Show stars by this user. Defaults to the authed user.
* @param {function=} optCb Optional callback, if not using promises.
Expand Down
14 changes: 14 additions & 0 deletions lib/clients/web/facets/team.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*
* This provides functions to call:
* - accessLogs: {@link https://api.slack.com/methods/team.accessLogs|team.accessLogs}
* - billableInfo: {@link https://api.slack.com/methods/team.billableInfo|team.billableInfo}
* - info: {@link https://api.slack.com/methods/team.info|team.info}
* - integrationLogs: {@link https://api.slack.com/methods/team.integrationLogs|team.integrationLogs}
*
Expand All @@ -29,6 +30,19 @@ TeamFacet.prototype.accessLogs = function accessLogs(opts, optCb) {
};


/**
* Gets billable users information for the current team.
* @see {@link https://api.slack.com/methods/team.billableInfo|team.billableInfo}
*
* @param {Object=} opts
* @param {?} opts.user - A user to retrieve the billable information for. Defaults to all users.
* @param {function=} optCb Optional callback, if not using promises.
*/
TeamFacet.prototype.billableInfo = function billableInfo(opts, optCb) {
return this.makeAPICall('team.billableInfo', null, opts, optCb);
};


/**
* Gets information about the current team.
* @see {@link https://api.slack.com/methods/team.info|team.info}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slack/client",
"version": "3.4.0",
"version": "3.5.0",
"description": "A library for creating a Slack client",
"main": "./index",
"scripts": {
Expand Down

0 comments on commit d9cb65f

Please sign in to comment.