ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
warnings;
use Moo;
use Data::Dumper;
use LWP::UserAgent;
use HTTP::Request;
use MIME::Base64;
use JSON;
=head1 NAME
Kanboard::API - A Perl interface to the Kanboard API
=head1 VERSION
Version 0.01
username|jsonrpc', password => 'apikey', endpoint => 'https://yourkanboardinstance.com');
...
=head1 ATTRIBUTES
=head2 username
The username to use for authentication. Defaults to "jsonrpc".
=
is => 'ro', default => 'jsonrpc' );
=head2 password
The password to use for authentication.
=cut
has password => ( is => 'ro', required => 1 );
=head2 endpoint
The JSON RPC Endpoint of the Kanb
ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
k> instance, and are autogenerated
from the API specification.
=cut
use Future::AsyncAwait;
use JSON::MaybeUTF8 qw(:v1);
=head2 admin_apps_approve
Approve an app for installation on a workspace.
@_;
my $uri = $self->endpoint(
'admin_apps_approve',
);
my $content = encode_json_utf8({
%args{grep { exists $args{$_} } qw(app_id request_id team_id)}
});
my ($re
s) = await $self->http_post(
$uri,
$content,
content_type => 'application/json; charset=utf-8',
);
die $res unless $res->{ok};
return $res;
}
=head2 admin_apps_ap
ture;
use Future::AsyncAwait;
use Dir::Self;
use URI;
use URI::QueryParam;
use URI::Template;
use JSON::MaybeUTF8 qw(:v1);
use Time::Moment;
use Syntax::Keyword::Try;
use File::ShareDir ();
use Path::
$args{text};
push @content, attachments => encode_json_text($args{attachments}) if $args{attachments};
push @content, blocks => encode_json_text($args{blocks}) if $args{blocks};
push @cont
are/endpoints.json> file.
=cut
sub endpoints {
my ($self) = @_;
$self->{endpoints} ||= do {
my $path = Path::Tiny::path(__DIR__)->parent(3)->child('share/endpoints.json');
$p
;
use warnings;
our $VERSION = '0.015'; # VERSION
use Scalar::Util qw(weaken);
use JSON::MaybeXS;
my $json = JSON::MaybeXS->new;
sub new {
my $class = shift;
my $self = bless { @_ }, $clas
efined $args{text};
push @content, attachments => $json->encode($args{attachments}) if $args{attachments};
push @content, blocks => $json->encode($args{blocks}) if $args{blocks};
$args{as_
te;
use JSON::MaybeUTF8 qw(:v1);
use Log::Any qw($log);
use Log::Any::Adapter qw(Stderr), log_level => 'debug';
use List::UtilsBy qw(extract_by);
my $tt = Template->new;
my $data = decode_json_text(p
ath('slack_web.json')->slurp_utf8);
my @methods;
my %endpoints = (
"oauth" => "https://slack.com/oauth/authorize{?client_id,scope,redirect_uri,state,team}",
"apps_connections_open" => "https:
$x->{parameters}->@* ],
}
};
$def->{http_method} = 'post' if grep { m{application/json} } $x->{consumes}->@*;
push $def->{args}{form}->@*, splice $def->{args}{query}->@* if $def->{
{ no strict 'refs'; push @{$pkg . '::ISA'}, __PACKAGE__; }
}) ;
return;
}
sub from_json {
my ($self, $data) = @_;
$log->tracef('Looking for type %s with available %s', $data->{t
ints
Returns the hashref of API endpoints, loading them on first call from the C<share/endpoints.json> file.
=head2 endpoint
Processes the given endpoint as a template, using the named parameters
p
Async::Slack::Event::Bot/icons>
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
direct;
use mro;
use Future;
use Dir::Self;
use URI;
use URI::QueryParam;
use URI::Template;
use JSON::MaybeXS;
use Time::Moment;
use Syntax::Keyword::Try;
use IO::Async::Timer::Countdown;
use Net::
t::UserResourceRemoved;
use Net::Async::Slack::Event::UserTyping;
use Log::Any qw($log);
my $json = JSON::MaybeXS->new;
=head1 METHODS
=head2 events
This is the stream of events, as a L<Ryu::Sour
id($args{id});
my $f = $self->loop->new_future;
$self->ws->send_frame(
buffer => $json->encode({
type => 'message',
id => $id,
channel => (r
ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve
ead1 INHERITED METHODS
=over 4
=item L<Net::Async::Slack::EventType>
L<from_json|Net::Async::Slack::EventType/from_json>, L<import|Net::Async::Slack::EventType/import>, L<new|Net::Async::Slack::Eve