NAME
WebService::Mattermost::V4::API::Resource::Channel - Wrapped API methods for the channel API endpoints.
VERSION
version 0.29
DESCRIPTION
USAGE
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->channel;
Optionally, you can set a global channel ID and not pass that argument to every method:
$resource->id('CHANNEL-ID-HERE');
This would make the get()
call look like:
my $response = $resource->get();
METHODS
get()
-
my $response = $resource->get('CHANNEL-ID-HERE');
update()
-
my $response = $resource->update('CHANNEL-ID-HERE', { # Optional parameters name => '...', display_name => '...', purpose => '...', header => '...', type => '...', });
delete()
-
my $response = $resource->delete('CHANNEL-ID-HERE');
patch()
-
my $response = $resource->patch('CHANNEL-ID-HERE', { # Optional parameters name => '...', display_name => '...', purpose => '...', header => '...', });
toggle_private_status()
-
Convert a channel from public to private
my $response = $resource->toggle_private_status('CHANNEL-ID-HERE');
restore()
-
my $response = $resource->restore('CHANNEL-ID-HERE');
stats()
-
my $response = $resource->stats('CHANNEL-ID-HERE');
pinned()
-
my $response = $resource->pinned('CHANNEL-ID-HERE');
set_scheme()
-
my $response = $resource->set_scheme('CHANNEL-ID-HERE', { # Required parameters: scheme_id => '...', });
posts()
-
my $response = $resource->posts('CHANNEL-ID-HERE', { # Optional parameters: page => 0, per_page => 60, since => 'UNIX-TIMESTAMP', # milliseconds before => 'POST-ID-HERE', after => 'POST-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