line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: MailboxOrg::API::Mailinglist |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# --- |
5
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_mailbox_api.pl |
6
|
|
|
|
|
|
|
# --- |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use v5.24; |
9
|
2
|
|
|
2
|
|
989
|
|
|
2
|
|
|
|
|
5
|
|
10
|
|
|
|
|
|
|
use strict; |
11
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
34
|
|
12
|
2
|
|
|
2
|
|
7
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
42
|
|
13
|
|
|
|
|
|
|
use Moo; |
14
|
2
|
|
|
2
|
|
8
|
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
15
|
2
|
|
|
2
|
|
565
|
use API::MailboxOrg::Types qw(HashRefRestricted Boolean); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
18
|
|
16
|
2
|
|
|
2
|
|
2049
|
use Params::ValidationCompiler qw(validation_for); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
14
|
|
17
|
2
|
|
|
2
|
|
692
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
121
|
|
18
|
|
|
|
|
|
|
extends 'API::MailboxOrg::APIBase'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
with 'MooX::Singleton'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use feature 'signatures'; |
23
|
2
|
|
|
2
|
|
10
|
no warnings 'experimental::signatures'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
159
|
|
24
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
742
|
|
25
|
|
|
|
|
|
|
our $VERSION = '1.0.2'; # VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my %validators = ( |
28
|
|
|
|
|
|
|
'add' => validation_for( |
29
|
|
|
|
|
|
|
params => { |
30
|
|
|
|
|
|
|
mailinglist => { type => Str, optional => 0 }, |
31
|
|
|
|
|
|
|
password => { type => Str, optional => 0 }, |
32
|
|
|
|
|
|
|
account => { type => Str, optional => 0 }, |
33
|
|
|
|
|
|
|
adminmail => { type => Str, optional => 1 }, |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
), |
37
|
|
|
|
|
|
|
'del' => validation_for( |
38
|
|
|
|
|
|
|
params => { |
39
|
|
|
|
|
|
|
mailinglist => { type => Str, optional => 0 }, |
40
|
|
|
|
|
|
|
account => { type => Str, optional => 0 }, |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
), |
44
|
|
|
|
|
|
|
'get' => validation_for( |
45
|
|
|
|
|
|
|
params => { |
46
|
|
|
|
|
|
|
mailinglist => { type => Str, optional => 0 }, |
47
|
|
|
|
|
|
|
account => { type => Str, optional => 0 }, |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
}, |
50
|
|
|
|
|
|
|
), |
51
|
|
|
|
|
|
|
'list' => validation_for( |
52
|
|
|
|
|
|
|
params => { |
53
|
|
|
|
|
|
|
account => { type => Str, optional => 0 }, |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
}, |
56
|
|
|
|
|
|
|
), |
57
|
|
|
|
|
|
|
'set' => validation_for( |
58
|
|
|
|
|
|
|
params => { |
59
|
|
|
|
|
|
|
mailinglist => { type => Str, optional => 0 }, |
60
|
|
|
|
|
|
|
account => { type => Str, optional => 0 }, |
61
|
|
|
|
|
|
|
password => { type => Str, optional => 1 }, |
62
|
|
|
|
|
|
|
adminmail => { type => Str, optional => 1 }, |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
}, |
65
|
|
|
|
|
|
|
), |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
my $validator = $validators{'add'}; |
71
|
0
|
|
|
0
|
1
|
|
%params = $validator->(%params) if $validator; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
|
73
|
0
|
0
|
|
|
|
|
my %opt = (needs_auth => 1); |
74
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
return $self->_request( 'mailinglist.add', \%params, \%opt ); |
76
|
|
|
|
|
|
|
} |
77
|
0
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
my $validator = $validators{'del'}; |
79
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
80
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
my %opt = (needs_auth => 1); |
82
|
0
|
0
|
|
|
|
|
|
83
|
|
|
|
|
|
|
return $self->_request( 'mailinglist.del', \%params, \%opt ); |
84
|
0
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
0
|
|
|
|
|
|
my $validator = $validators{'get'}; |
87
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
88
|
|
|
|
|
|
|
|
89
|
0
|
|
|
0
|
1
|
|
my %opt = (); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
|
|
91
|
0
|
0
|
|
|
|
|
return $self->_request( 'mailinglist.get', \%params, \%opt ); |
92
|
|
|
|
|
|
|
} |
93
|
0
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
my $validator = $validators{'list'}; |
95
|
0
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
my %opt = (needs_auth => 1); |
98
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
99
|
0
|
|
|
|
|
|
return $self->_request( 'mailinglist.list', \%params, \%opt ); |
100
|
0
|
0
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
0
|
|
|
|
|
|
my $validator = $validators{'set'}; |
103
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
104
|
0
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
my %opt = (needs_auth => 1); |
106
|
|
|
|
|
|
|
|
107
|
0
|
|
|
0
|
1
|
|
return $self->_request( 'mailinglist.set', \%params, \%opt ); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
108
|
0
|
|
|
|
|
|
} |
109
|
0
|
0
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
0
|
|
|
|
|
|
1; |
112
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=pod |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=encoding UTF-8 |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 NAME |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
API::MailboxOrg::API::Mailinglist - MailboxOrg::API::Mailinglist |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head1 VERSION |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
version 1.0.2 |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head1 SYNOPSIS |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
use API::MailboxOrg; |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
my $user = '1234abc'; |
131
|
|
|
|
|
|
|
my $password = '1234abc'; |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
my $api = API::MailboxOrg->new( |
134
|
|
|
|
|
|
|
user => $user, |
135
|
|
|
|
|
|
|
password => $password, |
136
|
|
|
|
|
|
|
); |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head1 METHODS |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head2 add |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Adds a mailing list |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
Available for admin, account |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Parameters: |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=over 4 |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=item * mailinglist |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=item * password |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=item * account |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=item * adminmail |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=back |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
returns: boolean |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
$api->mailinglist->add(%params); |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head2 del |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
Deletes a mailing list |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
Available for admin, account |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
Parameters: |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=over 4 |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=item * mailinglist |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=item * account |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=back |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
returns: boolean |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
$api->mailinglist->del(%params); |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head2 get |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
###short### |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
Parameters: |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=over 4 |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=item * mailinglist |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=item * account |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
=back |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
returns: array |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
$api->mailinglist->get(%params); |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=head2 list |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
Returns all lists of the account |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
Available for admin, account |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
Parameters: |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=over 4 |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
=item * account |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=back |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
returns: array |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
$api->mailinglist->list(%params); |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
=head2 set |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
Edits a mailing list |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
Available for admin, account |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
Parameters: |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
=over 4 |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=item * mailinglist |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
=item * account |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
=item * password |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
=item * adminmail |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
=back |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
returns: boolean |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
$api->mailinglist->set(%params); |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
=head1 AUTHOR |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
Renee Baecker <reneeb@cpan.org> |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Renee Baecker. |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
This is free software, licensed under: |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
=cut |