Activiti-Rest-Client
view release on metacpan or search on metacpan
lib/Activiti/Rest/Client.pm view on Meta::CPAN
package Activiti::Rest::Client;
use Activiti::Sane;
use Carp qw(confess);
use Moo;
use Data::Util qw(:check :validate);
use JSON qw(decode_json encode_json);
use URI::Escape qw(uri_escape);
use Activiti::Rest::Response;
our $VERSION = "0.1259";
#see: http://www.activiti.org/userguide
=head1 NAME
Activiti::Rest::Client - Low level client for the Activiti Rest API
=head1 AUTHORS
Nicolas Franck C<< <nicolas.franck at ugent.be> >>
=head1 NOTE
This is a work in progress. More documentation will be added in time
=head1 PROJECT
see http://www.activiti.org/userguide
=head1 SYNOPSIS
my $client = Activiti::Rest::Client->new(
url => 'http://kermit:kermit@localhost:8080/activiti-rest/service'
);
my $res = $client->process_definitions;
die("no parsed content") unless $res->has_parsed_content;
my $pdefs = $res->parsed_content;
my @ids = map { $_->{id} } @{ $pdefs->{data} };
for my $id(@ids){
print Dumper($client->process_definition(processDefinitionId => $id)->parsed_content);
}
=head1 CONSTRUCTOR parameters
=head2 url
base url of the activiti rest api
activiti-rest uses basic http authentication, so username and password should be included in the url
e.g.
http://kermit:kermit@localhost:8080/activiti-rest/service
=cut
has url => (
is => 'ro',
isa => sub { $_[0] =~ /^https?:\/\//o or die("url must be a valid web url\n"); },
required => 1
);
=head2 timeout
( run in 1.316 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )