WebService::Mattermost::V4::API::Resource::Channels - Wrapped API methods for the channels API endpoints.
version 0.23
use WebService::Mattermost; my $mm = WebService::Mattermost->new({ authenticate => 1, username => 'me@somewhere.com', password => 'hunter2', base_url => 'https://my.mattermost.server.com/api/v4/', }); my $resource = $mm->api->channels;
create()
Create a channel
Create a public or private channel.
my $response = $resource->create({ # Required arguments type => 'P', # P for private, O for public team_id => '1234abcd', name => 'my-new-channel', display_name => 'MyNewChannel', # Optional arguments purpose => 'A channel for testing', header => 'Channel topic', });
create_direct_channel()
Create a direct message channel
Create a direct message channel between two users. Two user IDs must be provided.
my $response = $resource->create_direct_channel([ qw( user_1_id_here user_2_id_here ) ]);
create_group_channel()
Create a group message channel
my $response = $resource->create_group_channel([ qw( user_1_id_here user_2_id_here user_3_id_here ) ]);
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.