NAME
WebService::Mattermost::V4::API::Resource::Channels - Wrapped API methods for the channels API endpoints.
VERSION
version 0.29
DESCRIPTION
USAGE
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;
METHODS
create()
-
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
Create a direct message channel between two users. Two user IDs must be provided.
my $response = $resource->create_group_channel([ qw( user_1_id_here user_2_id_here user_3_id_here ) ]);
AUTHOR
Mike Jones <mike@netsplit.org.uk>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2020 by Mike Jones.
This is free software, licensed under:
The MIT (X11) License