line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Mattermost::V4::API::Resource::Brand; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
5
|
7
|
|
|
7
|
|
50
|
use Moo; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
42
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
extends 'WebService::Mattermost::V4::API::Resource'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub current { |
12
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
return $self->_get({ endpoint => 'image' }); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub upload { |
18
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
19
|
0
|
|
|
|
|
|
my $filename = shift; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return $self->_post({ |
22
|
|
|
|
|
|
|
endpoint => 'image', |
23
|
|
|
|
|
|
|
override_data_type => 'form', |
24
|
|
|
|
|
|
|
parameters => { |
25
|
|
|
|
|
|
|
image => { file => $filename }, |
26
|
|
|
|
|
|
|
}, |
27
|
|
|
|
|
|
|
view => 'Status', |
28
|
|
|
|
|
|
|
}); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=encoding UTF-8 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
WebService::Mattermost::V4::API::Resource::Brand - Wrapped API methods for the brand API endpoints. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
version 0.26 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 DESCRIPTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 USAGE |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
use WebService::Mattermost; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
my $mm = WebService::Mattermost->new({ |
56
|
|
|
|
|
|
|
authenticate => 1, |
57
|
|
|
|
|
|
|
username => 'email@address.com', |
58
|
|
|
|
|
|
|
password => 'passwordhere', |
59
|
|
|
|
|
|
|
base_url => 'https://my.mattermost.server.com/api/v4/', |
60
|
|
|
|
|
|
|
}); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
my $brand = $mm->api->brand; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 METHODS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=over 4 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item C<current()> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
L<Get brand image|https://api.mattermost.com/#tag/brand%2Fpaths%2F~1brand~1image%2Fget> |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Get the current brand image for your Mattermost server. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
my $response = $brand->current; |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item C<upload()> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L<Upload brand image|https://api.mattermost.com/#tag/brand%2Fpaths%2F~1brand~1image%2Fpost> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Set a new brand image for your Mattermost server. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
my $response = $brand->upload('/path/to/image.jpg'); |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=back |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 SEE ALSO |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=over 4 |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item L<Official "brand" API documentation|https://api.mattermost.com/#tag/brand> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=back |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 AUTHOR |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Mike Jones <mike@netsplit.org.uk> |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This software is Copyright (c) 2020 by Mike Jones. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
This is free software, licensed under: |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The MIT (X11) License |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=cut |
107
|
|
|
|
|
|
|
|