command will POST to MYREDMINE_SERVER/time_entries.json
#{time_entry => {issue_id => 3, activity_id => 9, hours => 1, comments => 'test'}} in JSON format
$c->time_entries->time_entry->create(i
nicate with Redmine thought the REST::Api.
Any result will be a perl HASH, transformation of the json response into a perl HASH.
=head1 NOTES
The Redmine API is not fully complete, and you should u
to the API
use strict;
use warnings;
our $VERSION = '0.04'; # VERSION
use Moo;
use Carp;
use JSON;
use REST::Client;
has 'request' => (
is => 'ro',
isa => sub {
croak "request s
_key );
$cli->addHeader( 'Content-Type' => 'application/json' );
$cli->addHeader( 'Accept' => 'application/json' );
return $cli;
}
sub create {
my ( $self, %data ) =
esponse(
$self->_rest_cli->POST(
'/' . $self->request->route . '.json',
encode_json( { $self->action => \%data } ),
)
);
}
sub all {
my ( $self, %optio