NAME
WebService::Mattermost::V4::API::Resource::Team - Wrapped API methods for the team API endpoints.
VERSION
version 0.30
DESCRIPTION
API methods relating to a single team by ID or name.
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->team;
METHODS
get()
-
my $response = $resource->get('TEAM-ID-HERE');
get_by_name()
-
my $response = $resource->get_by_name('TEAM-NAME-HERE');
update()
-
my $response = $resource->update('TEAM-ID-HERE', { # Required parameters: display_name => '...', description => '...', company_name => '...', allowed_domains => '...', invite_id => '...', });
delete()
-
my $response = $resource->delete('TEAM-ID-HERE');
patch()
-
my $response = $resource->patch('TEAM-ID-HERE', { # Optional parameters: display_name => '...', description => '...', company_name => '...', allowed_domains => '...', invite_id => '...', });
exists_by_name()
-
my $response = $resource->exists_by_name('TEAM-NAME-HERE');
members()
-
my $response = $resource->members('TEAM-ID-HERE');
members_by_ids()
-
my $response = $resource->members_by_ids('TEAM-ID-HERE', [ qw( USER-ID-HERE USER-ID-HERE USER-ID-HERE ) ]);
add_member()
-
my $response = $resource->add_member('TEAM-ID-HERE', 'USER-ID-HERE');
add_members()
-
my $response = $resource->add_members('TEAM-ID-HERE', [ { user_id => 'USER-ID-HERE', roles => 'ROLES-HERE' }, { user_id => 'USER-ID-HERE', roles => 'ROLES-HERE' }, { user_id => 'USER-ID-HERE', roles => 'ROLES-HERE' }, ]);
remove_member()
-
my $response = $resource->remove_member('TEAM-ID-HERE', 'USER-ID-HERE');
stats()
-
my $response = $resource->stats('TEAM-ID-HERE');
get_icon()
-
my $response = $resource->get_icon('TEAM-ID-HERE');
set_icon()
-
my $response = $resource->set_icon('TEAM-ID-HERE', '/path/to/icon/here.png');
remove_icon()
-
my $response = $resource->remove_icon('TEAM-ID-HERE');
invite_by_emails()
-
Invite users to the team by email
my $response = $resource->invite_by_emails('TEAM-ID-HERE', [ EMAIL-HERE EMAIL-HERE EMAIL-HERE ]);
import_from_existing()
-
Import a Team from other application
my $response = $resource->import_from_existing('TEAM-ID-HERE', { filename => 'IMPORT-FILENAME', filesize => 'filesize', importFrom => '...', });
search_posts()
-
my $response = $resource->search_posts('TEAM-ID-HERE', { # Required parameters: terms => '...', # Optional parameters is_or_search => \1, # or \0 for false time_zone_offset => 0, include_deleted_channels => \1, # or \0 for false page => 0, per_page => 60, });
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