line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: MailboxOrg::API::Base |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# --- |
5
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_mailbox_api.pl |
6
|
|
|
|
|
|
|
# --- |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use v5.24; |
9
|
2
|
|
|
2
|
|
1040
|
|
|
2
|
|
|
|
|
6
|
|
10
|
|
|
|
|
|
|
use strict; |
11
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
38
|
|
12
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
43
|
|
13
|
|
|
|
|
|
|
use Moo; |
14
|
2
|
|
|
2
|
|
9
|
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
15
|
2
|
|
|
2
|
|
598
|
use API::MailboxOrg::Types qw(HashRefRestricted Boolean); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
16
|
|
16
|
2
|
|
|
2
|
|
2253
|
use Params::ValidationCompiler qw(validation_for); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
12
|
|
17
|
2
|
|
|
2
|
|
779
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
119
|
|
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
|
|
|
|
|
154
|
|
24
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
543
|
|
25
|
|
|
|
|
|
|
our $VERSION = '1.0.1'; # VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my %validators = ( |
28
|
|
|
|
|
|
|
'auth' => validation_for( |
29
|
|
|
|
|
|
|
params => { |
30
|
|
|
|
|
|
|
user => { type => Str, optional => 0 }, |
31
|
|
|
|
|
|
|
pass => { type => Str, optional => 0 }, |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
), |
35
|
|
|
|
|
|
|
'search' => validation_for( |
36
|
|
|
|
|
|
|
params => { |
37
|
|
|
|
|
|
|
query => { type => Str, optional => 0 }, |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
), |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my $validator = $validators{'auth'}; |
46
|
0
|
|
|
0
|
1
|
|
%params = $validator->(%params) if $validator; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
|
48
|
0
|
0
|
|
|
|
|
my %opt = (); |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
return $self->_request( 'auth', \%params, \%opt ); |
51
|
|
|
|
|
|
|
} |
52
|
0
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $validator = $validators{'deauth'}; |
54
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
55
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
my %opt = (); |
57
|
0
|
0
|
|
|
|
|
|
58
|
|
|
|
|
|
|
return $self->_request( 'deauth', \%params, \%opt ); |
59
|
0
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
my $validator = $validators{'search'}; |
62
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
0
|
1
|
|
my %opt = (); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
|
66
|
0
|
0
|
|
|
|
|
return $self->_request( 'search', \%params, \%opt ); |
67
|
|
|
|
|
|
|
} |
68
|
0
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=pod |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=encoding UTF-8 |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 NAME |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
API::MailboxOrg::API::Base - MailboxOrg::API::Base |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 VERSION |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
version 1.0.1 |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 SYNOPSIS |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
use API::MailboxOrg; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
my $user = '1234abc'; |
90
|
|
|
|
|
|
|
my $password = '1234abc'; |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
my $api = API::MailboxOrg->new( |
93
|
|
|
|
|
|
|
user => $user, |
94
|
|
|
|
|
|
|
password => $password, |
95
|
|
|
|
|
|
|
); |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 METHODS |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 auth |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Performs a login (Authentication) |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Parameters: |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=over 4 |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item * user |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item * pass |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=back |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
returns: array |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
$api->base->auth(%params); |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head2 deauth |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Performs a logout |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
returns: boolean |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
$api->base->deauth(%params); |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 search |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Searches in accounts, domains and e-mails |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Parameters: |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=over 4 |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=item * query |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=back |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
returns: array |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
$api->base->search(%params); |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 AUTHOR |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Renee Baecker <reneeb@cpan.org> |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Renee Baecker. |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
This is free software, licensed under: |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=cut |