Skip to content

Commit 4b95f27

Browse files
committed
docs: update workfront url
1 parent 3ecc58b commit 4b95f27

2 files changed

Lines changed: 32 additions & 31 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ Install as a dependency: `npm install --save workfront-api`.
1717
Then `require('workfront-api')` in your code. For example:
1818

1919
```javascript
20-
var Workfront = require('workfront-api'),
21-
util = require('util')
20+
const Workfront = require('workfront-api')
2221

2322
/**
2423
* The console.log statement below will output the following:
2524
* {
26-
* Api: [Function: Api]
25+
* NodeApi: [Function: Api],
26+
* ResponseHandler: { success: [Function: success], failure: [Function: failure] }
2727
* }
2828
*/
29-
console.log(util.inspect(Workfront, {depth: 0}))
29+
console.log(Workfront)
3030
```
3131

3232
## Documentation
@@ -44,6 +44,7 @@ In order to run these examples clone a copy of workfront-api repository:
4444

4545
First enter into `workfront-api` directory and install all the dependencies:
4646

47+
4748
cd workfront-api
4849
npm install
4950

src/Api.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ export class Api {
131131

132132
/**
133133
* Copies an existing object with making changes on a copy.
134-
* Copying is supported only for some objects. The {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer} page displays which objects support the Copy action.
134+
* Copying is supported only for some objects. The {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} page displays which objects support the Copy action.
135135
* @memberOf Api
136-
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
136+
* @param {String} objCode One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}
137137
* @param {String} objID ID of object to copy
138-
* @param {Object} updates Which fields to set on copied object. See {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
139-
* @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.
138+
* @param {Object} updates Which fields to set on copied object. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
139+
* @param {String|String[]} [fields] Which fields to return. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
140140
* @param {String[]} options A list of options that are attached to the copy request (object specific)
141141
* @return {Promise} A promise which will resolved with results if everything went ok and rejected otherwise
142142
*/
@@ -197,9 +197,9 @@ export class Api {
197197
/**
198198
* Creates a new object.
199199
* @memberOf Api
200-
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
201-
* @param {Object} params Values of fields to be set for the new object. See {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
202-
* @param {String|String[]} [fields] Which fields of newly created object 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.
200+
* @param {String} objCode One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}
201+
* @param {Object} params Values of fields to be set for the new object. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
202+
* @param {String|String[]} [fields] Which fields of newly created object to return. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
203203
* @returns {Promise} A promise which will resolved with the ID and any other specified fields of newly created object
204204
*/
205205
create(objCode: string, params: any, fields?: TFields) {
@@ -212,10 +212,10 @@ export class Api {
212212
/**
213213
* Edits an existing object
214214
* @memberOf Api
215-
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
215+
* @param {String} objCode One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}
216216
* @param {String} objID ID of object to modify
217-
* @param {Object} updates Which fields to set. See {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
218-
* @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.
217+
* @param {Object} updates Which fields to set. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
218+
* @param {String|String[]} [fields] Which fields to return. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
219219
* @return {Promise} A promise which will resolved with results if everything went ok and rejected otherwise
220220
*/
221221
edit(objCode: string, objID: string, updates: any, fields?: TFields) {
@@ -228,9 +228,9 @@ export class Api {
228228
/**
229229
* Edit multiple existing objects
230230
* @memberOf Api
231-
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
232-
* @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.
233-
* @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.
231+
* @param {String} objCode One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}
232+
* @param {Array} updates Array of fields for each object to be edited. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
233+
* @param {String|String[]} [fields] Which fields to return. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
234234
* @return {Promise} A promise which will resolved with results if everything went ok and rejected otherwise
235235
*/
236236
editMultiple(objCode: string, updates: any[], fields?: TFields) {
@@ -240,10 +240,10 @@ export class Api {
240240
/**
241241
* Executes an action for the given object
242242
* @memberOf Api
243-
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
243+
* @param {String} objCode One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}
244244
* @param {String|null} objID ID of object. Optional, pass null or undefined to omit
245-
* @param {String} action An action to execute. A list of allowed actions are available within the {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer} under "actions" for each object.
246-
* @param {Object} [actionArgs] Optional. Arguments for the action. See {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer} for the list of valid arguments
245+
* @param {String} action An action to execute. A list of allowed actions are available within the {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} under "actions" for each object.
246+
* @param {Object} [actionArgs] Optional. Arguments for the action. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of valid arguments
247247
* @returns {Promise} A promise which will resolved if everything went ok and rejected otherwise
248248
*/
249249
execute(objCode: string, objID: string | null, action: string, actionArgs?: object) {
@@ -263,9 +263,9 @@ export class Api {
263263
/**
264264
* Used for retrieve an object or multiple objects.
265265
* @memberOf Api
266-
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
266+
* @param {String} objCode One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}
267267
* @param {String|Array} objIDs Either one or multiple object ids
268-
* @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.
268+
* @param {String|String[]} fields Which fields to return. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
269269
* @return {Promise} A promise which will resolved with results if everything went ok and rejected otherwise
270270
*/
271271
get(objCode: string, objIDs: string | string[], fields?: TFields) {
@@ -330,7 +330,7 @@ export class Api {
330330
/**
331331
* Retrieves API metadata for an object.
332332
* @memberOf Api
333-
* @param {String} [objCode] One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}. If omitted will return list of objects available in API.
333+
* @param {String} [objCode] One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}. If omitted will return list of objects available in API.
334334
* @param {String|String[]} fields Which fields to return.
335335
* @return {Promise} A promise which will resolved with object metadata if everything went ok and rejected otherwise
336336
*/
@@ -345,10 +345,10 @@ export class Api {
345345
/**
346346
* Executes a named query for the given obj code
347347
* @memberOf Api
348-
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
349-
* @param {String} query A query to execute. A list of allowed named queries are available within the {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer} under "actions" for each object.
350-
* @param {Object} [queryArgs] Optional. Arguments for the action. See {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer} for the list of valid arguments
351-
* @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.
348+
* @param {String} objCode One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}
349+
* @param {String} query A query to execute. A list of allowed named queries are available within the {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} under "actions" for each object.
350+
* @param {Object} [queryArgs] Optional. Arguments for the action. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of valid arguments
351+
* @param {String|String[]} fields Which fields to return. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
352352
* @returns {Promise} A promise which will resolved with received data if everything went ok and rejected with error info otherwise
353353
*/
354354
namedQuery(objCode: string, query: string, queryArgs?: object, fields?: TFields) {
@@ -358,7 +358,7 @@ export class Api {
358358
/**
359359
* Deletes an object
360360
* @memberOf Api
361-
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
361+
* @param {String} objCode One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}
362362
* @param {String} objID ID of object
363363
* @param {Boolean} [bForce] Pass true to cause the server to remove the specified data and its dependants
364364
* @returns {Promise} A promise which will resolved if everything went ok and rejected otherwise
@@ -385,7 +385,7 @@ export class Api {
385385
/**
386386
* Performs report request, where only the aggregate of some field is desired, with one or more groupings.
387387
* @memberOf Api
388-
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
388+
* @param {String} objCode One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}
389389
* @param {Object} query An object with search criteria and aggregate functions
390390
* @return {Promise} A promise which will resolved with results if everything went ok and rejected otherwise
391391
*/
@@ -443,9 +443,9 @@ export class Api {
443443
/**
444444
* Used for object retrieval by multiple search criteria.
445445
* @memberOf Api
446-
* @param {String} objCode One of object codes from {@link https://developers.attask.com/api-docs/api-explorer/|Workfront API Explorer}
446+
* @param {String} objCode One of object codes from {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer}
447447
* @param {Object} [query] An object with search criteria
448-
* @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.
448+
* @param {String|String[]} [fields] Which fields to return. See {@link https://developers.workfront.com/api-docs/api-explorer/|Workfront API Explorer} for the list of available fields for the given objCode.
449449
* @param {Boolean} [useHttpPost=false] Whenever to use POST to send query params
450450
* @return {Promise} A promise which will resolved with search results if everything went ok and rejected otherwise
451451
*/

0 commit comments

Comments
 (0)