@pipedream/securitytrails
Version:
Pipedream SecurityTrails Components
42 lines (39 loc) • 925 B
JavaScript
import app from "../../securitytrails.app.mjs";
export default {
key: "securitytrails-get-domain-details",
name: "Get Domain Details",
description: "Returns the current data about the given hostname. [See the documentation](https://docs.securitytrails.com/reference/domain-details)",
version: "0.0.1",
type: "action",
props: {
app,
hostname: {
propDefinition: [
app,
"hostname",
],
},
},
methods: {
getDomainDetails({
hostname, ...args
} = {}) {
return this.app._makeRequest({
path: `/domain/${hostname}`,
...args,
});
},
},
async run({ $ }) {
const {
getDomainDetails,
hostname,
} = this;
const response = await getDomainDetails({
$,
hostname,
});
$.export("$summary", `Successfully retrieved details for hostname \`${response.hostname}\`.`);
return response;
},
};