Skip to content

Commit 432caa3

Browse files
committed
Merge branch 'feature/analytics-license-key' into develop
2 parents 0609bac + fcd985e commit 432caa3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

bitmovin/analytics/query_builder.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ class Builder {
6969
}
7070
return this;
7171
}
72+
licenseKey(licenseKey) {
73+
this.query_ = {
74+
...this.query_,
75+
licenseKey
76+
}
77+
return this;
78+
}
7279
query() {
7380
return this.target_(this.query_)
7481
}

tests/analytics/queries.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ describe('analytics', () => {
6060
const end = moment().toDate();
6161
const testBuilderFunction = (func) => {
6262
const fn = func('STARTUPTIME')
63+
.licenseKey('license-key')
6364
.between(start, end)
6465
.interval('DAY')
6566
.filter('STARTUPTIME', 'GT', 0)
@@ -71,6 +72,7 @@ describe('analytics', () => {
7172
assertItReturnsPromise(mockPost, () => { return fn.query() });
7273
assertPayload(mockPost, () => { return fn.query() }, {
7374
dimension: 'STARTUPTIME',
75+
licenseKey: 'license-key',
7476
start: start,
7577
end: end,
7678
filters: [

0 commit comments

Comments
 (0)