@adobe/spacecat-shared-ahrefs-client 1.1.0 → 1.2.1
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 +14 -0
- package/package.json +3 -3
- package/src/index.js +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-ahrefs-client-v1.2.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-ahrefs-client-v1.2.0...@adobe/spacecat-shared-ahrefs-client-v1.2.1) (2024-05-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([#228](https://github.com/adobe/spacecat-shared/issues/228)) ([ef2ab41](https://github.com/adobe/spacecat-shared/commit/ef2ab41a9175ec5ba8ec7e2830898e9db01fb2b6))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-ahrefs-client-v1.2.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-ahrefs-client-v1.1.0...@adobe/spacecat-shared-ahrefs-client-v1.2.0) (2024-05-08)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **ahrefs-client:** get organic traffic ([#227](https://github.com/adobe/spacecat-shared/issues/227)) ([ba4e0a3](https://github.com/adobe/spacecat-shared/commit/ba4e0a37240df7334fde23d6e4cfa2d5df0bdb07))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-ahrefs-client-v1.1.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-ahrefs-client-v1.0.1...@adobe/spacecat-shared-ahrefs-client-v1.1.0) (2024-04-29)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-ahrefs-client",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Ahrefs Client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"chai": "4.4.1",
|
|
39
|
-
"chai-as-promised": "7.1.
|
|
39
|
+
"chai-as-promised": "7.1.2",
|
|
40
40
|
"nock": "13.5.4",
|
|
41
|
-
"sinon": "17.0.
|
|
41
|
+
"sinon": "17.0.2",
|
|
42
42
|
"sinon-chai": "3.7.0",
|
|
43
43
|
"typescript": "5.4.5"
|
|
44
44
|
}
|
package/src/index.js
CHANGED
|
@@ -159,4 +159,18 @@ export default class AhrefsAPIClient {
|
|
|
159
159
|
|
|
160
160
|
return this.sendRequest('/site-explorer/all-backlinks', queryParams);
|
|
161
161
|
}
|
|
162
|
+
|
|
163
|
+
async getOrganicTraffic(url, startDate, endDate) {
|
|
164
|
+
const queryParams = {
|
|
165
|
+
target: url,
|
|
166
|
+
date_from: startDate,
|
|
167
|
+
date_to: endDate,
|
|
168
|
+
history_grouping: 'weekly',
|
|
169
|
+
volume_mode: 'average',
|
|
170
|
+
mode: 'prefix',
|
|
171
|
+
output: 'json',
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
return this.sendRequest('/site-explorer/metrics-history', queryParams);
|
|
175
|
+
}
|
|
162
176
|
}
|