e::CloudTasks->client(
version => 'v2',
credentials_path => '/path/to/credentials.json',
);
# Create task
my $project_id = 'myproject';
my $location_id = 'asia-northe
=head2 AUTHENTICATION
A service account with appropriate roles is required. You need to download JSON file and specify C<credentials_path>.
See also: L<https://cloud.google.com/docs/authentication/ge
s_path => '/path/to/credentials.json',
);
C<version> is an API version. (Currently only C<v2> is available)
C<credentials_path> is a path to a service account JSON file.
=head2 Location
Refer t
d::Auth::ServiceAccount;
use LWP::UserAgent;
use HTTP::Request;
use URI;
use URI::QueryParam;
use JSON::XS;
our $VERSION = "0.01";
has base_url => (
is => 'ro',
isa => 'Str',
default =>
t-Type' => 'application/json; charset=utf8');
$req->header('Authorization' => 'Bearer ' . $self->auth->get_token);
if ($content) {
my $encoded_body = encode_json($content);
$re
}
my $res = $self->ua->request($req);
if ($res->is_success) {
return decode_json($res->content);
}
else {
die "Fail: " . $res->content;
}
}
sub request_get {