File Coverage

blib/lib/WebService/Mattermost/V4/API/Resource/ElasticSearch.pm
Criterion Covered Total %
statement 3 7 42.8
branch n/a
condition n/a
subroutine 1 3 33.3
pod 2 2 100.0
total 6 12 50.0


line stmt bran cond sub pod time code
1             package WebService::Mattermost::V4::API::Resource::ElasticSearch;
2:

3: # ABSTRACT: Wrapped API methods for the ElasticSearch API endpoints. 4:
5: use Moo;
6:
7: extends 'WebService::Mattermost::V4::API::Resource';
8:
9: ################################################################################
10:
11: sub test {
12: my $self = shift;
13:
14: return $self->_post({
15: endpoint => 'test',
16: view => 'Status',
17: });
18: }
19:
20: sub purge_indexes {
21: my $self = shift;
22:
23: return $self->_post({
24: endpoint => 'purge',
25: view => 'Status',
26: });
27: }
28:
29: ################################################################################
30:
31: 1;
32:
33: __END__
34:
35: =pod
36:
37: =encoding UTF-8
38:
39: =head1 NAME
40:
41: WebService::Mattermost::V4::API::Resource::ElasticSearch - Wrapped API methods for the ElasticSearch API endpoints.
42:
43: =head1 VERSION
44:
45: version 0.28
46:
47: =head1 DESCRIPTION
48:
49: =head2 USAGE
50:
51: use WebService::Mattermost;
52:
53: my $mm = WebService::Mattermost->new({
54: authenticate => 1,
55: username => 'email@address.com',
56: password => 'passwordhere',
57: base_url => 'https://my.mattermost.server.com/api/v4/',
58: });
59:
60: my $elasticsearch = $mm->api->elasticsearch;
61:
62: =head2 METHODS
63:
64: =over 4
65:
66: =item C<test()>
67:
68: my $response = $elasticsearch->test;
69:
70: =item C<purge_indexes()>
71:
72: my $response = $elasticsearch->purge_indexes;
73:
74: =back
75:
76: =head1 SEE ALSO
77:
78: =over 4
79:
80: =item L<https://api.mattermost.com/#tag/elasticsearch>
81:
82: Official "ElasticSearch" API documentation.
83:
84: =back
85:
86: =head1 AUTHOR
87:
88: Mike Jones <mike@netsplit.org.uk>
89:
90: =head1 COPYRIGHT AND LICENSE
91:
92: This software is Copyright (c) 2020 by Mike Jones.
93:
94: This is free software, licensed under:
95:
96: The MIT (X11) License
97:
98: =cut
99: