Cloudflare-API
view release on metacpan or search on metacpan
lib/Cloudflare/API/D1.pm view on Meta::CPAN
sub delete_database {
my ($self, $id, %opt)=@_;
return $self->api()->request('DELETE', $self->api()->account_path('d1', 'database', $id),
%opt);
}
sub update_database {
my ($self, $id, $body_hr, %opt)=@_;
die "database body must be a hash reference\n" unless ref($body_hr) eq 'HASH';
return $self->api()->request('PATCH', $self->api()->account_path('d1', 'database', $id),
json => $body_hr, %opt);
}
sub query_database {
lib/Cloudflare/API/Hyperdrive.pm view on Meta::CPAN
sub replace_config {
my ($self, $id, $body_hr, %opt)=@_;
die "config body must be a hash reference\n" unless ref($body_hr) eq 'HASH';
return $self->api()->request('PUT',
$self->api()->account_path('hyperdrive', 'configs', $id), json => $body_hr, %opt);
}
sub update_config {
my ($self, $id, $body_hr, %opt)=@_;
die "config body must be a hash reference\n" unless ref($body_hr) eq 'HASH';
return $self->api()->request('PATCH',
$self->api()->account_path('hyperdrive', 'configs', $id), json => $body_hr, %opt);
}
sub delete_config {
lib/Cloudflare/API/Queues.pm view on Meta::CPAN
sub delete_queue {
my ($self, $id, %opt)=@_;
return $self->api()->request('DELETE', $self->api()->account_path('queues', $id),
%opt);
}
sub update_queue {
my ($self, $id, $body_hr, %opt)=@_;
die "queue body must be a hash reference\n" unless ref($body_hr) eq 'HASH';
return $self->api()->request('PATCH', $self->api()->account_path('queues', $id),
json => $body_hr, %opt);
}
sub list_consumers {
lib/Cloudflare/API/R2.pm view on Meta::CPAN
sub delete_bucket {
my ($self, $name, %opt)=@_;
return $self->api()->request('DELETE', $self->api()->account_path('r2', 'buckets', $name),
%opt);
}
sub update_bucket {
my ($self, $name, $body_hr, %opt)=@_;
die "bucket body must be a hash reference\n" unless ref($body_hr) eq 'HASH';
return $self->api()->request('PATCH', $self->api()->account_path('r2', 'buckets', $name),
json => $body_hr, %opt);
}
__END__
=encoding utf8
lib/Cloudflare/API/SecretsStore.pm view on Meta::CPAN
my ($self, $store_id, $body_ar, %opt)=@_;
die "secret body must be a non-empty array reference\n"
unless ref($body_ar) eq 'ARRAY'&&@$body_ar;
return $self->api()->request('POST',
$self->api()->account_path('secrets_store', 'stores', $store_id, 'secrets'),
json => $body_ar, %opt);
}
sub update_secret {
my ($self, $store_id, $secret_id, $body_hr, %opt)=@_;
die "secret body must be a hash reference\n" unless ref($body_hr) eq 'HASH';
return $self->api()->request('PATCH',
$self->api()->account_path('secrets_store', 'stores', $store_id, 'secrets', $secret_id),
json => $body_hr, %opt);
}
lib/Cloudflare/API/Workers.pm view on Meta::CPAN
my ($self, $zone_id, $body_hr, %opt)=@_;
die "route body must be a hash reference\n" unless ref($body_hr) eq 'HASH';
return $self->api()->request('POST',
'/zones/'.$self->api()->segment($zone_id).'/workers/routes',
json => $body_hr, %opt);
}
sub update_route {
my ($self, $zone_id, $route_id, $body_hr, %opt)=@_;
die "route body must be a hash reference\n" unless ref($body_hr) eq 'HASH';
return $self->api()->request('PUT',
'/zones/'.$self->api()->segment($zone_id).'/workers/routes/'.
$self->api()->segment($route_id), json => $body_hr, %opt);
}
( run in 2.887 seconds using v1.01-cache-2.11-cpan-145b269f2f3 )