Verified Commit 08aaa8fa authored by Roman Lacko's avatar Roman Lacko
Browse files

Remove documentation for API methods

Perl POD documentation for these modules is virtually impossible to
maintain and is basically just copied from Web sources, which are
referenced in said Perl POD anyway.
parent 43d87610
......@@ -88,68 +88,6 @@ GitLab::Commits - implements commits API calls
See L<GitLab API -- Commits|https://docs.gitlab.com/ee/api/commits.html> for details and
response formats.
=head1 VERSION
Implements API calls for GitLab EE C<v11.4.4>.
=head1 DESCRIPTION
=head2 Notation
Please see the documentation for the L<GitLab::Users> module.
Note that not all optional arguments are listed.
Please refer to the official documentation for the full list.
=head2 Commits
=over
=item L<commits()|https://docs.gitlab.com/ee/api/commits.html#list-repository-commits>
$gitlab->commits( :pid [,...] );
List repository commits.
=item L<commit_get()|https://docs.gitlab.com/ee/api/commits.html#get-a-single-commit>
$gitlab->commit_get( :pid, :sha [, :stats] );
Get a single commit.
=item L<get_references()|https://docs.gitlab.com/ee/api/commits.html#get-references-a-commit-is-pushed-to>
$gitlab->get_references( :pid, :sha [, :type] );
Get references a commit is pushed to.
=item L<cherry_pick()|https://docs.gitlab.com/ee/api/commits.html#cherry-pick-a-commit>
$gitlab->cherry_pick( :pid, :sha, :branch );
Cherry pick a commit to a given branch.
=item L<commit_revert()|https://docs.gitlab.com/ee/api/commits.html#revert-a-commit>
$gitlab->commit_revert( :pid, :sha, :branch );
Reverts a commit in a given branch.
=item L<commit_diff()|https://docs.gitlab.com/ee/api/commits.html#get-the-diff-of-a-commit>
$gitlab->commit_diff( :pid, :sha );
Get the diff of a commit in a project.
=item L<commit_comments()|https://docs.gitlab.com/ee/api/commits.html#get-the-comments-of-a-commit>
$gitlab->commit_comments( :pid, :sha );
Get the comments of a commit in a project.
=back
=head1 AUTHOR
Roman Lacko <L<xlacko1@fi.muni.cz>>
......
......@@ -73,53 +73,6 @@ GitLab::CustomAttributes - implements custom attributes API
See L<GitLab API -- Custom Attributes|https://docs.gitlab.com/ce/api/custom_attributes.html>
for details and response formats.
=head1 VERSION
Implements API calls for GitLab CE C<v10.4.1>.
=head1 DESCRIPTION
B<All of these methods require administrator permissions.>
The methods behave same for users, groups and projects.
=over
=item L<List custom attributes|https://docs.gitlab.com/ce/api/custom_attributes.html#list-custom-attributes>
$attributes = $gitlab->user_custom_attributes( :uid );
$attributes = $gitlab->group_custom_attributes( :gid );
$attributes = $gitlab->project_custom_attributes( :id );
Returns a list of custom attributes.
=item L<Single custom attribute|https://docs.gitlab.com/ce/api/custom_attributes.html#single-custom-attribute>
$attribute = $gitlab->user_get_custom_attribute( :uid, :key );
$attribute = $gitlab->group_get_custom_attribute( :gid, :key );
$attribute = $gitlab->project_get_custom_attribute( :id, :key );
Retrieves a single attribute.
=item L<Set custom attribute|https://docs.gitlab.com/ce/api/custom_attributes.html#set-custom-attribute>
$gitlab->user_set_custom_attribute( :uid, :key, :value );
$gitlab->group_set_custom_attribute( :gid, :key, :value );
$gitlab->project_set_custom_attribute( :id, :key, :value );
Sets the custom attribute to the given value. The attribute will be created
if necessary.
=item L<Delete custom attribute|https://docs.gitlab.com/ce/api/custom_attributes.html#delete-custom-attribute>
$gitlab->user_delete_custom_attribute( :uid, :key );
$gitlab->group_delete_custom_attribute( :gid, :key );
$gitlab->project_delete_custom_attribute( :id, :key );
Deletes a custom attribute.
=back
=head1 AUTHOR
Roman Lacko <L<xlacko1@fi.muni.cz>>
......
......@@ -70,38 +70,6 @@ GitLab::Events - implements events API calls
See L<GitLab API -- Events|https://docs.gitlab.com/ce/api/events.html> for details and
response formats.
=head1 VERSION
Implements API calls for GitLab CE C<v10.4.1>.
=head1 DESCRIPTION
=over
=item L<self_events()|https://docs.gitlab.com/ce/api/events.html#list-currently-authenticated-user-39-s-events>
$events = $gitlab->self_events( [:action,] [:target_type,] ... );
Returns events associated with the authenticated user.
=item L<user_events()|https://docs.gitlab.com/ce/api/events.html#get-user-contribution-events>
$events = $gitlab->user_events( :uid, [:action,] [:target_type,] ... );
Returns contribution events for the given user.
=item L<project_events()|https://docs.gitlab.com/ce/api/events.html#list-a-project-39-s-visible-events>
$events = $gitlab->project_events( :uid, [:action,] [:target_type,] ... );
Returns events associated with the given project.
=back
=head1 AUTHOR
Roman Lacko <L<xlacko1@fi.muni.cz>>
=head1 SEE ALSO
=over
......
......@@ -131,96 +131,6 @@ GitLab::Groups - implements group API calls
See L<GitLab API -- Groups|http://doc.gitlab.com/ce/api/groups.html> for details and
response formats.
=head1 VERSION
Implements API calls for GitLab CE C<v10.4.1>.
=head1 DESCRIPTION
=head2 Notation
Please see the documentation for the L<GitLab::Users> module.
Note that not all optional arguments are listed.
Please refer to the official documentation for the full list.
=head2 Group CRUD operations
=over
=item L<groups()|https://docs.gitlab.com/ce/api/groups.html#list-groups>
$groups = $gitlab->groups( [:search] [:all_available] [:owned] );
Returns a list of groups.
An optional parameter C<search> can be used to filter the list by substring match on C<name>.
=item L<subgroups()|https://docs.gitlab.com/ce/api/groups.html#list-a-groups-39-s-subgroups>
$subgroups = $gitlab->subgroups( :gid );
Returns subgroups of the given group.
Accepts same filtering parameters as L</groups()>.
=item L<group_details()|https://docs.gitlab.com/ce/api/groups.html#details-of-a-group>
$details = $gitlab->group_details( :gid );
Returns details about a group with the given C<gid>.
=item L<group_create()|https://docs.gitlab.com/ce/api/groups.html#new-group>
$group = $gitlab->group_create( :name, :path, [:description], [:visibility] );
Creates a new group. Required arguments are
name the name of the group,
path the path for the group (must be unique)
In addition, the following I<optional> arguments can be specified:
description group's description
visibility see GitLab::API for possible values
=item L<group_update()|https://docs.gitlab.com/ce/api/groups.html#update-group>
$group = $gitlab->group_update( :gid );
Updates the grup with the given C<gid>.
Takes same arguments as C<group_create>, except they are all optional.
=item L<group_delete()|https://docs.gitlab.com/ce/api/groups.html#remove-group>
$gitlab->group_delete( :gid );
Deletes the group with the given C<gid>.
=back
=head2 Group members
This section was moved to a separate module L<GitLab::Members>.
=head2 Group projects and transfer
=over
=item L<group_get_projects()|https://docs.gitlab.com/ce/api/groups.html#list-a-group-39-s-projects>
$projects = $gitlab->group_get_projects( :gid );
Returns a list of projects owned by the group with the given C<gid>.
=item L<transfer_project_to_group()|https://docs.gitlab.com/ce/api/groups.html#transfer-project-to-group>
$gitlab->transfer_project_to_group( :gid, :projid );
Moves the project with C<projid> to the namespace of the group with the given C<gid>.
I<This method is available only for administrators.>
=back
=head1 AUTHOR
Roman Lacko <L<xlacko1@fi.muni.cz>>
......
......@@ -83,64 +83,6 @@ GitLab::Jobs - implements jobs API calls
See L<GitLab API -- Jobs|https://docs.gitlab.com/ee/api/jobs.html> for details and
response formats.
=head1 VERSION
Implements API calls for GitLab CE C<v10.4.1>.
=head1 DESCRIPTION
=over
=item L<project_jobs()|https://docs.gitlab.com/ee/api/jobs.html#list-project-jobs>
$jobs = $gitlab->project_jobs( :pid[, :scope]);
Get a list of jobs in a project.
=item L<pipeline_jobs()|https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-jobs>
$jobs = $gitlab->pipeline_jobs( :pid, :pipeline_id[, :scope]);
Get a list of jobs for a pipeline.
=item L<job()|https://docs.gitlab.com/ee/api/jobs.html#get-a-single-job>
$jobs = $gitlab->job( :pid, :job_id );
Get a single job of a project.
=item L<job_cancel()|https://docs.gitlab.com/ee/api/jobs.html#cancel-a-job>
$gitlab->job_cancel( :pid, :job_id );
Cancel a single job of a project.
=item L<job_retry()|https://docs.gitlab.com/ee/api/jobs.html#retry-a-job>
$gitlab->job_retry( :pid, :job_id );
Retry a single job of a project.
=item L<job_erase()|https://docs.gitlab.com/ee/api/jobs.html#erase-a-job>
$gitlab->job_erase( :pid, :job_id );
Erase a single job of a project (remove job artifacts and a job trace).
=item L<keep_artifacts()|https://docs.gitlab.com/ee/api/jobs.html#keep-artifacts>
$gitlab->keep_artifacts( :pid, :job_id );
Prevents artifacts from being deleted when expiration is set.
=item L<job_play()|https://docs.gitlab.com/ee/api/jobs.html#play-a-job>
$gitlab->job_play( :pid, :job_id );
Triggers a manual action to start a job.
=back
=head1 AUTHOR
Roman Lacko <L<xlacko1@fi.muni.cz>>
......
......@@ -101,82 +101,6 @@ GitLab::Members - implements group and project members API calls
See L<GitLab API -- Group and Project Members|https://docs.gitlab.com/ce/api/members.html> for details and
response formats.
=head1 VERSION
Implements API calls for GitLab CE C<v10.4.1>.
=head1 DESCRIPTION
=head2 Notation
Please see the documentation for the L<GitLab::Users> module.
Note that not all optional arguments are listed.
Please refer to the official documentation for the full list.
=head2 Group and Project Members
=over
=item L<group_members()|https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project>
=item L<project_members()|https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project>
$members = $gitlab->group_members( :gid );
$members = $gitlab->project_members( :id );
Returns a list of members of the namespace specified by C<gid> or C<id>.
=item L<group_get_member()|https://docs.gitlab.com/ce/api/members.html#get-a-member-of-a-group-or-project>
=item L<project_get_member()|https://docs.gitlab.com/ce/api/members.html#get-a-member-of-a-group-or-project>
$gitlab->group_get_member( :gid, :user_id )
$gitlab->project_get_member( :id, :user_id )
Returns the information about a member of the group or project.
Can also be used to check whether the given user is a member of the group if used with C<< -immortal => 1 >>:
if (defined $gitlab->group_get_member(gid => $gid, $user_id => $user_id, -immortal => 1)) {
# is a member
} else {
# not a member
}
=item L<group_add_member()|https://docs.gitlab.com/ce/api/members.html#add-a-member-to-a-group-or-project>
=item L<project_add_member()|https://docs.gitlab.com/ce/api/members.html#add-a-member-to-a-group-or-project>
$gitlab->group_add_member( :gid, :user_id, :access_level, [:expires_at] );
$gitlab->project_add_member( :id, :user_id, :access_level, [:expires_at] );
Adds a user with C<user_id> to the group with the given C<gid> with the specified C<access_level>.
Similarly for the project API.
See L<GitLab::API> module for possible access level values.
The optional argument C<expires_at> expects format C<YYYY-MM-DD>.
=item L<group_update_member()|https://docs.gitlab.com/ce/api/members.html#edit-a-member-of-a-group-or-project>
=item L<project_update_member()|https://docs.gitlab.com/ce/api/members.html#edit-a-member-of-a-group-or-project>
$gitlab->group_update_member( :gid, :user_id, :access_level, [:expires_at] );
$gitlab->project_update_member( :id, :user_id, :access_level, [:expires_at] );
For user with the given C<user_id> the function changes his C<access_level> in the group with the specified C<gid>.
It can also remove the C<expires_at> property if set to C<undef>.
=item L<group_delete_member()|https://docs.gitlab.com/ce/api/members.html#remove-a-member-from-a-group-or-project>
=item L<project_delete_member()|https://docs.gitlab.com/ce/api/members.html#remove-a-member-from-a-group-or-project>
$gitlab->group_delete_member( :gid, :user_id );
$gitlab->project_delete_member( :id, :user_id );
Removes the user with C<user_id> from the group with the specified C<gid>
or a project specidied by the C<id>.
=back
=head1 AUTHOR
Roman Lacko <L<xlacko1@fi.muni.cz>>
......
......@@ -57,40 +57,6 @@ See L<GitLab API -- Namespaces|http://doc.gitlab.com/ce/api/namespaces.html> for
my $namespaces = $api->namespaces(search => "group1");
my $namespace = $api->namespace_by_id(id => 10);
=head1 VERSION
Implements API calls for GitLab CE C<v10.4.1>.
=head1 DESCRIPTION
From GitLab API: I<"Usernames and groupnames fall under a special category called namespaces.">
=over
=item L<namespaces()|https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces>
$namespaces = $gitlab->namespaces();
$namespaces = $gitlab->namespaces(search => $what);
Returns all namespaces for currently authenticated user.
If an optional argument C<search> is used, only those namespaces that contain the requested string are returned.
To get namespaces of user with login C<$login>, you can do this:
$gitlab->sudo($login);
$namespaces = $gitlab->namespaces();
Note that the authenticated user must be an administrator to use L<GitLab::API/sudo>.
If the user with login C<$login> is an administrator, the call will return B<all> namespaces.
=item L<namespace_by_id()|https://docs.gitlab.com/ce/api/namespaces.html#get-namespace-by-id>
$namespace = $gitlab->namespace_by_id( :id )
Returns a given namespace by its C<id>.
=back
=head1 AUTHOR
Roman Lacko <L<xlacko1@fi.muni.cz>>
......
......@@ -375,216 +375,6 @@ GitLab::Projects - implements projects API calls
See L<GitLab API -- Projects|http://doc.gitlab.com/ce/api/projects.html> for details and
response formats.
=head1 VERSION
Implements API calls for GitLab CE C<v10.4.1>.
=head1 DESCRIPTION
=head2 Notation
Please see the documentation for the L<GitLab::Users> module.
Note that not all optional arguments are listed.
Please refer to the official documentation for the full list.
=head2 Project listing
=over
=item L<projects()|https://docs.gitlab.com/ce/api/projects.html#list-projects>
$gitlab->projects([...]);
Returns a list of projects accessible to the authenticated user.
=item L<project_by_id()|https://docs.gitlab.com/ce/api/projects.html#get-single-project>
$gitlab->project_by_id( :id );
Returns the project with the given ID, which can be either a number or a string C<"namespace/project_name">.
=item L<project_users()|https://docs.gitlab.com/ce/api/projects.html#get-project-users>
B<This method has been removed from API>.
Use L<GitLab::Members::project_members()|GitLab::Members/project_members()> instead.
=item L<project_events()|https://docs.gitlab.com/ce/api/projects.html#get-project-events>
This method has been moved to
L<GitLab::Events::project_evens()|GitLab::Events/project_events()>.
=back
=head2 Create, edit and delete projects
=over
=item L<project_create()|https://docs.gitlab.com/ce/api/projects.html#create-project>
$gitlab->project_create( (:name|:path) [...] );
Creates a new project in the authenticated user's namespace.
Other namespaces can be specified by the optional C<namespace_id> parameter if the user can access it.
=item L<project_create_for_user()|https://docs.gitlab.com/ce/api/projects.html#create-project-for-user>
$gitlab->project_create_for_user( :uid, :name );
Creates a new project for the user with the given C<uid>.
B<This method is available only for administrators.>
=item L<project_edit()|https://docs.gitlab.com/ce/api/projects.html#edit-project>
$gitlab->project_edit( :id, [...] );
Edits the project.
Takes the same arguments as L<project_create>, except they are all optional.
=item L<project_fork()|https://docs.gitlab.com/ce/api/projects.html#fork-project>
$gitlab->project_fork( :id, [:namespace ] );
Forks the project to the authenticated user's namespace or the namespace specified by the C<namespace> as an id or path.
=item L<project_star()|https://docs.gitlab.com/ce/api/projects.html#star-a-project>
$gitlab->project_star( :id );
Stars a given project.
Returns C<304 Not Modified> if already stared.
=item L<project_unstar()|https://docs.gitlab.com/ce/api/projects.html#unstar-a-project>
$gitlab->project_unstar( :id );
Unstars a given project.
Returns C<304 Not Modified> if not stared.
=item L<project_archive()|https://docs.gitlab.com/ce/api/projects.html#archive-a-project>
$gitlab->project_archive( :id );
Archives the given project.
The user must be either an administrator or the owner of the project.
=item L<project_unarchive()|https://docs.gitlab.com/ce/api/projects.html#unarchive-a-project>
$gitlab->project_unarchive( :id );
Unarchives the given project.
The user must be either an administrator or the owner of the project.
=item L<project_delete()|https://docs.gitlab.com/ce/api/projects.html#remove-project>
$gitlab->project_delete( :id );
Deletes the project with the given C<id>.
=back
=head2 Uploads
=over
=item L<project_upload_file()|https://docs.gitlab.com/ce/api/projects.html#upload-a-file>
B<NOT SUPPORTED YET>
=back
=head2 Project Members
See L<GitLab::Members> module.
=head2 Share project with a group
=over
=item L<project_share()|https://docs.gitlab.com/ce/api/projects.html#share-project-with-group>
$gitlab->project_share( :id, :group_id, :group_access, [:expires_at] );
Allow to share project with group.
=item L<project_unshare()|https://docs.gitlab.com/ce/api/projects.html#delete-a-shared-project-link-within-a-group>
$gitlab->project_unshare( :id, :group_id );
Unshare the project from the group. Returns C<204 No Content> on success.
=back
=head2 Hooks
=over
=item L<project_hooks()|https://docs.gitlab.com/ce/api/projects.html#list-project-hooks>
$gitlab->project_hooks( :id );
Get a list of project hooks.
=item L<project_get_hook()|https://docs.gitlab.com/ce/api/projects.html#get-project-hook>
$gitlab->project_get_hook( :id, :hook_id )
Get a specific hook for a project.
=item L<project_add_hook()|https://docs.gitlab.com/ce/api/projects.html#add-project-hook>
$gitlab->project_add_hook( :id, :url, [...]);
Adds a hook to a specified project.
=item L<project_edit_hook()|https://docs.gitlab.com/ce/api/projects.html#edit-project-hook>
$gitlab->project_edit_hook( :id, :hook_id, [...]);
Edits a hook for a specified project.
=item L<project_delete_hook()|https://docs.gitlab.com/ce/api/projects.html#delete-project-hook>
$gitlab->project_delete_hook( :id, :hook_id );
Removes a hook from a project.
This is an idempotent method and can be called multiple times.
Note the JSON response differs if the hook is available or not.
If the project hook is available before it is returned in the JSON response or an empty response is returned.
=back
=head2 Branches
See L<GitLab::Branches> module.
=head2 Miscellaneous
=over
=item L<project_create_forked_relationship()|https://docs.gitlab.com/ce/api/projects.html#create-a-forked-from-to-relation-between-existing-projects>
$gitlab->project_create_forked_relationship( :id :forked_from_id );
Create a I<forked from> relation between existing projects.