| 1 | package WebService::Mattermost::V4::API::Resource::ElasticSearch; | ||
| 2 | |||
| 3 | # ABSTRACT: Wrapped API methods for the ElasticSearch API endpoints. | ||
| 4 | |||
| 5 | 12 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 12 | extends 'WebService::Mattermost::V4::API::Resource'; | |
| 8 | |||
| 9 | ################################################################################ | ||
| 10 | |||
| 11 | sub test { | ||
| 12 | 0 | ▶ | my $self = shift; |
|
Subroutine
test: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 13 | |||
| 14 | 0 | return $self->_post({ | |
| 15 | endpoint => 'test', | ||
| 16 | view => 'Status', | ||
| 17 | }); | ||
| 18 | } | ||
| 19 | |||
| 20 | sub purge_indexes { | ||
| 21 | 0 | ▶ | my $self = shift; |
|
Subroutine
purge_indexes: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 22 | |||
| 23 | 0 | return $self->_post({ | |
| 24 | endpoint => 'purge', | ||
| 25 | view => 'Status', | ||
| 26 | }); | ||
| 27 | } | ||
| 28 | |||
| 29 | ################################################################################ | ||
| 30 | |||
| 31 | 12 | 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 | ||