WebService::Mattermost::V4::API::Object::Role::APIMethods - Allows a result object to call the API.
version 0.24
Mark methods as available for use from a result object.
package SomeResultObj; use Moo; extends 'WebService::Mattermost::V4::API::Object'; with 'WebService::Mattermost::V4::API::Object::Role::APIMethods'; sub BUILD { my $self = shift; # e.g. user $self->api_resource_name('lower case name of the API resource'); $self->set_available_api_methods([ qw( method_name another_method_name yet_another_method_name ) ]); } 1;
call()
Call an API method which is available to this class.
$object->call('method_name', { some => 'arguments', });
set_available_api_methods()
$self->set_available_api_methods([ qw(foo bar baz) ]);
method_is_valid()
Checks whether the given method is set as permitted.
my $valid = $self->method_is_valid('foo'); # 1 or 0
Mike Jones <mike@netsplit.org.uk>
This software is Copyright (c) 2020 by Mike Jones.
This is free software, licensed under:
The MIT (X11) License
To install WebService::Mattermost, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Mattermost
CPAN shell
perl -MCPAN -e shell install WebService::Mattermost
For more information on module installation, please visit the detailed CPAN module installation guide.