-
Notifications
You must be signed in to change notification settings - Fork 5.5k
DataForSEO new components #18095
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
Merged
+2,532
−45
Merged
DataForSEO new components #18095
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7877a27
new components
michelle0927 7badfa8
pnpm-lock.yaml
michelle0927 8ab8b55
versions
michelle0927 af64fbb
updates
michelle0927 9d5b80d
updates
michelle0927 2da9d2f
update
michelle0927 ece80f9
pnpm-lock.yaml
michelle0927 8a5824d
pnpm-lock.yaml
michelle0927 d8e4e1f
updates
michelle0927 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-app-intersection/get-app-intersection.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"; | ||
import { ConfigurationError } from "@pipedream/platform"; | ||
import { parseArray } from "../../common/utils.mjs"; | ||
|
||
export default { | ||
key: "dataforseo-get-app-intersection", | ||
name: "Get App Intersection", | ||
description: "Compare keyword overlap between mobile apps to find shared ranking opportunities. [See the documentation](https://docs.dataforseo.com/v3/dataforseo_labs/google/app_intersection/live/?bash)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
dataforseo, | ||
appIds: { | ||
type: "string[]", | ||
label: "App IDs", | ||
description: "Package names (IDs) of target Android apps on Google Play; you can find the package name in the app page URL (e.g., com.example.app)", | ||
}, | ||
locationCode: { | ||
propDefinition: [ | ||
dataforseo, | ||
"locationCode", | ||
], | ||
}, | ||
languageCode: { | ||
propDefinition: [ | ||
dataforseo, | ||
"languageCode", | ||
], | ||
}, | ||
limit: { | ||
propDefinition: [ | ||
dataforseo, | ||
"limit", | ||
], | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const appIds = {}; | ||
const parsedAppIds = parseArray(this.appIds); | ||
|
||
for (let i = 0; i < parsedAppIds.length; i++) { | ||
appIds[`${i + 1}`] = parsedAppIds[i]; | ||
} | ||
|
||
const response = await this.dataforseo.getAppIntersection({ | ||
$, | ||
debug: true, | ||
data: [ | ||
{ | ||
app_ids: appIds, | ||
location_code: this.locationCode, | ||
language_code: this.languageCode, | ||
limit: this.limit, | ||
}, | ||
], | ||
}); | ||
|
||
if (response.status_code !== 20000) { | ||
throw new ConfigurationError(`Error: ${response.status_message}`); | ||
} | ||
|
||
if (response.tasks[0].status_code !== 20000) { | ||
throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); | ||
} | ||
|
||
$.export("$summary", "Successfully retrieved app intersection."); | ||
return response; | ||
}, | ||
}; |
64 changes: 64 additions & 0 deletions
64
components/dataforseo/actions/get-app-reviews-summary/get-app-reviews-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,64 @@ | ||
import dataforseo from "../../dataforseo.app.mjs"; | ||
import { ConfigurationError } from "@pipedream/platform"; | ||
|
||
export default { | ||
key: "dataforseo-get-app-reviews-summary", | ||
name: "Get App Reviews Summary", | ||
description: "Get app reviews and ratings summary for mobile app reputation analysis. [See the documentation](https://docs.dataforseo.com/v3/app_data/apple/app_reviews/task_post/?bash)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
dataforseo, | ||
appId: { | ||
type: "string", | ||
label: "App ID", | ||
description: "The ID of the mobile application on App Store. Yyou can find the ID in the URL of every app listed on App Store. Example: in the URL https://apps.apple.com/us/app/id835599320, the id is `835599320`", | ||
}, | ||
locationCode: { | ||
propDefinition: [ | ||
dataforseo, | ||
"locationCode", | ||
], | ||
}, | ||
languageCode: { | ||
propDefinition: [ | ||
dataforseo, | ||
"languageCode", | ||
], | ||
}, | ||
sortBy: { | ||
type: "string", | ||
label: "Sort By", | ||
description: "Sort reviews by specific criteria", | ||
options: [ | ||
"most_recent", | ||
"most_helpful", | ||
], | ||
optional: true, | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.dataforseo.getAppReviewsSummary({ | ||
$, | ||
data: [ | ||
{ | ||
app_id: this.appId, | ||
location_code: this.locationCode, | ||
language_code: this.languageCode, | ||
sort_by: this.sortBy, | ||
}, | ||
], | ||
}); | ||
|
||
if (response.status_code !== 20000) { | ||
throw new ConfigurationError(`Error: ${response.status_message}`); | ||
} | ||
|
||
if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { | ||
throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); | ||
} | ||
|
||
$.export("$summary", `Successfully retrieved app reviews summary for "${this.appId}".`); | ||
return response; | ||
}, | ||
}; |
85 changes: 85 additions & 0 deletions
85
components/dataforseo/actions/get-app-store-search/get-app-store-search.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,85 @@ | ||
import dataforseo from "../../dataforseo.app.mjs"; | ||
import { ConfigurationError } from "@pipedream/platform"; | ||
|
||
export default { | ||
key: "dataforseo-get-app-store-search", | ||
name: "Get App Store Search", | ||
description: "Search iOS App Store apps by keywords for app store optimization (ASO) analysis. [See the documentation](https://docs.dataforseo.com/v3/app_data/apple/app_searches/task_post/?bash)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
dataforseo, | ||
keyword: { | ||
type: "string", | ||
label: "Keyword", | ||
description: "The keyword to search for", | ||
}, | ||
locationCode: { | ||
propDefinition: [ | ||
dataforseo, | ||
"locationCode", | ||
], | ||
}, | ||
languageCode: { | ||
propDefinition: [ | ||
dataforseo, | ||
"languageCode", | ||
], | ||
}, | ||
waitForResults: { | ||
type: "boolean", | ||
label: "Wait for Results", | ||
description: "Wait for the results to be available. Not for use with Pipedream Connect.", | ||
default: true, | ||
optional: true, | ||
}, | ||
postbackUrl: { | ||
type: "string", | ||
label: "Postback URL", | ||
description: "The URL to receive the search results. Only applicable when \"Wait for Results\" = `FALSE`", | ||
optional: true, | ||
}, | ||
}, | ||
async run({ $ }) { | ||
let response; | ||
const context = $.context; | ||
const run = context | ||
? context.run | ||
: { | ||
runs: 1, | ||
}; | ||
|
||
if (run.runs === 1) { | ||
let postbackUrl = this.postbackUrl; | ||
if (context && this.waitForResults) { | ||
({ resume_url: postbackUrl } = $.flow.rerun(600000, null, 1)); | ||
} | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
response = await this.dataforseo.getAppStoreSearch({ | ||
$, | ||
data: [ | ||
{ | ||
keyword: this.keyword, | ||
location_code: this.locationCode, | ||
language_code: this.languageCode, | ||
postback_url: postbackUrl, | ||
}, | ||
], | ||
}); | ||
|
||
if (response.status_code !== 20000) { | ||
throw new ConfigurationError(`Error: ${response.status_message}`); | ||
} | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
if (response.tasks[0].status_code !== 20000 && response.tasks[0].status_code !== 20100) { | ||
throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); | ||
} | ||
} | ||
|
||
if (run.runs > 1) { | ||
response = run.callback_request.body; | ||
} | ||
|
||
$.export("$summary", `Successfully searched App Store for "${this.keyword}".`); | ||
return response; | ||
}, | ||
}; |
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
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
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
69 changes: 69 additions & 0 deletions
69
components/dataforseo/actions/get-bing-organic-results/get-bing-organic-results.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"; | ||
import { ConfigurationError } from "@pipedream/platform"; | ||
|
||
export default { | ||
key: "dataforseo-get-bing-organic-results", | ||
name: "Get Bing Organic Results", | ||
description: "Retrieve Bing organic search results for specified keywords. [See the documentation](https://docs.dataforseo.com/v3/serp/bing/organic/live/regular/?bash)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
dataforseo, | ||
keyword: { | ||
type: "string", | ||
label: "Keyword", | ||
description: "The keyword to search for", | ||
}, | ||
locationCode: { | ||
propDefinition: [ | ||
dataforseo, | ||
"locationCode", | ||
], | ||
}, | ||
languageCode: { | ||
propDefinition: [ | ||
dataforseo, | ||
"languageCode", | ||
], | ||
}, | ||
depth: { | ||
type: "integer", | ||
label: "Depth", | ||
description: "The parsing depth. Default: 100", | ||
max: 700, | ||
optional: true, | ||
}, | ||
maxCrawlPages: { | ||
type: "integer", | ||
label: "Max Crawl Pages", | ||
description: "The page crawl limit", | ||
max: 100, | ||
optional: true, | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.dataforseo.getBingOrganicResults({ | ||
$, | ||
data: [ | ||
{ | ||
keyword: this.keyword, | ||
location_code: this.locationCode, | ||
language_code: this.languageCode, | ||
depth: this.depth, | ||
max_crawl_pages: this.maxCrawlPages, | ||
}, | ||
], | ||
}); | ||
|
||
if (response.status_code !== 20000) { | ||
throw new ConfigurationError(`Error: ${response.status_message}`); | ||
} | ||
|
||
if (response.tasks[0].status_code !== 20000) { | ||
throw new ConfigurationError(`Error: ${response.tasks[0].status_message}`); | ||
} | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
$.export("$summary", `Successfully retrieved Bing organic results for "${this.keyword}".`); | ||
return response; | ||
}, | ||
}; |
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
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
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
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
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.