-
Notifications
You must be signed in to change notification settings - Fork 5.3k
DataForSEO new components #16717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
GTFalcao
wants to merge
20
commits into
master
Choose a base branch
from
15507-dataforseo
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
DataForSEO new components #16717
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
dda6122
pnpm
GTFalcao 7c71e96
Get Backlink Summary
GTFalcao a818abc
Rename 'app' > 'dataforseo'
GTFalcao efaadc7
Get Backlinks + reusing props
GTFalcao 91d6e23
Get backlinks history
GTFalcao 295c7ed
Get Bulk Backlinks and Ranks
GTFalcao f924f1a
Get Domain Pages Summary + prop reusing
GTFalcao f1590d6
More bulk actions
GTFalcao aebc8c6
Get Referring Domains
GTFalcao fd10bfd
Search Business Listings
GTFalcao be9b680
Get Categories Aggregation
GTFalcao 1ad1834
Parse Page Content
GTFalcao 2d575bc
request adjustments
GTFalcao 2ab1032
Merge branch 'master' into 15507-dataforseo
GTFalcao f1da4cf
pnpm
GTFalcao cd96bf0
Adjustments
GTFalcao 9cc77e3
Adjustments
GTFalcao 23fc881
Merge branch 'master' into 15507-dataforseo
GTFalcao c27c8f6
pnpm
GTFalcao d207c86
Adjusting prop names
GTFalcao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
components/dataforseo/actions/get-backlinks-history/get-backlinks-history.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import dataforseo from "../../dataforseo.app.mjs"; | ||
|
||
export default { | ||
key: "dataforseo-get-backlinks-history", | ||
name: "Get Backlinks History", | ||
description: | ||
"Get historical backlinks data back to the beginning of 2019. [See the documentation](https://docs.dataforseo.com/v3/backlinks/history/live/)", | ||
version: "0.0.1", | ||
type: "action", | ||
methods: { | ||
getBacklinksHistory(args = {}) { | ||
return this.dataforseo._makeRequest({ | ||
path: "/backlinks/history/live", | ||
method: "post", | ||
...args, | ||
}); | ||
}, | ||
}, | ||
props: { | ||
dataforseo, | ||
target: { | ||
type: "string", | ||
label: "Target Domain", | ||
description: "Domain should be specified without `https://` and `www`", | ||
}, | ||
dateFrom: { | ||
type: "string", | ||
label: "Starting Date", | ||
description: | ||
"Starting date of the time range, in `YYYY-MM-DD` format. Default and minimum value is `2019-01-01`", | ||
optional: true, | ||
}, | ||
dateTo: { | ||
type: "string", | ||
label: "End Date", | ||
description: | ||
"End date of the time range, in `YYYY-MM-DD` format. Default is today's date", | ||
optional: true, | ||
}, | ||
rankScale: { | ||
propDefinition: [ | ||
dataforseo, | ||
"rankScale", | ||
], | ||
}, | ||
tag: { | ||
propDefinition: [ | ||
dataforseo, | ||
"tag", | ||
], | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.getBacklinksHistory({ | ||
$, | ||
data: [ | ||
{ | ||
target: this.target, | ||
date_from: this.dateFrom, | ||
date_to: this.dateTo, | ||
rank_scale: this.rankScale, | ||
tag: this.tag, | ||
}, | ||
], | ||
}); | ||
$.export("$summary", "Successfully retrieved backlinks history"); | ||
return response; | ||
}, | ||
}; |
101 changes: 101 additions & 0 deletions
101
components/dataforseo/actions/get-backlinks-summary/get-backlinks-summary.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import dataforseo from "../../dataforseo.app.mjs"; | ||
import { parseObjectEntries } from "../../common/utils.mjs"; | ||
|
||
export default { | ||
key: "dataforseo-get-backlinks-summary", | ||
name: "Get Backlinks Summary", | ||
description: | ||
"Get an overview of backlinks data available for a given domain, subdomain, or webpage. [See the documentation](https://docs.dataforseo.com/v3/backlinks/summary/live/)", | ||
version: "0.0.1", | ||
type: "action", | ||
methods: { | ||
getBacklinksSummary(args = {}) { | ||
return this.dataforseo._makeRequest({ | ||
path: "/backlinks/summary/live", | ||
method: "post", | ||
...args, | ||
}); | ||
}, | ||
}, | ||
props: { | ||
dataforseo, | ||
target: { | ||
propDefinition: [ | ||
dataforseo, | ||
"backlinksTarget", | ||
], | ||
}, | ||
includeSubdomains: { | ||
propDefinition: [ | ||
dataforseo, | ||
"includeSubdomains", | ||
], | ||
}, | ||
includeIndirectLinks: { | ||
propDefinition: [ | ||
dataforseo, | ||
"includeIndirectLinks", | ||
], | ||
}, | ||
excludeInternalBacklinks: { | ||
propDefinition: [ | ||
dataforseo, | ||
"excludeInternalBacklinks", | ||
], | ||
}, | ||
backlinksStatusType: { | ||
propDefinition: [ | ||
dataforseo, | ||
"backlinksStatusType", | ||
], | ||
}, | ||
backlinksFilters: { | ||
propDefinition: [ | ||
dataforseo, | ||
"backlinksFilters", | ||
], | ||
}, | ||
rankScale: { | ||
propDefinition: [ | ||
dataforseo, | ||
"rankScale", | ||
], | ||
}, | ||
tag: { | ||
propDefinition: [ | ||
dataforseo, | ||
"tag", | ||
], | ||
}, | ||
additionalOptions: { | ||
propDefinition: [ | ||
dataforseo, | ||
"additionalOptions", | ||
], | ||
description: "Additional parameters to send in the request. [See the documentation](https://docs.dataforseo.com/v3/backlinks/summary/live/) for all available parameters. Values will be parsed as JSON where applicable.", | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.getBacklinksSummary({ | ||
$, | ||
data: [ | ||
{ | ||
target: this.target, | ||
include_subdomains: this.includeSubdomains, | ||
include_indirect_links: this.includeIndirectLinks, | ||
exclude_internal_backlinks: this.excludeInternalBacklinks, | ||
backlinks_status_type: this.backlinksStatusType, | ||
backlinks_filters: this.backlinksFilters, | ||
rank_scale: this.rankScale, | ||
tag: this.tag, | ||
...parseObjectEntries(this.additionalOptions), | ||
}, | ||
], | ||
}); | ||
GTFalcao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$.export( | ||
"$summary", | ||
"Successfully retrieved backlink summary", | ||
); | ||
return response; | ||
}, | ||
}; |
97 changes: 97 additions & 0 deletions
97
components/dataforseo/actions/get-backlinks/get-backlinks.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import { parseObjectEntries } from "../../common/utils.mjs"; | ||
import dataforseo from "../../dataforseo.app.mjs"; | ||
|
||
export default { | ||
key: "dataforseo-get-backlinks", | ||
name: "Get Backlinks", | ||
description: | ||
"Get a list of backlinks and relevant data for a given domain, subdomain, or webpage. [See the documentation](https://docs.dataforseo.com/v3/backlinks/backlinks/live/)", | ||
version: "0.0.1", | ||
type: "action", | ||
methods: { | ||
getBacklinks(args = {}) { | ||
return this.dataforseo._makeRequest({ | ||
path: "/backlinks/backlinks/live", | ||
method: "post", | ||
...args, | ||
}); | ||
}, | ||
}, | ||
props: { | ||
dataforseo, | ||
target: { | ||
propDefinition: [ | ||
dataforseo, | ||
"backlinksTarget", | ||
], | ||
}, | ||
mode: { | ||
type: "string", | ||
label: "Mode", | ||
description: "Select the mode of grouping the results", | ||
options: [ | ||
{ | ||
value: "as_is", | ||
label: "returns all backlinks", | ||
}, | ||
{ | ||
value: "one_per_domain", | ||
label: "returns one backlink per domain", | ||
}, | ||
{ | ||
value: "one_per_anchor", | ||
label: "returns one backlink per anchor", | ||
}, | ||
], | ||
default: "as_is", | ||
}, | ||
filters: { | ||
propDefinition: [ | ||
dataforseo, | ||
"backlinksFilters", | ||
], | ||
}, | ||
order_by: { | ||
type: "string[]", | ||
label: "Order By", | ||
description: "One or more rules to sort results with, with each entry being a field and a direction (`asc` for ascending or `desc` for descending). Example: [\"domain_from_rank,desc\",\"page_from_rank,asc\"]", | ||
}, | ||
rankScale: { | ||
propDefinition: [ | ||
dataforseo, | ||
"rankScale", | ||
], | ||
}, | ||
tag: { | ||
propDefinition: [ | ||
dataforseo, | ||
"tag", | ||
], | ||
}, | ||
additionalOptions: { | ||
propDefinition: [ | ||
dataforseo, | ||
"additionalOptions", | ||
], | ||
description: "Additional parameters to send in the request. [See the documentation](https://docs.dataforseo.com/v3/backlinks/backlinks/live/) for all available parameters. Values will be parsed as JSON where applicable.", | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.getBacklinks({ | ||
$, | ||
data: [ | ||
{ | ||
target: this.target, | ||
mode: this.mode, | ||
filters: this.filters, | ||
order_by: this.order_by, | ||
rank_scale: this.rankScale, | ||
tag: this.tag, | ||
...parseObjectEntries(this.additionalOptions), | ||
}, | ||
], | ||
}); | ||
$.export("$summary", "Successfully retrieved backlinks data"); | ||
return response; | ||
}, | ||
}; |
47 changes: 47 additions & 0 deletions
47
components/dataforseo/actions/get-bulk-backlinks/get-bulk-backlinks.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import dataforseo from "../../dataforseo.app.mjs"; | ||
|
||
export default { | ||
key: "dataforseo-get-bulk-backlinks", | ||
name: "Get Bulk Backlinks", | ||
description: | ||
"Get the number of backlinks pointing to specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_backlinks/live/)", | ||
version: "0.0.1", | ||
type: "action", | ||
methods: { | ||
getBulkBacklinks(args = {}) { | ||
return this.dataforseo._makeRequest({ | ||
path: "/backlinks/bulk_backlinks/live", | ||
method: "post", | ||
...args, | ||
}); | ||
}, | ||
}, | ||
props: { | ||
dataforseo, | ||
targets: { | ||
propDefinition: [ | ||
dataforseo, | ||
"targets", | ||
], | ||
}, | ||
tag: { | ||
propDefinition: [ | ||
dataforseo, | ||
"tag", | ||
], | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.getBulkBacklinks({ | ||
$, | ||
data: [ | ||
{ | ||
targets: this.targets, | ||
tag: this.tag, | ||
}, | ||
], | ||
}); | ||
$.export("$summary", "Successfully retrieved bulk backlinks"); | ||
return response; | ||
}, | ||
}; |
54 changes: 54 additions & 0 deletions
54
components/dataforseo/actions/get-bulk-ranks/get-bulk-ranks.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import dataforseo from "../../dataforseo.app.mjs"; | ||
|
||
export default { | ||
key: "dataforseo-get-bulk-ranks", | ||
name: "Get Bulk Ranks", | ||
description: | ||
"Get rank scores of specified domains, subdomains, and pages. [See the documentation](https://docs.dataforseo.com/v3/backlinks/bulk_ranks/live/)", | ||
version: "0.0.1", | ||
type: "action", | ||
methods: { | ||
getBacklinksBulkRanks(args = {}) { | ||
return this.dataforseo._makeRequest({ | ||
path: "/backlinks/bulk_ranks/live", | ||
method: "post", | ||
...args, | ||
}); | ||
}, | ||
}, | ||
props: { | ||
dataforseo, | ||
targets: { | ||
propDefinition: [ | ||
dataforseo, | ||
"targets", | ||
], | ||
}, | ||
rankScale: { | ||
propDefinition: [ | ||
dataforseo, | ||
"rankScale", | ||
], | ||
}, | ||
tag: { | ||
propDefinition: [ | ||
dataforseo, | ||
"tag", | ||
], | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.getBacklinksBulkRanks({ | ||
$, | ||
data: [ | ||
{ | ||
targets: this.targets, | ||
rank_scale: this.rankScale, | ||
tag: this.tag, | ||
}, | ||
], | ||
}); | ||
$.export("$summary", "Successfully retrieved bulk ranks"); | ||
return response; | ||
}, | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.