GitLab-API-v3
view release on metacpan or search on metacpan
lib/GitLab/API/v3.pm view on Meta::CPAN
my $variable = $api->update_variable(
$id,
$key,
\%params,
);
Sends a C<PUT> request to C</projects/:id/variables/:key> and returns the decoded/deserialized response body.
=cut
sub update_variable {
my $self = shift;
croak 'update_variable must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($id) to update_variable must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($key) to update_variable must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to update_variable must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $path = sprintf('/projects/%s/variables/%s', (map { uri_escape($_) } @_));
return $self->put( $path, ( defined($params) ? $params : () ) );
}
lib/GitLab/API/v3.pm view on Meta::CPAN
my $runner = $api->update_runner(
$id,
\%params,
);
Sends a C<PUT> request to C</runners/:id> and returns the decoded/deserialized response body.
=cut
sub update_runner {
my $self = shift;
croak 'update_runner must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($id) to update_runner must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to update_runner must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $path = sprintf('/runners/%s', (map { uri_escape($_) } @_));
return $self->put( $path, ( defined($params) ? $params : () ) );
}
=head2 delete_runner
lib/GitLab/API/v3.pm view on Meta::CPAN
=head2 update_settings
my $settings = $api->update_settings(
\%params,
);
Sends a C<PUT> request to C</application/settings> and returns the decoded/deserialized response body.
=cut
sub update_settings {
my $self = shift;
croak 'update_settings must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1;
croak 'The last argument (\%params) to update_settings must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH';
my $params = (@_ == 1) ? pop() : undef;
my $path = sprintf('/application/settings', (map { uri_escape($_) } @_));
return $self->put( $path, ( defined($params) ? $params : () ) );
}
=head1 SIDEKIQ METHODS
lib/GitLab/API/v3.pm view on Meta::CPAN
$api->update_release(
$project_id,
$tag_name,
\%params,
);
Sends a C<PUT> request to C</projects/:project_id/repository/tags/:tag_name/release>.
=cut
sub update_release {
my $self = shift;
croak 'update_release must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to update_release must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($tag_name) to update_release must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to update_release must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $path = sprintf('/projects/%s/repository/tags/%s/release', (map { uri_escape($_) } @_));
$self->put( $path, ( defined($params) ? $params : () ) );
return;
}
( run in 1.168 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )