File tree Expand file tree Collapse file tree 2 files changed +70
-1
lines changed
components/dataforseo/actions Expand file tree Collapse file tree 2 files changed +70
-1
lines changed Original file line number Diff line number Diff line change 1+ import dataforseo from "../../dataforseo.app.mjs" ;
2+
3+ export default {
4+ key : "dataforseo-get-backlinks-history" ,
5+ name : "Get Backlinks History" ,
6+ description :
7+ "Get historical backlinks data back to the beginning of 2019. [See the documentation](https://docs.dataforseo.com/v3/backlinks/history/live/)" ,
8+ version : "0.0.1" ,
9+ type : "action" ,
10+ methods : {
11+ getBacklinksHistory ( args = { } ) {
12+ return this . _makeRequest ( {
13+ path : "/backlinks/history/live" ,
14+ method : "post" ,
15+ ...args ,
16+ } ) ;
17+ } ,
18+ } ,
19+ props : {
20+ dataforseo,
21+ target : {
22+ type : "string" ,
23+ label : "Target Domain" ,
24+ description : "Domain should be specified without `https://` and `www`" ,
25+ } ,
26+ dateFrom : {
27+ type : "string" ,
28+ label : "Starting Date" ,
29+ description :
30+ "Starting date of the time range, in `YYYY-MM-DD` format. Default and minimum value is `2019-01-01`" ,
31+ optional : true ,
32+ } ,
33+ dateTo : {
34+ type : "string" ,
35+ label : "End Date" ,
36+ description :
37+ "End date of the time range, in `YYYY-MM-DD` format. Default is today's date" ,
38+ optional : true ,
39+ } ,
40+ rankScale : {
41+ propDefinition : [
42+ dataforseo ,
43+ "rankScale" ,
44+ ] ,
45+ } ,
46+ tag : {
47+ propDefinition : [
48+ dataforseo ,
49+ "tag" ,
50+ ] ,
51+ } ,
52+ } ,
53+ async run ( { $ } ) {
54+ const response = await this . getBacklinksHistory ( {
55+ $,
56+ data : [
57+ {
58+ target : this . target ,
59+ date_from : this . dateFrom ,
60+ date_to : this . dateTo ,
61+ rank_scale : this . rankScale ,
62+ tag : this . tag ,
63+ } ,
64+ ] ,
65+ } ) ;
66+ $ . export ( "$summary" , "Successfully retrieved backlinks history" ) ;
67+ return response ;
68+ } ,
69+ } ;
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export default {
9191 } ,
9292 ] ,
9393 } ) ;
94- $ . export ( "$summary" , "Successfully retrieved backlink summary " ) ;
94+ $ . export ( "$summary" , "Successfully retrieved backlinks data " ) ;
9595 return response ;
9696 } ,
9797} ;
You can’t perform that action at this time.
0 commit comments