WebService::Mattermost - Perl client library for Mattermost's REST API and websocket gateway
version 0.24
WebService::Mattermost provides websocket and REST API integrations for Mattermost, and supercedes Net::Mattermost::Bot, replacing all functionality.
Net::Mattermost::Bot
See the repository for more information.
See WebService::Mattermost::V4::API for all available API integrations.
use WebService::Mattermost; my $mm = WebService::Mattermost->new({ # Required base_url => 'https://my.mattermost.server.com/api/v4/', # Optional authenticate => 1, # Trigger a "login" to the Mattermost server debug => 1, # Debug via Mojo::Log username => 'MyUsername', # Login credentials for the server password => 'MyPassword', }); # Example REST API calls my $emojis = $mm->api->emoji->custom; my $user = $mm->api->users->search_by_email('someone@somewhere.com');
Where appropriate, a response object or list of objects may be returned. You can access these via (using the custom emoji search above as an example):
# First item only my $item = $emojis->item; # All items my $items = $emoji->items;
This class has no public methods.
base_url
The base URL of your Mattermost server. Should contain the /api/v4/ section.
/api/v4/
username
An optional username for logging into Mattermost.
password
An optional password for logging into Mattermost.
authenticate
If this value is true, an authentication attempt will be made against your Mattermost server.
auth_token
Set after a successful login and used for authentication for the successive API calls.
api
A containing class for the available resources for API version 4.
Plain Mattermost API documentation.
Containing object for resources for version 4 of the Mattermost REST API. Accessible from this class via the api attribute.
Mike Jones <mike@netsplit.org.uk>
This software is Copyright (c) 2020 by Mike Jones.
This is free software, licensed under:
The MIT (X11) License
To install WebService::Mattermost, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Mattermost
CPAN shell
perl -MCPAN -e shell install WebService::Mattermost
For more information on module installation, please visit the detailed CPAN module installation guide.