Commit b50dc7d0 authored by Mike Jones's avatar Mike Jones 🌶

Available API methods for Channel

parent a26c94a5
......@@ -5,6 +5,7 @@ use Types::Standard qw(HashRef InstanceOf Int Maybe Str);
extends 'WebService::Mattermost::V4::API::Object';
with qw(
WebService::Mattermost::V4::API::Object::Role::APIMethods
WebService::Mattermost::V4::API::Object::Role::Timestamps
WebService::Mattermost::V4::API::Object::Role::BelongingToUser
WebService::Mattermost::V4::API::Object::Role::BelongingToTeam
......@@ -32,6 +33,28 @@ has [ qw(
################################################################################
sub BUILD {
my $self = shift;
$self->api_resource_name('channel');
$self->set_available_api_methods([ qw(
delete
get
patch
pinned
posts
restore
set_scheme
stats
toggle_private_status
update
) ]);
return 1;
}
################################################################################
sub _build_extra_updated_at {
my $self = shift;
......@@ -81,6 +104,41 @@ WebService::Mattermost::V4::API::Object::Channel
Details a Mattermost channel object.
=head2 METHODS
See matching methods in C<WebService::Mattermost::V4::API::Resource::Channel>
for full documentation.
ID parameters are not required:
my $response = $mattermost->api->channel->get('ID-HERE')->item->delete();
Is the same as:
my $response = $mattermost->api->channel->delete('ID-HERE');
=over 4
=item C<delete()>
=item C<patch()>
=item C<pinned()>
=item C<posts()>
=item C<restore()>
=item C<set_scheme()>
=item C<stats()>
=item C<toggle_private_status()>
=item C<update()>
=back
=head2 ATTRIBUTES
=over 4
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment