line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Monitis::SubAccounts; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
5
|
|
|
|
|
|
|
require Carp; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use base 'Monitis'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
685
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub add { |
10
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my @mandatory = qw/firstName lastName email password group/; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory); |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
return $self->api_post('addSubAccount' => $params); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub get { |
20
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
return $self->api_get('subAccounts'); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub pages { |
26
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
return $self->api_get('subAccountPages'); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub add_pages { |
32
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
my @mandatory = qw/userId pageNames/; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory); |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
return $self->api_post('addPagesToSubAccount' => $params); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub delete_pages { |
42
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
my @mandatory = qw/userId pageNames/; |
45
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory); |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
return $self->api_post('deletePagesFromSubAccount' => $params); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub delete { |
51
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
my @mandatory = qw/userId/; |
54
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory); |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
return $self->api_post('deleteSubAccount' => $params); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
__END__ |