Skip to content

Commit

Permalink
Merge pull request #36 from upwork/v1.3.8
Browse files Browse the repository at this point in the history
v1.3.8
  • Loading branch information
mnovozhylov authored Sep 18, 2020
2 parents 672f929 + 170f4a0 commit 8ae4457
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release History

# 1.3.8
* Send Message to a Batch of Rooms API

# 1.3.7
* Add Room Messages API

Expand Down
17 changes: 16 additions & 1 deletion lib/routers/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports.Messages.prototype.getRoomDetails = function(company, roomId, params, ca
/**
* Get messages from a specific room
*
* @method getRoomDetails
* @method getRoomMessages
* @param company {String} Company ID
* @param roomId {String} Room ID
* @param params {Hash} Parameters
Expand Down Expand Up @@ -157,6 +157,21 @@ exports.Messages.prototype.sendMessageToRoom = function(company, roomId, params,
this.api.client.post('messages/v3/' + company + '/rooms/' + roomId + '/stories', params, callback);
}

/**
* Send a message to a batch of rooms
*
* @method sendMessageToRoom
* @param company {String} Company ID
* @param params {Hash} Parameters
* @param callback {String} Callback function
* @async
*/
exports.Messages.prototype.sendMessageToRooms = function(company, params, callback) {
params = params || {};
debug('running request');
this.api.client.post('messages/v3/' + company + '/stories/batch', params, callback);
}

/**
* Update a room settings
*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "upwork-api",
"description": "Node.JS bindings for Upwork API",
"version": "1.3.7",
"version": "1.3.8",
"author": {
"name": "Maksym Novozhylov",
"email": "mnovozhilov@upwork.com"
Expand Down

0 comments on commit 8ae4457

Please sign in to comment.