NAME
WebService::Mattermost::V4::API::Resource::Channel::Member - Wrapped API methods for the channel member API endpoints.
VERSION
version 0.30
DESCRIPTION
Channel member related API calls.
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_member;
Optionally, you can set global channel and user IDs, and not pass those arguments to every method:
$resource->channel_id('CHANNEL-ID-HERE');
$resource->user_id('USER-ID-HERE');
This would make the get()
call look like:
my $response = $resource->get();
And the add()
one look like:
my $response = $resource->add({
user_id => '...',
post_root_id => '...',
});
METHODS
add()
-
my $response = $resource->add('CHANNEL-ID-HERE', { # Required parameters: user_id => '...', # Optional parameters: post_root_id => '...', });
all()
-
my $response = $resource->all('CHANNEL-ID-HERE');
get()
-
my $response = $resource->get('CHANNEL-ID-HERE', 'USER-ID-HERE');
get_many()
remove()
-
my $response = $resource->remove('CHANNEL-ID-HERE', 'USER-ID-HERE');
set_notify_props()
-
my $response = $resource->set_notify_props('CHANNEL-ID-HERE', 'USER-ID-HERE', { email => \1, # or \0 for false push => \1, desktop => \1, mark_unread => \1, });
set_roles()
-
my $response = $resource->set_roles('CHANNEL-ID-HERE', 'USER-ID-HERE', { # Required parameters: roles => 'SPACE DELIMITED ROLES', });
set_scheme_roles()
-
Update the scheme-derived roles of a channel member
my $response = $resource->set_scheme_roles('CHANNEL-ID-HERE', 'USER-ID-HERE', { # Required parameters: scheme_admin => \0, # false scheme_user => \1, # or true });
set_viewed()
-
my $response = $resource->set_viewed('CHANNEL-ID-HERE', 'USER-ID-HERE', { # Optional parameters: prev_channel_id => '...', });
AUTHOR
Mike Jones <mike@netsplit.org.uk>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2023 by Mike Jones.
This is free software, licensed under:
The MIT (X11) License