NAME

WebService::Mattermost::V4::API::Resource::Posts - Wrapped API methods for the posts API endpoints.

VERSION

version 0.29

DESCRIPTION

USAGE

use WebService::Mattermost;

my $mm = WebService::Mattermost->new({
    authenticate => 1,
    username     => 'email@address.com',
    password     => 'passwordhere',
    base_url     => 'https://my.mattermost.server.com/api/v4/',
});

my $resource = $mm->api->posts;

METHODS

create()

Create a post

my $response = $resource->create({
    # Required parameters:
    message    => '...',
    channel_id => 'CHANNEL-ID-HERE',

    # Optional parameters:
    root_id  => 'PARENT-POST-ID-HERE',
    file_ids => [ '...' ],
    props    => {},
});
create_ephemeral()

Create a ephemeral post

my $response = $resource->create_ephemeral({
    # Required parameters:
    user_id => 'USER-ID-HERE',
    post    => {
        channel_id => '...',
        message    => '...',
    },
});

SEE ALSO

https://api.mattermost.com/#tag/posts

Official "posts" API documentation.

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