| 1 | package WebService::Mattermost::V4::API::Resource::Analytics; | ||
| 2 | |||
| 3 | # ABSTRACT: Wrapped API methods for the analytics 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 get { | ||
| 12 | 1 | ▶ | my $self = shift; |
|
Subroutine
get: called CC=1 SCAR=0.0
Pod
documented
| |||
| 13 | 1 | my $args = shift; | |
| 14 | |||
| 15 | 1 | return $self->_get({ | |
| 16 | endpoint => 'old', | ||
| 17 | parameters => $args, | ||
| 18 | view => 'Analytics::Old', | ||
| 19 | }); | ||
| 20 | } | ||
| 21 | |||
| 22 | ################################################################################ | ||
| 23 | |||
| 24 | 12 | 1; | |
| 25 | |||
| 26 | __END__ | ||
| 27 | |||
| 28 | =pod | ||
| 29 | |||
| 30 | =encoding UTF-8 | ||
| 31 | |||
| 32 | =head1 NAME | ||
| 33 | |||
| 34 | WebService::Mattermost::V4::API::Resource::Analytics - Wrapped API methods for the analytics API endpoints. | ||
| 35 | |||
| 36 | =head1 VERSION | ||
| 37 | |||
| 38 | version 0.28 | ||
| 39 | |||
| 40 | =head1 DESCRIPTION | ||
| 41 | |||
| 42 | =head2 USAGE | ||
| 43 | |||
| 44 | use WebService::Mattermost; | ||
| 45 | |||
| 46 | my $mm = WebService::Mattermost->new({ | ||
| 47 | authenticate => 1, | ||
| 48 | username => 'me@somewhere.com', | ||
| 49 | password => 'hunter2', | ||
| 50 | base_url => 'https://my.mattermost.server.com/api/v4/', | ||
| 51 | }); | ||
| 52 | |||
| 53 | my $resource = $mm->api->analytics; | ||
| 54 | |||
| 55 | =head2 METHODS | ||
| 56 | |||
| 57 | =over 4 | ||
| 58 | |||
| 59 | =item C<get()> | ||
| 60 | |||
| 61 | L<Get analytics|https://api.mattermost.com/#tag/system%2Fpaths%2F~1analytics~1old%2Fget> | ||
| 62 | |||
| 63 | my $response = $resource->get({ | ||
| 64 | # Optional parameters: | ||
| 65 | name => 'standard', # 'post_counts_day', 'user_counts_with_posts_day', 'extra_counts' | ||
| 66 | team_id => 'TEAM-ID-HERE', | ||
| 67 | }); | ||
| 68 | |||
| 69 | =back | ||
| 70 | |||
| 71 | =head1 AUTHOR | ||
| 72 | |||
| 73 | Mike Jones <mike@netsplit.org.uk> | ||
| 74 | |||
| 75 | =head1 COPYRIGHT AND LICENSE | ||
| 76 | |||
| 77 | This software is Copyright (c) 2020 by Mike Jones. | ||
| 78 | |||
| 79 | This is free software, licensed under: | ||
| 80 | |||
| 81 | The MIT (X11) License | ||
| 82 | |||
| 83 | =cut | ||