NAME

WebService::Mattermost::V4::API::Resource::Roles

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->roles;

METHODS

get_by_id()

Get a role

my $response = $resource->get_by_id('ID-HERE');
get_by_name()

Get a role

my $response = $resource->get_by_name('NAME-HERE');
update_by_id()

Patch a role

my $response = $resource->update_by_id('ID-HERE', {
    permissions => [ qw(
        PERMISSION-HERE
        ANOTHER-PERMISSION-HERE
    ) ],
});
get_by_names()

Get a list of roles by name

my $response = $resource->get_by_names([ qw(NAME-1-HERE NAME-2-HERE) ]);

AUTHOR

Mike Jones email:mike@netsplit.org.uk