From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

WebService::Mattermost::V4::API::Resource::Webhook::Outgoing - Wrapped API methods for the outgoing webhook API endpoints.

VERSION

version 0.31

DESCRIPTION

USAGE

my $mm = WebService::Mattermost->new({
authenticate => 1,
username => 'me@somewhere.com',
password => 'hunter2',
});
my $resource = $mm->api->webhooks->outgoing;

METHODS

create()

Create an outgoing webhook

my $response = $resource->create({
# Required parameters:
channel_id => 'CHANNEL-ID-HERE',
# Optional parameters:
display_name => '...',
description => '...',
username => '...',
icon_url => '...',
});
list()

List outgoing webhooks

my $response = $resource->list({
# Optional parameters:
page => 0,
per_page => 60,
team_id => 'TEAM-ID-HERE',
});
get_by_id()

Get an outgoing webhook

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

Update an outgoing webhook

my $response = $resource->update_by_id('WEBHOOK-ID-HERE', {
# Required parameters:
channel_id => 'CHANNEL-ID-HERE',
display_name => '...',
description => '...',
# Optional parameters:
username => '...',
icon_url => '...',
});
regenerate_token()

Regenerate the token for the outgoing webhook

my $response = $resource->regenerate_token('WEBHOOK-ID-HERE');

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