BSTRACT: Access the Google Storage JSON API (currently experimental).
# https://developers.google.com/storage/docs/json_api/
use Moose;
use LWP::UserAgent;
use JSON;
use HTTP::Status qw(:constants);
d=$projectId");
die 'Failed to list buckets' unless $res->is_success;
my $response = decode_json($res->decoded_content);
my @buckets = map {Net::Google::Storage::Bucket->new($_)} @{$response-
OUND;
die "Failed to get bucket: $bucket_name" unless $res->is_success;
my $response = decode_json($res->decoded_content);
return Net::Google::Storage::Bucket->new($response);
}
sub insert_bu
}
# ABSTRACT: Interface for a Google Storage Object
# https://developers.google.com/storage/docs/json_api/v1/objects#resource
use Moose;
use Net::Google::Storage::Types;
has id => (
is => 'ro',
toring the data of an object, slightly cut down from
L<https://developers.google.com/storage/docs/json_api/v1/objects#resource>.
Generally Net::Google::Storage::Object objects are acquired from a
C<g
formation about the file itself - check out the
L<docs|https://developers.google.com/storage/docs/json_api/v1/objects#resource>.
=head2 contentEncoding
The content encoding of the object's data.
=h
}
# ABSTRACT: Interface for a Google Storage Bucket
# https://developers.google.com/storage/docs/json_api/v1/buckets#resource
use Moose;
use Net::Google::Storage::Types;
has id => (
is => 'ro',
storing the data of a bucket, slightly cut down from
L<https://developers.google.com/storage/docs/json_api/v1/buckets#resource>.
Generally Net::Google::Storage::Bucket objects are acquired from a
C<g
f of the owner details for the bucket - see
L<the docs|https://developers.google.com/storage/docs/json_api/v1/buckets#resource>.
=head2 location
Physical location of the servers containing this buck
CT: Access the Google Storage JSON API (currently experimental).
# https://developers.google.com/storage/docs/json_api/
use Moose::Role;
use LWP::UserAgent 6.04;
use JSON;
use URI::Escape 3.29;
has
});
die 'Failed to refresh the access token' unless $res->is_success;
my $response = decode_json($res->decoded_content);
$self->access_token($response->{access_token});
$self->access_token_exp
>post(@_);
return $res;
}
sub _json_post
{
my $self = shift;
my $args = pop;
return $self->_post(@_, 'Content-Type' => 'application/json', Content => encode_json($args));
}
sub _delete
{
my $