Skip to content

Commit edaa38c

Browse files
authored
Added actions (#13606)
1 parent 0b3f359 commit edaa38c

File tree

6 files changed

+396
-8
lines changed

6 files changed

+396
-8
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import app from "../../genderapi_io.app.mjs";
2+
3+
export default {
4+
key: "genderapi_io-email-to-gender",
5+
name: "Email to Gender",
6+
description: "Send an Email to Gender request to GenderAPI. [See the documentation](https://www.genderapi.io/api-documentation#single-email)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
email: {
12+
propDefinition: [
13+
app,
14+
"email",
15+
],
16+
},
17+
country: {
18+
propDefinition: [
19+
app,
20+
"country",
21+
],
22+
},
23+
},
24+
async run({ $ }) {
25+
const response = await this.app.emailToGender({
26+
$,
27+
params: {
28+
email: this.email,
29+
country: this.country,
30+
},
31+
});
32+
33+
$.export("$summary", `Successfully sent the request. Result: '${response.gender}'`);
34+
35+
return response;
36+
},
37+
};
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import app from "../../genderapi_io.app.mjs";
2+
3+
export default {
4+
key: "genderapi_io-name-to-gender",
5+
name: "Name to Gender",
6+
description: "Send a Name to Gender request to GenderAPI. [See the documentation](https://www.genderapi.io/api-documentation#single-name)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
name: {
12+
propDefinition: [
13+
app,
14+
"name",
15+
],
16+
},
17+
country: {
18+
propDefinition: [
19+
app,
20+
"country",
21+
],
22+
},
23+
},
24+
async run({ $ }) {
25+
const response = await this.app.nameToGender({
26+
$,
27+
params: {
28+
name: this.name,
29+
country: this.country,
30+
},
31+
});
32+
33+
$.export("$summary", `Successfully sent the request. Result: '${response.gender}'`);
34+
35+
return response;
36+
},
37+
};
Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
export default {
2+
COUNTRY_CODES: [
3+
"CR",
4+
"TG",
5+
"TJ",
6+
"ZA",
7+
"IM",
8+
"PE",
9+
"LC",
10+
"CH",
11+
"RU",
12+
"MP",
13+
"CK",
14+
"SI",
15+
"AU",
16+
"KR",
17+
"IT",
18+
"FI",
19+
"GF",
20+
"SC",
21+
"SX",
22+
"TT",
23+
"TK",
24+
"MY",
25+
"SY",
26+
"MN",
27+
"TF",
28+
"KP",
29+
"AM",
30+
"DZ",
31+
"UY",
32+
"TD",
33+
"DJ",
34+
"BI",
35+
"MK",
36+
"MU",
37+
"LI",
38+
"NU",
39+
"GR",
40+
"GY",
41+
"CG",
42+
"NF",
43+
"ML",
44+
"AX",
45+
"GM",
46+
"SA",
47+
"CX",
48+
"BH",
49+
"NE",
50+
"BN",
51+
"MF",
52+
"CD",
53+
"DK",
54+
"BJ",
55+
"ME",
56+
"SJ",
57+
"BO",
58+
"JO",
59+
"CV",
60+
"VE",
61+
"CI",
62+
"UZ",
63+
"TN",
64+
"IS",
65+
"EH",
66+
"TM",
67+
"GA",
68+
"LS",
69+
"TZ",
70+
"AT",
71+
"LT",
72+
"NP",
73+
"BG",
74+
"IL",
75+
"GU",
76+
"PK",
77+
"PT",
78+
"HR",
79+
"VU",
80+
"PF",
81+
"BM",
82+
"MR",
83+
"GE",
84+
"HU",
85+
"TW",
86+
"MM",
87+
"VG",
88+
"YE",
89+
"SR",
90+
"PN",
91+
"VA",
92+
"PR",
93+
"KW",
94+
"SE",
95+
"GB",
96+
"UM",
97+
"VN",
98+
"CF",
99+
"PA",
100+
"VC",
101+
"JP",
102+
"IR",
103+
"AF",
104+
"LY",
105+
"MZ",
106+
"RO",
107+
"QA",
108+
"CM",
109+
"GG",
110+
"BY",
111+
"SD",
112+
"BQ",
113+
"MO",
114+
"KY",
115+
"AR",
116+
"BR",
117+
"ZW",
118+
"NR",
119+
"NZ",
120+
"AW",
121+
"FJ",
122+
"ID",
123+
"SV",
124+
"CN",
125+
"FM",
126+
"HT",
127+
"CC",
128+
"RW",
129+
"BA",
130+
"TL",
131+
"JM",
132+
"KM",
133+
"KE",
134+
"WS",
135+
"TO",
136+
"PY",
137+
"SH",
138+
"CY",
139+
"GH",
140+
"MA",
141+
"SG",
142+
"LK",
143+
"PH",
144+
"SM",
145+
"WF",
146+
"TR",
147+
"PS",
148+
"BZ",
149+
"CU",
150+
"TV",
151+
"AD",
152+
"SB",
153+
"DM",
154+
"LR",
155+
"OM",
156+
"SO",
157+
"DO",
158+
"AL",
159+
"BL",
160+
"FR",
161+
"GW",
162+
"MS",
163+
"BB",
164+
"CA",
165+
"MG",
166+
"KH",
167+
"LA",
168+
"GP",
169+
"BV",
170+
"HN",
171+
"TH",
172+
"DE",
173+
"LB",
174+
"KZ",
175+
"AS",
176+
"EC",
177+
"NO",
178+
"AO",
179+
"FK",
180+
"ET",
181+
"GS",
182+
"MD",
183+
"AG",
184+
"BE",
185+
"MV",
186+
"SZ",
187+
"CZ",
188+
"CL",
189+
"BT",
190+
"NL",
191+
"EG",
192+
"MQ",
193+
"SN",
194+
"FO",
195+
"EE",
196+
"AQ",
197+
"ST",
198+
"KN",
199+
"BW",
200+
"MH",
201+
"NI",
202+
"PG",
203+
"VI",
204+
"IQ",
205+
"KG",
206+
"US",
207+
"ZM",
208+
"MC",
209+
"GI",
210+
"NC",
211+
"GT",
212+
"BF",
213+
"YT",
214+
"LU",
215+
"UA",
216+
"IE",
217+
"LV",
218+
"GD",
219+
"MW",
220+
"BS",
221+
"AZ",
222+
"SK",
223+
"GQ",
224+
"TC",
225+
"RE",
226+
"IN",
227+
"ES",
228+
"GL",
229+
"KI",
230+
"HK",
231+
"CO",
232+
"SS",
233+
"RS",
234+
"IO",
235+
"NG",
236+
"UG",
237+
"CW",
238+
"SL",
239+
"ER",
240+
"JE",
241+
"AE",
242+
"HM",
243+
"PM",
244+
"BD",
245+
"MT",
246+
"AI",
247+
"GN",
248+
"PW",
249+
"NA",
250+
"MX",
251+
"PL",
252+
],
253+
};

0 commit comments

Comments
 (0)