Skip to content

Commit 2467492

Browse files
bhovhannescitizensas
authored andcommitted
feat: added editMultiple method
1 parent c3f3794 commit 2467492

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/Api.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,18 @@ export class Api {
218218
return this.request(objCode + '/' + objID, {updates: updates}, fields, Api.Methods.PUT)
219219
}
220220

221+
/**
222+
* Edit multiple existing objects
223+
* @memberOf Api
224+
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
225+
* @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.
226+
* @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.
227+
* @return {Promise} A promise which will resolved with results if everything went ok and rejected otherwise
228+
*/
229+
editMultiple(objCode: string, updates: any[], fields?: TFields) {
230+
return this.request(objCode, {updates: updates}, fields, Api.Methods.PUT)
231+
}
232+
221233
/**
222234
* Executes an action for the given object
223235
* @memberOf Api

0 commit comments

Comments
 (0)