Skip to content

Commit

Permalink
add method saveReaction
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyBityukov committed Oct 1, 2018
1 parent e3add75 commit 60259d9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
22 changes: 22 additions & 0 deletions lib/megaplan/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,28 @@ var clientProto = {
},


/**
* Linking task/deal to a deal.
*
* Привязка сделки или задачи к сделке.
*
* [More info]{@link https://dev.megaplan.ru/api/API_deals.html#api-deal-link}
*
* @param {Object} o parameters of request. More info in official documentation. Параметры запроса. Смотрите
* официальную документацию для получения большей информации
* @returns {MegaplanRequest}
*/
save_relation: function (deal_id, related_object_id, related_object_type) {
var o = deal_id;
(o instanceof Object) || (o = {
Id: deal_id,
RelatedObjectId: related_object_id,
RelatedObjectType: related_object_type
});
return this.__request("::relation/saveRelation.api", utils.objectFilter(o));
},


/**
* Send comment to a deal.
*
Expand Down
3 changes: 2 additions & 1 deletion lib/megaplan/dicts.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ module.exports = {
'::department': ':staff/Department',
'::contractor': ':crm/Contractor',
'::deal': ':trade/Deal',
'::program' : ':trade/Program'
'::program' : ':trade/Program',
'::relation' : ':trade/Deal',
},

// megaplan task folders
Expand Down

0 comments on commit 60259d9

Please sign in to comment.