File tree Expand file tree Collapse file tree 2 files changed +90
-0
lines changed Expand file tree Collapse file tree 2 files changed +90
-0
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,48 @@ Retrieves all screenshots previously generate with your account
198
198
api .getScreenshotList (function (error , screenshots ) {}, offset, limit);
199
199
```
200
200
201
+ ### getTeam
202
+ Retrieves team information
203
+
204
+ ``` javascript
205
+ api .getTeam (function (error , data ) {});
206
+ ```
207
+
208
+ ### getUsersInTeam
209
+ Get all users in your team
210
+
211
+ ``` javascript
212
+ api .getUsersInTeam (function (error , users ) {});
213
+ ```
214
+
215
+ ### getUserFromTeam
216
+ Retrieves information about a specific user in your team
217
+
218
+ ``` javascript
219
+ api .getUserFromTeam (userId, function (error , user ) {});
220
+ ```
221
+
222
+ ### createUserInTeam
223
+ Add a user to your team. You need ADMIN rights for this.
224
+
225
+ ``` javascript
226
+ api .createUserInTeam (user, function (error , result ) {});
227
+ ```
228
+
229
+ ### updateUserInTeam
230
+ Update a user in your team. You need ADMIN rights for this.
231
+
232
+ ``` javascript
233
+ api .updateUserInTeam (userId, userData, function (error , result ) {});
234
+ ```
235
+
236
+ ### resetCredentials
237
+ Resets credentials for a specific user in your team. You need ADMIN rights for this.
238
+
239
+ ``` javascript
240
+ api .resetCredentials (userId, function (error , result ) {});
241
+ ```
242
+
201
243
## Tests
202
244
203
245
`` npm test ``
Original file line number Diff line number Diff line change @@ -293,6 +293,54 @@ TestingBot.prototype.uploadFile = function(localFilePath, callback) {
293
293
} ) ;
294
294
} ;
295
295
296
+ TestingBot . prototype . getTeam = function ( callback ) {
297
+ this . request ( {
298
+ method : 'GET' ,
299
+ url : '/team-management'
300
+ } , callback ) ;
301
+ } ;
302
+
303
+ TestingBot . prototype . getUsersInTeam = function ( callback ) {
304
+ this . request ( {
305
+ method : 'GET' ,
306
+ url : '/team-management/users'
307
+ } , callback ) ;
308
+ } ;
309
+
310
+ TestingBot . prototype . getUserFromTeam = function ( userId , callback ) {
311
+ this . request ( {
312
+ method : 'GET' ,
313
+ url : '/team-management/users/' + userId
314
+ } , callback ) ;
315
+ } ;
316
+
317
+ TestingBot . prototype . createUserInTeam = function ( user , callback ) {
318
+ this . request ( {
319
+ method : 'POST' ,
320
+ url : '/team-management/users/' ,
321
+ data : {
322
+ user : user
323
+ }
324
+ } , callback ) ;
325
+ } ;
326
+
327
+ TestingBot . prototype . updateUserInTeam = function ( userId , userData , callback ) {
328
+ this . request ( {
329
+ method : 'PUT' ,
330
+ url : '/team-management/users/' + userId ,
331
+ data : {
332
+ user : userData
333
+ }
334
+ } , callback ) ;
335
+ } ;
336
+
337
+ TestingBot . prototype . resetCredentials = function ( userId , callback ) {
338
+ this . request ( {
339
+ method : 'POST' ,
340
+ url : '/team-management/users/' + userId + '/reset-keys'
341
+ } , callback ) ;
342
+ } ;
343
+
296
344
TestingBot . prototype . getStorageFile = function ( appUrl , callback ) {
297
345
this . request ( {
298
346
method : 'GET' ,
You can’t perform that action at this time.
0 commit comments