GitLab::API::v3 - A complete GitLab API v3 client. (DEPRECATED)
use GitLab::API::v3;
my $api = GitLab::API::v3->new(
url => $v3_api_url,
token => $token,
);
my $branches = $api->branches( $project_id );This module is at the end of it's life as the latest GitLab no longer supports the v3 API. Instead, use GitLab::API::v4.
This module provides a one-to-one interface with the GitLab API v3. Much is not documented here as it would just be duplicating GitLab's own API Documentation.
Note that this distribution also includes the gitlab-api-v3 command-line interface (CLI).
Authentication credentials may be defined by setting either the "token", the "login" and "password", or the "email" and "password" arguments.
When the object is constructed the "login", "email", and "password" arguments are used to call "session" to generate a token. The token is saved in the "token" attribute, and the login/email/password arguments are discarded.
If no credentials are supplied then the client will be anonymous and greatly limited in what it can do with the API.
Several values in the GitLab API require looking up the numeric value
for a meaning (such as access_level and visibility_level).
Instead of doing that, you can use GitLab::API::v3::Constants.
The API methods will all throw (hopefully) a useful exception if
an unsuccessful response is received from the API. That is except for
GET requests that return a 404 response - these will return undef
for methods that return a value.
If you'd like to catch and handle these exceptions consider using Try::Tiny.
This module uses Log::Any and produces some debug messages here and there, but the most useful bits are the info messages produced just before each API call.
Note that many API calls require a $project_id. This can be
specified as either a numeric project ID, or as a
NAMESPACE_PATH/PROJECT_PATH in many cases. Perhaps even
all cases, but the GitLab documentation on this point is vague.
Many of this module's methods should return a value but do not currently. This is due to the fact that this module was built as a strict representation of GitLab's own documentation which is often inconsistent.
If you find a method that should provide a return value, but doesn't currently, please verify that GitLab actually does return a value and then submit a pull request or open an issue. See "CONTRIBUTING" for more info.
The URL to your v3 API endpoint. Typically this will be something
like http://git.example.com/api/v3.
A GitLab API token. If set then neither "login" or "email" may be set. Read more in "CREDENTIALS".
A GitLab user login name. If set then "password" must be set. Read more in "CREDENTIALS".
A GitLab user email. If set then "password" must be set. Read more in "CREDENTIALS".
A GitLab user password. This must be set if either "login" or "email" are set. Read more in "CREDENTIALS".
An instance of GitLab::API::v3::RESTClient. Typically you will not be setting this as it defaults to a new instance and customization should not be necessary.
The number of times the request should be retried in case it does not succeed. Defaults to 0, meaning that a failed request will not be retried.
my $paginator = $api->paginator( $method, @method_args );
my $members = $api->paginator('group_members', $group_id);
while (my $member = $members->next()) {
...
}
my $users_pager = $api->paginator('users');
while (my $users = $users_pager->next_page()) {
...
}
my $all_open_issues = $api->paginator(
'issues',
$project_id,
{ state=>'opened' },
)->all();Given a method who supports the page and per_page parameters,
and returns an array ref, this will return a GitLab::API::v3::Paginator
object that will allow you to walk the records one page or one record
at a time.
See http://docs.gitlab.com/ce/api/award_emoji.html.
my $award_emojis = $api->issue_award_emojis(
$id,
$issue_id,
);Sends a GET request to /projects/:id/issues/:issue_id/award_emoji and returns the decoded/deserialized response body.
my $award_emojis = $api->merge_request_award_emojis(
$id,
$merge_request_id,
);Sends a GET request to /projects/:id/merge_requests/:merge_request_id/award_emoji and returns the decoded/deserialized response body.
my $award_emoji = $api->issue_award_emoji(
$id,
$issue_id,
$award_id,
);Sends a GET request to /projects/:id/issues/:issue_id/award_emoji/:award_id and returns the decoded/deserialized response body.
my $award_emoji = $api->merge_request_award_emoji(
$id,
$merge_request_id,
$award_id,
);Sends a GET request to /projects/:id/merge_requests/:merge_request_id/award_emoji/:award_id and returns the decoded/deserialized response body.
my $award_emoji = $api->create_issue_award_emoji(
$id,
$issue_id,
\%params,
);Sends a POST request to /projects/:id/issues/:issue_id/award_emoji and returns the decoded/deserialized response body.
my $award_emoji = $api->create_merge_request_award_emoji(
$id,
$merge_request_id,
\%params,
);Sends a POST request to /projects/:id/merge_requests/:merge_request_id/award_emoji and returns the decoded/deserialized response body.
my $award_emoji = $api->delete_issue_award_emoji(
$id,
$issue_id,
$award_id,
);Sends a DELETE request to /projects/:id/issues/:issue_id/award_emoji/:award_id and returns the decoded/deserialized response body.
my $award_emoji = $api->delete_merge_request_award_emoji(
$id,
$merge_request_id,
$award_id,
);Sends a DELETE request to /projects/:id/merge_requests/:merge_request_id/award_emoji/:award_id and returns the decoded/deserialized response body.
my $award_emojis = $api->issue_note_award_emojis(
$id,
$issue_id,
$note_id,
);Sends a GET request to /projects/:id/issues/:issue_id/notes/:note_id/award_emoji and returns the decoded/deserialized response body.
my $award_emoji = $api->issue_note_award_emoji(
$id,
$issue_id,
$note_id,
$award_id,
);Sends a GET request to /projects/:id/issues/:issue_id/notes/:note_id/award_emoji/:award_id and returns the decoded/deserialized response body.
my $award_emoji = $api->create_issue_note_award_emoji(
$id,
$issue_id,
$note_id,
\%params,
);Sends a POST request to /projects/:id/issues/:issue_id/notes/:note_id/award_emoji and returns the decoded/deserialized response body.
my $award_emoji = $api->delete_issue_note_award_emoji(
$id,
$issue_id,
$note_id,
$award_id,
);Sends a DELETE request to /projects/:id/issues/:issue_id/notes/:note_id/award_emoji/:award_id and returns the decoded/deserialized response body.
my $award_emojis = $api->merge_request_note_award_emojis(
$id,
$merge_request_id,
$note_id,
);Sends a GET request to /projects/:id/merge_requests/:merge_request_id/notes/:note_id/award_emoji and returns the decoded/deserialized response body.
my $award_emoji = $api->merge_request_note_award_emoji(
$id,
$merge_request_id,
$note_id,
$award_id,
);Sends a GET request to /projects/:id/merge_requests/:merge_request_id/notes/:note_id/award_emoji/:award_id and returns the decoded/deserialized response body.
my $award_emoji = $api->create_merge_request_note_award_emoji(
$id,
$merge_request_id,
$note_id,
\%params,
);Sends a POST request to /projects/:id/merge_requests/:merge_request_id/notes/:note_id/award_emoji and returns the decoded/deserialized response body.
my $award_emoji = $api->delete_merge_request_note_award_emoji(
$id,
$merge_request_id,
$note_id,
$award_id,
);Sends a DELETE request to /projects/:id/merge_requests/:merge_request_id/notes/:note_id/award_emoji/:award_id and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/branches.html.
my $branches = $api->branches(
$project_id,
);Sends a GET request to /projects/:project_id/repository/branches and returns the decoded/deserialized response body.
my $branch = $api->branch(
$project_id,
$branch_name,
);Sends a GET request to /projects/:project_id/repository/branches/:branch_name and returns the decoded/deserialized response body.
$api->protect_branch(
$project_id,
$branch_name,
\%params,
);
Sends a PUT request to /projects/:project_id/repository/branches/:branch_name/protect.
$api->unprotect_branch(
$project_id,
$branch_name,
);
Sends a PUT request to /projects/:project_id/repository/branches/:branch_name/unprotect.
my $branch = $api->create_branch(
$project_id,
\%params,
);Sends a POST request to /projects/:project_id/repository/branches and returns the decoded/deserialized response body.
$api->delete_branch(
$project_id,
$branch_name,
);
Sends a DELETE request to /projects/:project_id/repository/branches/:branch_name.
See http://docs.gitlab.com/ce/api/builds.html.
my $builds = $api->builds(
$id,
\%params,
);Sends a GET request to /projects/:id/builds and returns the decoded/deserialized response body.
my $builds = $api->commit_builds(
$id,
$sha,
\%params,
);Sends a GET request to /projects/:id/repository/commits/:sha/builds and returns the decoded/deserialized response body.
my $build = $api->build(
$id,
$build_id,
);Sends a GET request to /projects/:id/builds/:build_id and returns the decoded/deserialized response body.
my $artifacts = $api->build_artifacts(
$id,
$build_id,
);Sends a GET request to /projects/:id/builds/:build_id/artifacts and returns the decoded/deserialized response body.
my $trace = $api->build_trace(
$id,
$build_id,
);Sends a GET request to /projects/:id/builds/:build_id/trace and returns the decoded/deserialized response body.
my $build = $api->cancel_build(
$id,
$build_id,
);Sends a POST request to /projects/:id/builds/:build_id/cancel and returns the decoded/deserialized response body.
my $build = $api->retry_build(
$id,
$build_id,
);Sends a POST request to /projects/:id/builds/:build_id/retry and returns the decoded/deserialized response body.
my $build = $api->erase_build(
$id,
$build_id,
);Sends a POST request to /projects/:id/builds/:build_id/erase and returns the decoded/deserialized response body.
my $build = $api->keep_build_artifacts(
$id,
$build_id,
);Sends a POST request to /projects/:id/builds/:build_id/artifacts/keep and returns the decoded/deserialized response body.
See http://docs.gitlab.com/ce/api/build_triggers.html.
my $triggers = $api->triggers(
$id,
);Sends a GET request to /projects/:id/triggers and returns the decoded/deserialized response body.
my $trigger = $api->trigger(
$id,
$token,
);Sends a GET request to /projects/:id/triggers/:token and returns the decoded/deserialized response body.
my $trigger = $api->create_trigger(
$id,
);Sends a POST request to /projects/:id/triggers and returns the decoded/deserialized response body.
my $trigger = $api->delete_trigger(
$id,
$token,
);Sends a DELETE request to /projects/:id/triggers/:token and returns the decoded/deserialized response body.
See http://docs.gitlab.com/ce/api/build_variables.html.
my $variables = $api->variables(
$id,
);Sends a GET request to /projects/:id/variables and returns the decoded/deserialized response body.
my $variable = $api->variable(
$id,
$key,
);Sends a GET request to /projects/:id/variables/:key and returns the decoded/deserialized response body.
my $variable = $api->create_variable(
$id,
\%params,
);Sends a POST request to /projects/:id/variables and returns the decoded/deserialized response body.
my $variable = $api->update_variable(
$id,
$key,
\%params,
);Sends a PUT request to /projects/:id/variables/:key and returns the decoded/deserialized response body.
my $variable = $api->delete_variable(
$id,
$key,
);Sends a DELETE request to /projects/:id/variables/:key and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/commits.html.
my $commits = $api->commits(
$project_id,
\%params,
);Sends a GET request to /projects/:project_id/repository/commits and returns the decoded/deserialized response body.
my $commit = $api->commit(
$project_id,
$commit_sha,
);Sends a GET request to /projects/:project_id/repository/commits/:commit_sha and returns the decoded/deserialized response body.
my $diff = $api->commit_diff(
$project_id,
$commit_sha,
);Sends a GET request to /projects/:project_id/repository/commits/:commit_sha/diff and returns the decoded/deserialized response body.
my $comments = $api->commit_comments(
$project_id,
$commit_sha,
);Sends a GET request to /projects/:project_id/repository/commits/:commit_sha/comments and returns the decoded/deserialized response body.
$api->add_commit_comment(
$project_id,
$commit_sha,
\%params,
);
Sends a POST request to /projects/:project_id/repository/commits/:commit_sha/comments.
See http://doc.gitlab.com/ce/api/deploy_keys.html.
my $keys = $api->deploy_keys(
$project_id,
);Sends a GET request to /projects/:project_id/keys and returns the decoded/deserialized response body.
my $key = $api->deploy_key(
$project_id,
$key_id,
);Sends a GET request to /projects/:project_id/keys/:key_id and returns the decoded/deserialized response body.
$api->create_deploy_key(
$project_id,
\%params,
);
Sends a POST request to /projects/:project_id/keys.
$api->delete_deploy_key(
$project_id,
$key_id,
);
Sends a DELETE request to /projects/:project_id/keys/:key_id.
See http://doc.gitlab.com/ce/api/groups.html.
my $groups = $api->groups();Sends a GET request to /groups and returns the decoded/deserialized response body.
my $group = $api->group(
$group_id,
);Sends a GET request to /groups/:group_id and returns the decoded/deserialized response body.
$api->create_group(
\%params,
);
Sends a POST request to /groups.
$api->transfer_project(
$group_id,
$project_id,
);
Sends a POST request to /groups/:group_id/projects/:project_id.
$api->delete_group(
$group_id,
);
Sends a DELETE request to /groups/:group_id.
my $groups = $api->search_groups(
\%params,
);Sends a GET request to /groups and returns the decoded/deserialized response body.
my $members = $api->group_members(
$group_id,
);Sends a GET request to /groups/:group_id/members and returns the decoded/deserialized response body.
my $projects = $api->group_projects(
$group_id,
\%params,
);Sends a GET request to /groups/:group_id/projects and returns the decoded/deserialized response body.
$api->add_group_member(
$group_id,
\%params,
);
Sends a POST request to /groups/:group_id/members.
$api->edit_group_member(
$group_id,
$user_id,
\%params,
);Sends a PUT request to /groups/:group_id/members/:user_id.
$api->remove_group_member(
$group_id,
$user_id,
);Sends a DELETE request to /groups/:group_id/members/:user_id.
See http://doc.gitlab.com/ce/api/issues.html.
my $issues = $api->all_issues(
\%params,
);Sends a GET request to /issues and returns the decoded/deserialized response body.
my $issues = $api->issues(
$project_id,
\%params,
);Sends a GET request to /projects/:project_id/issues and returns the decoded/deserialized response body.
my $issue = $api->issue(
$project_id,
$issue_id,
);Sends a GET request to /projects/:project_id/issues/:issue_id and returns the decoded/deserialized response body.
my $issue = $api->create_issue(
$project_id,
\%params,
);Sends a POST request to /projects/:project_id/issues and returns the decoded/deserialized response body.
my $issue = $api->edit_issue(
$project_id,
$issue_id,
\%params,
);Sends a PUT request to /projects/:project_id/issues/:issue_id and returns the decoded/deserialized response body.
See http://docs.gitlab.com/ce/api/keys.html.
my $key = $api->key(
$key_id,
);Sends a GET request to /keys/:key_id and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/labels.html.
my $labels = $api->labels(
$project_id,
);Sends a GET request to /projects/:project_id/labels and returns the decoded/deserialized response body.
my $label = $api->create_label(
$project_id,
\%params,
);Sends a POST request to /projects/:project_id/labels and returns the decoded/deserialized response body.
$api->delete_label(
$project_id,
\%params,
);
Sends a DELETE request to /projects/:project_id/labels.
my $label = $api->edit_label(
$project_id,
\%params,
);Sends a PUT request to /projects/:project_id/labels and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/merge_requests.html.
my $merge_requests = $api->merge_requests(
$project_id,
\%params,
);Sends a GET request to /projects/:project_id/merge_requests and returns the decoded/deserialized response body.
my $merge_request = $api->merge_request(
$project_id,
$merge_request_id,
);Sends a GET request to /projects/:project_id/merge_request/:merge_request_id and returns the decoded/deserialized response body.
my $merge_request = $api->create_merge_request(
$project_id,
\%params,
);Sends a POST request to /projects/:project_id/merge_requests and returns the decoded/deserialized response body.
my $merge_request = $api->edit_merge_request(
$project_id,
$merge_request_id,
\%params,
);Sends a PUT request to /projects/:project_id/merge_requests/:merge_request_id and returns the decoded/deserialized response body.
$api->accept_merge_request(
$project_id,
$merge_request_id,
\%params,
);
Sends a PUT request to /projects/:project_id/merge_requests/:merge_request_id/merge.
$api->add_merge_request_comment(
$project_id,
$merge_request_id,
\%params,
);
Sends a POST request to /projects/:project_id/merge_requests/:merge_request_id/comments.
my $comments = $api->merge_request_comments(
$project_id,
$merge_request_id,
);Sends a GET request to /projects/:project_id/merge_requests/:merge_request_id/comments and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/milestones.html.
my $milestones = $api->milestones(
$project_id,
\%params,
);Sends a GET request to /projects/:project_id/milestones and returns the decoded/deserialized response body.
my $milestone = $api->milestone(
$project_id,
$milestone_id,
);Sends a GET request to /projects/:project_id/milestones/:milestone_id and returns the decoded/deserialized response body.
$api->create_milestone(
$project_id,
\%params,
);
Sends a POST request to /projects/:project_id/milestones.
$api->edit_milestone(
$project_id,
$milestone_id,
\%params,
);
Sends a PUT request to /projects/:project_id/milestones/:milestone_id.
my $issues = $api->milestone_issues(
$project_id,
$milestone_id,
);Sends a GET request to /projects/:project_id/milestones/:milestone_id/issues and returns the decoded/deserialized response body.
See http://docs.gitlab.com/ce/api/licenses.html.
my $licenses = $api->licenses(
\%params,
);Sends a GET request to /licenses and returns the decoded/deserialized response body.
my $license = $api->license(
$license_key,
\%params,
);Sends a GET request to /licenses/:license_key and returns the decoded/deserialized response body.
See http://docs.gitlab.com/ce/api/namespaces.html.
my $namespaces = $api->namespaces(
\%params,
);Sends a GET request to /namespaces and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/notes.html.
my $notes = $api->notes(
$project_id,
$thing_type,
$thing_id,
);Sends a GET request to /projects/:project_id/:thing_type/:thing_id/notes and returns the decoded/deserialized response body.
my $note = $api->note(
$project_id,
$thing_type,
$thing_id,
$note_id,
);Sends a GET request to /projects/:project_id/:thing_type/:thing_id/notes/:note_id and returns the decoded/deserialized response body.
$api->create_note(
$project_id,
$thing_type,
$thing_id,
\%params,
);
Sends a POST request to /projects/:project_id/:thing_type/:thing_id/notes.
$api->edit_note(
$project_id,
$thing_type,
$thing_id,
$note_id,
\%params,
);
Sends a PUT request to /projects/:project_id/:thing_type/:thing_id/notes/:note_id.
See http://doc.gitlab.com/ce/api/projects.html.
my $projects = $api->projects(
\%params,
);Sends a GET request to /projects and returns the decoded/deserialized response body.
my $projects = $api->owned_projects(
\%params,
);Sends a GET request to /projects/owned and returns the decoded/deserialized response body.
my $projects = $api->all_projects(
\%params,
);Sends a GET request to /projects/all and returns the decoded/deserialized response body.
my $project = $api->project(
$project_id,
);Sends a GET request to /projects/:project_id and returns the decoded/deserialized response body.
my $events = $api->project_events(
$project_id,
);Sends a GET request to /projects/:project_id/events and returns the decoded/deserialized response body.
my $project = $api->create_project(
\%params,
);Sends a POST request to /projects and returns the decoded/deserialized response body.
$api->create_project_for_user(
$user_id,
\%params,
);Sends a POST request to /projects/user/:user_id.
my $project = $api->edit_project(
$project_id,
\%params,
);Sends a PUT request to /projects/:project_id and returns the decoded/deserialized response body.
$api->fork_project(
$project_id,
);
Sends a POST request to /pojects/fork/:project_id.
$api->delete_project(
$project_id,
);
Sends a DELETE request to /projects/:project_id.
my $members = $api->project_members(
$project_id,
\%params,
);Sends a GET request to /projects/:project_id/members and returns the decoded/deserialized response body.
my $member = $api->project_member(
$project_id,
$user_id,
);Sends a GET request to /project/:project_id/members/:user_id and returns the decoded/deserialized response body.
$api->add_project_member(
$project_id,
\%params,
);
Sends a POST request to /projects/:project_id/members.
$api->edit_project_member(
$project_id,
$user_id,
\%params,
);Sends a PUT request to /projects/:project_id/members/:user_id.
$api->remove_project_member(
$project_id,
$user_id,
);Sends a DELETE request to /projects/:project_id/members/:user_id.
$api->share_project_with_group(
$id,
\%params,
);
Sends a POST request to /projects/:id/share.
$api->delete_shared_project_link_within_group(
$id,
$group_id,
);
Sends a DELETE request to /projects/:id/share/:group_id.
my $hooks = $api->project_hooks(
$project_id,
);Sends a GET request to /projects/:project_id/hooks and returns the decoded/deserialized response body.
my $hook = $api->project_hook(
$project_id,
$hook_id,
);Sends a GET request to /project/:project_id/hooks/:hook_id and returns the decoded/deserialized response body.
$api->create_project_hook(
$project_id,
\%params,
);
Sends a POST request to /projects/:project_id/hooks.
$api->edit_project_hook(
$project_id,
$hook_id,
\%params,
);
Sends a PUT request to /projects/:project_id/hooks/:hook_id.
my $hook = $api->delete_project_hook(
$project_id,
$hook_id,
);Sends a DELETE request to /projects/:project_id/hooks/:hook_id and returns the decoded/deserialized response body.
$api->set_project_fork(
$project_id,
$forked_from_id,
);
Sends a POST request to /projects/:project_id/fork/:forked_from_id.
$api->clear_project_fork(
$project_id,
);
Sends a DELETE request to /projects/:project_id/fork.
my $projects = $api->search_projects_by_name(
$query,
\%params,
);Sends a GET request to /projects/search/:query and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/project_snippets.html.
my $snippets = $api->snippets(
$project_id,
);Sends a GET request to /projects/:project_id/snippets and returns the decoded/deserialized response body.
my $snippet = $api->snippet(
$project_id,
$snippet_id,
);Sends a GET request to /projects/:project_id/snippets/:snippet_id and returns the decoded/deserialized response body.
$api->create_snippet(
$project_id,
\%params,
);
Sends a POST request to /projects/:project_id/snippets.
$api->edit_snippet(
$project_id,
$snippet_id,
\%params,
);
Sends a PUT request to /projects/:project_id/snippets/:snippet_id.
$api->delete_snippet(
$project_id,
$snippet_id,
);
Sends a DELETE request to /projects/:project_id/snippets/:snippet_id.
my $content = $api->snippet_content(
$project_id,
$snippet_id,
);Sends a GET request to /projects/:project_id/snippets/:snippet_id/raw and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/repositories.html.
my $tree = $api->tree(
$project_id,
\%params,
);Sends a GET request to /projects/:project_id/repository/tree and returns the decoded/deserialized response body.
my $blob = $api->blob(
$project_id,
$ref,
\%params,
);Sends a GET request to /projects/:project_id/repository/blobs/:ref and returns the decoded/deserialized response body.
my $raw_blob = $api->raw_blob(
$project_id,
$blob_sha,
);Sends a GET request to /projects/:project_id/repository/raw_blobs/:blob_sha and returns the decoded/deserialized response body.
my $archive = $api->archive(
$project_id,
\%params,
);Sends a GET request to /projects/:project_id/repository/archive and returns the decoded/deserialized response body.
my $comparison = $api->compare(
$project_id,
\%params,
);Sends a GET request to /projects/:project_id/repository/compare and returns the decoded/deserialized response body.
my $contributors = $api->contributors(
$project_id,
);Sends a GET request to /projects/:project_id/repository/contributors and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/repository_files.html.
my $file = $api->file(
$project_id,
\%params,
);Sends a GET request to /projects/:project_id/repository/files and returns the decoded/deserialized response body.
$api->create_file(
$project_id,
\%params,
);
Sends a POST request to /projects/:project_id/repository/files.
$api->edit_file(
$project_id,
\%params,
);
Sends a PUT request to /projects/:project_id/repository/files.
$api->delete_file(
$project_id,
\%params,
);
Sends a DELETE request to /projects/:project_id/repository/files.
See http://docs.gitlab.com/ce/api/runners.html.
my $runners = $api->runners(
\%params,
);Sends a GET request to /runners and returns the decoded/deserialized response body.
my $runners = $api->all_runners(
\%params,
);Sends a GET request to /runners/all and returns the decoded/deserialized response body.
my $runner = $api->runner(
$id,
);Sends a GET request to /runners/:id and returns the decoded/deserialized response body.
my $runner = $api->update_runner(
$id,
\%params,
);Sends a PUT request to /runners/:id and returns the decoded/deserialized response body.
my $runner = $api->delete_runner(
$id,
);Sends a DELETE request to /runners/:id and returns the decoded/deserialized response body.
my $runners = $api->project_runners(
$id,
);Sends a GET request to /projects/:id/runners and returns the decoded/deserialized response body.
my $runner = $api->enable_project_runner(
$id,
\%params,
);Sends a POST request to /projects/:id/runners and returns the decoded/deserialized response body.
my $runner = $api->disable_project_runner(
$id,
$runner_id,
);Sends a DELETE request to /projects/:id/runners/:runner_id and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/services.html.
$api->edit_project_service(
$project_id,
$service_name,
\%params,
);
Sends a PUT request to /projects/:project_id/services/:service_name.
$api->delete_project_service(
$project_id,
$service_name,
);
Sends a DELETE request to /projects/:project_id/services/:service_name.
See http://doc.gitlab.com/ce/api/session.html.
my $session = $api->session(
\%params,
);Sends a POST request to /session and returns the decoded/deserialized response body.
See http://docs.gitlab.com/ce/api/settings.html.
my $settings = $api->settings();Sends a GET request to /application/settings and returns the decoded/deserialized response body.
my $settings = $api->update_settings(
\%params,
);Sends a PUT request to /application/settings and returns the decoded/deserialized response body.
See http://docs.gitlab.com/ce/api/sidekiq_metrics.html.
my $metrics = $api->queue_metrics();Sends a GET request to /sidekiq/queue_metrics and returns the decoded/deserialized response body.
my $metrics = $api->process_metrics();Sends a GET request to /sidekiq/process_metrics and returns the decoded/deserialized response body.
my $stats = $api->job_stats();Sends a GET request to /sidekiq/job_stats and returns the decoded/deserialized response body.
my $metrics = $api->compound_metrics();Sends a GET request to /sidekiq/compound_metrics and returns the decoded/deserialized response body.
See http://docs.gitlab.com/ce/api/snippets.html.
my $snippets = $api->user_snippets();Sends a GET request to /snippets and returns the decoded/deserialized response body.
my $snippet = $api->user_snippet(
$snippet_id,
);Sends a GET request to /snippets/:snippet_id and returns the decoded/deserialized response body.
$api->create_user_snippet(
\%params,
);Sends a POST request to /snippets.
$api->edit_user_snippet(
$snippet_id,
\%params,
);Sends a PUT request to /snippets/:snippet_id.
$api->delete_user_snippet(
$snippet_id,
);Sends a DELETE request to /snippets/:snippet_id.
my $snippets = $api->public_snippets();Sends a GET request to /snippets/public and returns the decoded/deserialized response body.
See http://doc.gitlab.com/ce/api/system_hooks.html.
my $hooks = $api->hooks();Sends a GET request to /hooks and returns the decoded/deserialized response body.
$api->create_hook(
\%params,
);
Sends a POST request to /hooks.
my $hook = $api->test_hook(
$hook_id,
);Sends a GET request to /hooks/:hook_id and returns the decoded/deserialized response body.
$api->delete_hook(
$hook_id,
);
Sends a DELETE request to /hooks/:hook_id.
See http://docs.gitlab.com/ce/api/tags.html.
my $tags = $api->tags(
$project_id,
);Sends a GET request to /projects/:project_id/repository/tags and returns the decoded/deserialized response body.
my $tag = $api->tag(
$project_id,
$tag_name,
);Sends a GET request to /projects/:project_id/repository/tags/:tag_name and returns the decoded/deserialized response body.
my $tag = $api->create_tag(
$project_id,
\%params,
);Sends a POST request to /projects/:project_id/repository/tags and returns the decoded/deserialized response body.
$api->delete_tag(
$project_id,
$tag_name,
);
Sends a DELETE request to /projects/:project_id/repository/tags/:tag_name.
$api->create_release(
$project_id,
$tag_name,
\%params,
);
Sends a POST request to /projects/:project_id/repository/tags/:tag_name/release.
$api->update_release(
$project_id,
$tag_name,
\%params,
);
Sends a PUT request to /projects/:project_id/repository/tags/:tag_name/release.
See http://doc.gitlab.com/ce/api/users.html.
my $users = $api->users(
\%params,
);Sends a GET request to /users and returns the decoded/deserialized response body.
my $user = $api->user(
$user_id,
);Sends a GET request to /users/:user_id and returns the decoded/deserialized response body.
$api->create_user(
\%params,
);Sends a POST request to /users.
$api->edit_user(
$user_id,
\%params,
);Sends a PUT request to /users/:user_id.
my $user = $api->delete_user(
$user_id,
);Sends a DELETE request to /users/:user_id and returns the decoded/deserialized response body.
my $user = $api->current_user();Sends a GET request to /user and returns the decoded/deserialized response body.
my $keys = $api->current_user_ssh_keys();Sends a GET request to /user/keys and returns the decoded/deserialized response body.
my $keys = $api->user_ssh_keys(
$user_id,
);Sends a GET request to /users/:user_id/keys and returns the decoded/deserialized response body.
my $key = $api->user_ssh_key(
$key_id,
);Sends a GET request to /user/keys/:key_id and returns the decoded/deserialized response body.
$api->create_current_user_ssh_key(
\%params,
);Sends a POST request to /user/keys.
$api->create_user_ssh_key(
$user_id,
\%params,
);Sends a POST request to /users/:user_id/keys.
$api->delete_current_user_ssh_key(
$key_id,
);Sends a DELETE request to /user/keys/:key_id.
$api->delete_user_ssh_key(
$user_id,
$key_id,
);Sends a DELETE request to /users/:user_id/keys/:key_id.
Net::Gitlab purports to provide an interface to the GitLab API, but it is hard to tell due to a complete lack of documentation via either POD or unit tests.
Please submit bugs and feature requests to the GitLab-API-v3 GitHub issue tracker:
https://github.com/bluefeet/GitLab-API-v3/issues
Note that, due to the "DEPRECATED" nature of this distribution, new features and such may be denied.
This module is auto-generated from a set of YAML files defining the
interface of GitLab's API. If you'd like to contribute to this module
then please feel free to make a
fork on GitHub
and submit a pull request, just make sure you edit the files in the
authors/ directory instead of lib/GitLab/API/v3.pm directly.
Please see https://github.com/bluefeet/GitLab-API-v3/blob/master/author/README.pod for more information.
Alternatively, you can open a ticket.
Aran Clary Deltac <bluefeet@gmail.com>
Dotan Dimet <dotan@corky.net>
Nigel Gregoire <nigelgregoire@gmail.com>
trunov-ms <trunov.ms@gmail.com>
Marek R. Sotola <Marek.R.Sotola@nasa.gov>
José Joaquín Atria <jjatria@gmail.com>
Dave Webb <github@d5ve.com>
Thanks to ZipRecruiter for encouraging their employees to contribute back to the open source ecosystem. Without their dedication to quality software development this distribution would not exist.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.