Skip to content

Commit cffc862

Browse files
author
Monika Cilińska
authored
Merge pull request #22 from marverix/master
Version 0.20.0
2 parents c3db6b8 + a616cad commit cffc862

File tree

8 files changed

+35
-46
lines changed

8 files changed

+35
-46
lines changed

dist/cloud-api-client.js

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Bitbar Cloud API Client for JavaScript v0.18.0 | (c) Bitbar Technologies and contributors | https://github.com/bitbar/cloud-api-client-js/blob/master/LICENSE.md */
1+
/* Bitbar Cloud API Client for JavaScript v0.20.0 | (c) Bitbar Technologies and contributors | https://github.com/bitbar/cloud-api-client-js/blob/master/LICENSE.md */
22
(function (global, factory) {
33
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@bitbar/finka'), require('axios'), require('qs')) :
44
typeof define === 'function' && define.amd ? define(['@bitbar/finka', 'axios', 'qs'], factory) :
@@ -11,7 +11,7 @@
1111

1212
finka();
1313

14-
var version = "0.18.0";
14+
var version = "0.20.0";
1515

1616
/*! *****************************************************************************
1717
Copyright (c) Microsoft Corporation. All rights reserved.
@@ -146,6 +146,12 @@
146146
}).data(data);
147147
return this;
148148
};
149+
APIEntity.prototype.formData = function (data) {
150+
this.headers({
151+
'Content-Type': 'multipart/form-data'
152+
}).data(data);
153+
return this;
154+
};
149155
APIEntity.prototype.paramsSerializer = function (params) {
150156
return qs.stringify(params, {
151157
arrayFormat: 'brackets'
@@ -712,20 +718,12 @@
712718
APIResourceDeviceSession.prototype.videos = function () {
713719
return this.output().videos();
714720
};
721+
APIResourceDeviceSession.prototype.connections = function () {
722+
return new APIList(this).push('connections');
723+
};
715724
return APIResourceDeviceSession;
716725
}(APIResource));
717726

718-
var APIResourceManualSession = (function (_super) {
719-
__extends(APIResourceManualSession, _super);
720-
function APIResourceManualSession() {
721-
return _super !== null && _super.apply(this, arguments) || this;
722-
}
723-
APIResourceManualSession.prototype.connections = function () {
724-
return new APIResource(this).push('connections');
725-
};
726-
return APIResourceManualSession;
727-
}(APIResourceDeviceSession));
728-
729727
var APIResourceRun = (function (_super) {
730728
__extends(APIResourceRun, _super);
731729
function APIResourceRun(parent, id) {
@@ -1043,9 +1041,6 @@
10431041
APIResourceUser.prototype.deviceSession = function (id) {
10441042
return new APIResourceDeviceSession(this, id);
10451043
};
1046-
APIResourceUser.prototype.manualSession = function (id) {
1047-
return new APIResourceManualSession(this, id);
1048-
};
10491044
APIResourceUser.prototype.projects = function () {
10501045
return new APIList(this).push('projects');
10511046
};

dist/cloud-api-client.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bitbar/cloud-api-client",
3-
"version": "0.18.0",
3+
"version": "0.20.0",
44
"description": "Bitbar Cloud API Client for JavaScript",
55
"main": "dist/cloud-api-client.js",
66
"types": "dist/index.d.ts",

src/api/APIEntity.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,20 @@ class APIEntity {
264264
return this;
265265
}
266266

267+
/**
268+
* Set form data
269+
*
270+
* @public
271+
* @param {object} data - JSON object to be set
272+
* @returns this
273+
*/
274+
public formData (data: FormData) {
275+
this.headers({
276+
'Content-Type': 'multipart/form-data'
277+
}).data(data);
278+
return this;
279+
}
280+
267281
/**
268282
* Custom params serializer
269283
* @private

src/api/APIResourceDeviceSession.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import APIResource from './APIResource'
2-
import APIList from './APIList'
2+
import APIList from './APIList';
33

44
import InputFileset from './extra-class/InputFileset'
55
import OutputFileset from './extra-class/OutputFileset'
@@ -125,6 +125,11 @@ class APIResourceDeviceSession extends APIResource {
125125
return this.output().videos();
126126
}
127127

128+
// Live Testing Connections
129+
public connections () {
130+
return new APIList(this).push('connections');
131+
}
132+
128133
}
129134

130135
export default APIResourceDeviceSession

src/api/APIResourceManualSession.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/api/APIResourceUser.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import APIResourceBillingPeriod from './APIResourceBillingPeriod'
44
import APIResourceJob from './APIResourceJob'
55
import APIResourceDeviceGroup from './APIResourceDeviceGroup'
66
import APIResourceDeviceSession from './APIResourceDeviceSession'
7-
import APIResourceManualSession from './APIResourceManualSession'
87
import APIResourceProject from './APIResourceProject'
98
import APIResourceFile from './APIResourceFile'
109
import APIResourceNotification from './APIResourceNotification'
@@ -120,11 +119,6 @@ class APIResourceUser extends APIResource {
120119
return new APIResourceDeviceSession(this, id);
121120
}
122121

123-
// /users/{id}/device-sessions/{id} - for Manual Device Sessions only
124-
public manualSession (id: number) {
125-
return new APIResourceManualSession(this, id);
126-
}
127-
128122
// /users/{id}/projects
129123
public projects () {
130124
return new APIList(this).push('projects');

0 commit comments

Comments
 (0)