Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import ip2location from "../../ip2location_io.app.mjs";

export default {
key: "ip2location_io-lookup-hosted-domain",
name: "Lookup Hosted Domain",
description: "Retrieve the list of hosted domains on an IP Address. [See the docs here](https://www.ip2location.io/ip2whois-domains-documentation)",
version: "0.0.1",
type: "action",
props: {
ip2location,
ip: {
type: "string",
label: "IP Address",
description: "IP address (IPv4 or IPv6) to lookup",
},
format: {
propDefinition: [
ip2location,
"format",
],
},
page: {
type: "integer",
label: "Page",
description: "Pagination result returns of the hosted domains. If unspecified, 1st page will be used.",
optional: true,
},
},
async run({ $ }) {
const response = await this.ip2location.lookupHostedDomain({
params: {
ip: this.ip,
format: this.format,
page: this.page,
},
});

if (response) {
$.export("$summary", `Successfully retrieved hosted domains about IP ${this.ip}.`);
}

return response;
},
};

Check failure on line 44 in components/ip2location_io/actions/lookup-hosted-domain/lookup-hosted-domain.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Newline required at end of file but not found
6 changes: 6 additions & 0 deletions components/ip2location_io/ip2location_io.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,11 @@ export default {
...args,
});
},
lookupHostedDomain(args = {}) {
return this._makeRequest({
url: "https://domains.ip2whois.com/domains",
...args,
});
},
},
};
2 changes: 1 addition & 1 deletion components/ip2location_io/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/ip2location_io",
"version": "0.1.0",
"version": "0.2.0",
"description": "Pipedream IP2Location.io Components",
"main": "ip2location_io.app.mjs",
"keywords": [
Expand Down
Loading