semrush-api-client 0.1.3 → 0.1.4
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/dist/client/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getDomainRank } from "../domain/getDomainRank";
|
|
2
2
|
import { getPhraseAll } from "../keyword/getPhrase";
|
|
3
3
|
import { backlinksOverview } from "../backlinks/backlinksOverview";
|
|
4
|
+
import { getRankDifference } from "../overview/getRankDifference";
|
|
4
5
|
export declare class SemrushAPIClient {
|
|
5
6
|
private client;
|
|
6
7
|
private api_key;
|
|
@@ -14,4 +15,5 @@ export declare class SemrushAPIClient {
|
|
|
14
15
|
getDomainRank: typeof getDomainRank;
|
|
15
16
|
getPhrase: typeof getPhraseAll;
|
|
16
17
|
backlinksOverview: typeof backlinksOverview;
|
|
18
|
+
getRankDifference: typeof getRankDifference;
|
|
17
19
|
}
|
package/dist/client/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const axios_1 = __importDefault(require("axios"));
|
|
|
8
8
|
const getDomainRank_1 = require("../domain/getDomainRank");
|
|
9
9
|
const getPhrase_1 = require("../keyword/getPhrase");
|
|
10
10
|
const backlinksOverview_1 = require("../backlinks/backlinksOverview");
|
|
11
|
+
const getRankDifference_1 = require("../overview/getRankDifference");
|
|
11
12
|
class SemrushAPIClient {
|
|
12
13
|
client;
|
|
13
14
|
api_key;
|
|
@@ -56,5 +57,6 @@ class SemrushAPIClient {
|
|
|
56
57
|
getDomainRank = getDomainRank_1.getDomainRank;
|
|
57
58
|
getPhrase = getPhrase_1.getPhraseAll;
|
|
58
59
|
backlinksOverview = backlinksOverview_1.backlinksOverview;
|
|
60
|
+
getRankDifference = getRankDifference_1.getRankDifference;
|
|
59
61
|
}
|
|
60
62
|
exports.SemrushAPIClient = SemrushAPIClient;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SemrushAPIClient } from "../client";
|
|
2
|
+
import { Database } from "../type/general/database";
|
|
3
|
+
type ExportColumns = "Db" | "Dt" | "Dn" | "Rk" | "Or" | "Ot" | "Oc" | "Ad" | "At" | "Ac" | "Sh" | "Sv" | "FKn" | "FPn" | "Sr" | "Srb" | "St" | "Stb" | "Sc" | "Srn" | "Srl";
|
|
4
|
+
export declare function getRankDifference(this: SemrushAPIClient, { domain, export_columns, database, display_limit, outputObj, }: {
|
|
5
|
+
domain: string;
|
|
6
|
+
export_columns?: ExportColumns[];
|
|
7
|
+
database?: Database;
|
|
8
|
+
display_limit?: number;
|
|
9
|
+
outputObj?: boolean;
|
|
10
|
+
}): Promise<string>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRankDifference = getRankDifference;
|
|
4
|
+
async function getRankDifference({ domain, export_columns = [
|
|
5
|
+
"Db",
|
|
6
|
+
"Dn",
|
|
7
|
+
"Rk",
|
|
8
|
+
"Or",
|
|
9
|
+
"Ot",
|
|
10
|
+
"Oc",
|
|
11
|
+
"Ad",
|
|
12
|
+
"At",
|
|
13
|
+
"Ac",
|
|
14
|
+
"Sh",
|
|
15
|
+
], database = "us", display_limit = 1000, outputObj = true, }) {
|
|
16
|
+
const params = {
|
|
17
|
+
type: "rank_difference",
|
|
18
|
+
export_columns: export_columns.join(","),
|
|
19
|
+
domain,
|
|
20
|
+
database,
|
|
21
|
+
display_limit,
|
|
22
|
+
};
|
|
23
|
+
return this.get(this.BASE_URL, params, outputObj);
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semrush-api-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,9 +29,6 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^22.15.
|
|
33
|
-
},
|
|
34
|
-
"publishConfig": {
|
|
35
|
-
"registry": "https://registry.npmjs.org/"
|
|
32
|
+
"@types/node": "^22.15.30"
|
|
36
33
|
}
|
|
37
34
|
}
|