line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: MailboxOrg::API::Blacklist |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# --- |
5
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_mailbox_api.pl |
6
|
|
|
|
|
|
|
# --- |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use v5.24; |
9
|
2
|
|
|
2
|
|
1034
|
|
|
2
|
|
|
|
|
7
|
|
10
|
|
|
|
|
|
|
use strict; |
11
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
38
|
|
12
|
2
|
|
|
2
|
|
8
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
76
|
|
13
|
|
|
|
|
|
|
use Moo; |
14
|
2
|
|
|
2
|
|
11
|
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
12
|
|
15
|
2
|
|
|
2
|
|
586
|
use API::MailboxOrg::Types qw(HashRefRestricted Boolean); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
18
|
|
16
|
2
|
|
|
2
|
|
2330
|
use Params::ValidationCompiler qw(validation_for); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
17
|
2
|
|
|
2
|
|
814
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
120
|
|
18
|
|
|
|
|
|
|
extends 'API::MailboxOrg::APIBase'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
with 'MooX::Singleton'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use feature 'signatures'; |
23
|
2
|
|
|
2
|
|
12
|
no warnings 'experimental::signatures'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
152
|
|
24
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
568
|
|
25
|
|
|
|
|
|
|
our $VERSION = '1.0.1'; # VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my %validators = ( |
28
|
|
|
|
|
|
|
'add' => validation_for( |
29
|
|
|
|
|
|
|
params => { |
30
|
|
|
|
|
|
|
mail => { type => Str, optional => 0 }, |
31
|
|
|
|
|
|
|
add_address => { type => Str, optional => 0 }, |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
), |
35
|
|
|
|
|
|
|
'del' => validation_for( |
36
|
|
|
|
|
|
|
params => { |
37
|
|
|
|
|
|
|
mail => { type => Str, optional => 0 }, |
38
|
|
|
|
|
|
|
delete_address => { type => Str, optional => 0 }, |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
), |
42
|
|
|
|
|
|
|
'list' => validation_for( |
43
|
|
|
|
|
|
|
params => { |
44
|
|
|
|
|
|
|
mail => { type => Str, optional => 0 }, |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
}, |
47
|
|
|
|
|
|
|
), |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
my $validator = $validators{'add'}; |
53
|
0
|
|
|
0
|
1
|
|
%params = $validator->(%params) if $validator; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
|
55
|
0
|
0
|
|
|
|
|
my %opt = (needs_auth => 1); |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
return $self->_request( 'mail.blacklist.add', \%params, \%opt ); |
58
|
|
|
|
|
|
|
} |
59
|
0
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
my $validator = $validators{'del'}; |
61
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
62
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
my %opt = (needs_auth => 1); |
64
|
0
|
0
|
|
|
|
|
|
65
|
|
|
|
|
|
|
return $self->_request( 'mail.blacklist.del', \%params, \%opt ); |
66
|
0
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
my $validator = $validators{'list'}; |
69
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
70
|
|
|
|
|
|
|
|
71
|
0
|
|
|
0
|
1
|
|
my %opt = (needs_auth => 1); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
|
73
|
0
|
0
|
|
|
|
|
return $self->_request( 'mail.blacklist.list', \%params, \%opt ); |
74
|
|
|
|
|
|
|
} |
75
|
0
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
0
|
|
|
|
|
|
1; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=pod |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=encoding UTF-8 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 NAME |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
API::MailboxOrg::API::Blacklist - MailboxOrg::API::Blacklist |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 VERSION |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
version 1.0.1 |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SYNOPSIS |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
use API::MailboxOrg; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
my $user = '1234abc'; |
97
|
|
|
|
|
|
|
my $password = '1234abc'; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
my $api = API::MailboxOrg->new( |
100
|
|
|
|
|
|
|
user => $user, |
101
|
|
|
|
|
|
|
password => $password, |
102
|
|
|
|
|
|
|
); |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 METHODS |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 add |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Adds an address to the blacklist |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Available for admin, account, domain, mail |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Parameters: |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=over 4 |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item * mail |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item * add_address |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=back |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
returns: array |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
$api->blacklist->add(%params); |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head2 del |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Deletes an address from the blacklist |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Available for admin, account, domain, mail |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Parameters: |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=over 4 |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=item * mail |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=item * delete_address |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=back |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
returns: array |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
$api->blacklist->del(%params); |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 list |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Lists all blacklist entries |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
Available for admin, account, domain, mail |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
Parameters: |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=over 4 |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=item * mail |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=back |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
returns: array |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
$api->blacklist->list(%params); |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head1 AUTHOR |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
Renee Baecker <reneeb@cpan.org> |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Renee Baecker. |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
This is free software, licensed under: |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=cut |