@adobe/spacecat-shared-rum-api-client 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.js +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-rum-api-client-v1.6.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.5.0...@adobe/spacecat-shared-rum-api-client-v1.6.0) (2024-02-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* experimentation RUM API method ([#133](https://github.com/adobe/spacecat-shared/issues/133)) ([f95eded](https://github.com/adobe/spacecat-shared/commit/f95ededcc5ba373717a90a577f20e75e1fad80d4))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-rum-api-client-v1.5.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.4.4...@adobe/spacecat-shared-rum-api-client-v1.5.0) (2024-02-06)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const APIS = {
|
|
|
22
22
|
RUM_DASHBOARD: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-dashboard',
|
|
23
23
|
DOMAIN_LIST: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/dash/domain-list',
|
|
24
24
|
RUM_SOURCES: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-sources',
|
|
25
|
+
RUM_EXPERIMENTS: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-experiments',
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
const DOMAIN_LIST_DEFAULT_PARAMS = {
|
|
@@ -133,6 +134,19 @@ export default class RUMAPIClient {
|
|
|
133
134
|
return sendRequest(this.createRUMURL(params));
|
|
134
135
|
}
|
|
135
136
|
|
|
137
|
+
createExperimentationURL(params = {}) {
|
|
138
|
+
return createUrl(
|
|
139
|
+
APIS.RUM_EXPERIMENTS,
|
|
140
|
+
{
|
|
141
|
+
domainkey: this.domainkey, ...RUM_DEFAULT_PARAMS, ...params,
|
|
142
|
+
},
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
async getExperimentationData(params = {}) {
|
|
147
|
+
return sendRequest(this.createExperimentationURL(params));
|
|
148
|
+
}
|
|
149
|
+
|
|
136
150
|
async get404Sources(params = {}) {
|
|
137
151
|
return sendRequest(this.create404URL(params));
|
|
138
152
|
}
|