Skip to content

Commit e7dd5ab

Browse files
authored
New Components - email_verifier_api (#15503)
* new component * pnpm-lock.yaml
1 parent d18cfcb commit e7dd5ab

File tree

4 files changed

+64
-7
lines changed

4 files changed

+64
-7
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import emailVerifierApi from "../../email_verifier_api.app.mjs";
2+
3+
export default {
4+
key: "email_verifier_api-verify-email",
5+
name: "Verify Email",
6+
description: "Verify an email address with Email Verifier API. [See the documentation](https://www.emailverifierapi.com/app/v2-api-documentation/)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
emailVerifierApi,
11+
email: {
12+
type: "string",
13+
label: "Email",
14+
description: "The email address to verify",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.emailVerifierApi.verifyEmail({
19+
$,
20+
email: this.email,
21+
});
22+
$.export("$summary", `Successfully retrieved verification data for email address \`${this.email}\``);
23+
return response;
24+
},
25+
};
Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
1+
import { axios } from "@pipedream/platform";
2+
13
export default {
24
type: "app",
35
app: "email_verifier_api",
46
propDefinitions: {},
57
methods: {
6-
// this.$auth contains connected account data
7-
authKeys() {
8-
console.log(Object.keys(this.$auth));
8+
_baseUrl() {
9+
return "https://emailverifierapi.com/v2/";
10+
},
11+
_makeRequest({
12+
$ = this,
13+
params,
14+
...opts
15+
}) {
16+
return axios($, {
17+
url: this._baseUrl(),
18+
params: {
19+
...params,
20+
apiKey: this.$auth.api_key,
21+
},
22+
...opts,
23+
});
24+
},
25+
verifyEmail({
26+
$, email,
27+
}) {
28+
return this._makeRequest({
29+
$,
30+
params: {
31+
email,
32+
},
33+
});
934
},
1035
},
11-
};
36+
};

components/email_verifier_api/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/email_verifier_api",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream Email Verifier Api Components",
55
"main": "email_verifier_api.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.0.3"
1417
}
15-
}
18+
}

pnpm-lock.yaml

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)