Skip to content

Commit 236c6d7

Browse files
authored
Merge pull request #18 from monikacil/master
Added /device-statistics and /me/device-statistics
2 parents ceb9e19 + d06f042 commit 236c6d7

File tree

4 files changed

+46
-30
lines changed

4 files changed

+46
-30
lines changed

dist/cloud-api-client.js

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Bitbar Cloud API Client for JavaScript v0.15.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.16.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,35 +11,35 @@
1111

1212
finka();
1313

14-
var version = "0.15.0";
14+
var version = "0.16.0";
1515

16-
/*! *****************************************************************************
17-
Copyright (c) Microsoft Corporation. All rights reserved.
18-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
19-
this file except in compliance with the License. You may obtain a copy of the
20-
License at http://www.apache.org/licenses/LICENSE-2.0
21-
22-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
24-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
25-
MERCHANTABLITY OR NON-INFRINGEMENT.
26-
27-
See the Apache Version 2.0 License for specific language governing permissions
28-
and limitations under the License.
29-
***************************************************************************** */
30-
/* global Reflect, Promise */
31-
32-
var extendStatics = function(d, b) {
33-
extendStatics = Object.setPrototypeOf ||
34-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
35-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
36-
return extendStatics(d, b);
37-
};
38-
39-
function __extends(d, b) {
40-
extendStatics(d, b);
41-
function __() { this.constructor = d; }
42-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16+
/*! *****************************************************************************
17+
Copyright (c) Microsoft Corporation. All rights reserved.
18+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
19+
this file except in compliance with the License. You may obtain a copy of the
20+
License at http://www.apache.org/licenses/LICENSE-2.0
21+
22+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
24+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
25+
MERCHANTABLITY OR NON-INFRINGEMENT.
26+
27+
See the Apache Version 2.0 License for specific language governing permissions
28+
and limitations under the License.
29+
***************************************************************************** */
30+
/* global Reflect, Promise */
31+
32+
var extendStatics = function(d, b) {
33+
extendStatics = Object.setPrototypeOf ||
34+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
35+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
36+
return extendStatics(d, b);
37+
};
38+
39+
function __extends(d, b) {
40+
extendStatics(d, b);
41+
function __() { this.constructor = d; }
42+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4343
}
4444

4545
var ALLOWED_HTTP_METHODS;
@@ -1083,6 +1083,9 @@
10831083
APIResourceUser.prototype.statistics = function () {
10841084
return new APIList(this).push('statistics');
10851085
};
1086+
APIResourceUser.prototype.deviceStatistics = function () {
1087+
return new APIList(this).push('device-statistics');
1088+
};
10861089
return APIResourceUser;
10871090
}(APIResource));
10881091

@@ -1426,6 +1429,9 @@
14261429
API.prototype.labelGroups = function () {
14271430
return new APIList(this).push('label-groups');
14281431
};
1432+
API.prototype.deviceStatistics = function () {
1433+
return new APIList(this).push('device-statistics');
1434+
};
14291435
return API;
14301436
}());
14311437

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.15.0",
3+
"version": "0.16.0",
44
"description": "Bitbar Cloud API Client for JavaScript",
55
"main": "dist/cloud-api-client.js",
66
"types": "dist/index.d.ts",

src/API.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ class API {
138138
public labelGroups () {
139139
return new APIList(this).push('label-groups');
140140
}
141+
142+
// /device-statistics
143+
public deviceStatistics () {
144+
return new APIList(this).push('device-statistics');
145+
}
141146
}
142147

143148

src/api/APIResourceUser.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ class APIResourceUser extends APIResource {
240240
return new APIList(this).push('statistics');
241241
}
242242

243+
// /users/{id}/statistics
244+
public deviceStatistics () {
245+
return new APIList(this).push('device-statistics');
246+
}
247+
243248
}
244249

245250
export default APIResourceUser

0 commit comments

Comments
 (0)