@adobe/spacecat-shared-ahrefs-client 1.0.1 → 1.2.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 +14 -0
- package/package.json +1 -1
- package/src/index.js +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@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)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **ahrefs-client:** get organic traffic ([#227](https://github.com/adobe/spacecat-shared/issues/227)) ([ba4e0a3](https://github.com/adobe/spacecat-shared/commit/ba4e0a37240df7334fde23d6e4cfa2d5df0bdb07))
|
|
7
|
+
|
|
8
|
+
# [@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)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add site top pages data access (SITES-21274) ([#213](https://github.com/adobe/spacecat-shared/issues/213)) ([b892e7c](https://github.com/adobe/spacecat-shared/commit/b892e7cb056824a4f5917fa2cf8a89c7dd077f7f))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-ahrefs-client-v1.0.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-ahrefs-client-v1.0.0...@adobe/spacecat-shared-ahrefs-client-v1.0.1) (2024-04-24)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
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
|
}
|