File tree Expand file tree Collapse file tree 3 files changed +59
-6
lines changed
components/email_verifier_api Expand file tree Collapse file tree 3 files changed +59
-6
lines changed Original file line number Diff line number Diff line change 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+ } ;
Original file line number Diff line number Diff line change 1+ import { axios } from "@pipedream/platform" ;
2+
13export 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+ } ;
Original file line number Diff line number Diff line change 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" : [
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+ }
You can’t perform that action at this time.
0 commit comments