Skip to content

Commit

Permalink
feat: added editMultiple method
Browse files Browse the repository at this point in the history
  • Loading branch information
bhovhannes authored and citizensas committed May 29, 2021
1 parent c3f3794 commit 2467492
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,18 @@ export class Api {
return this.request(objCode + '/' + objID, {updates: updates}, fields, Api.Methods.PUT)
}

/**
* Edit multiple existing objects
* @memberOf Api
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
* @param {Array} updates Array of fields for each object to be edited. See {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
* @param {String|String[]} [fields] Which fields to return. See {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
* @return {Promise} A promise which will resolved with results if everything went ok and rejected otherwise
*/
editMultiple(objCode: string, updates: any[], fields?: TFields) {
return this.request(objCode, {updates: updates}, fields, Api.Methods.PUT)
}

/**
* Executes an action for the given object
* @memberOf Api
Expand Down

0 comments on commit 2467492

Please sign in to comment.