Build.PL 100644 000766 000024 455 13621075102 14304 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25 # =========================================================================
# THIS FILE IS AUTOMATICALLY GENERATED BY MINILLA.
# DO NOT EDIT DIRECTLY.
# =========================================================================
use 5.008_001;
use strict;
use Module::Build::Tiny 0.035;
Build_PL();
Changes 100644 000766 000024 14363 13621075102 14346 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25 Revision history for Perl extension GitLab-API-v4.
0.25 2020-02-12T22:20:48Z
- Add the delete_pipeline method.
0.24 2020-02-12T22:09:39Z
- Add all the container registry methods.
- Add http_tiny_request and http_tiny_response to ::RESTClient. This
should help people debug issues easier.
0.23 2019-10-18T19:55:06Z
- Fix delete_runner so that it doesn't try to decode the response.
- Any 204 response now just blanket returns undef.
- More contextual JSON decoding error messages.
0.22 2019-09-13T15:02:28Z
- Add the statistics method.
- The delete_user method can now take parameters, allowing for use of
the hard_delete parameter.
0.21 2019-08-24T18:56:13Z
- The release endpoint returns a 403 on an unknown tag rather than a
404 like it should. This condition is now detected and treated
like a 404.
0.20 2019-07-23T21:42:37Z
- The preexisting create_release and edit_release methods have been
renamed to create_tag_release and update_tag_release to make room
for the new releases API.
- Added methods for the new (added in GitLab 11.7) releases and
release links APIs.
0.19 2019-05-17T20:40:22Z
- Live tests now run against GitLab CE 11.10.4 (was 11.2.3).
- Add GitLab::API::v4::WWWClient.
- Add GitLab::API::v4::Mock for writing unit tests.
- Switch to the GNU General Public License version 3.
0.18 2019-04-01T04:35:02Z
- Add SUPPORT section to the docs.
- The archive method no longer tries to decode the response.
- Add the commit_refs method.
- Add the trigger_pipeline method.
- Document some create_pipeline method parameters.
0.17 2019-02-20T22:47:58Z
- Require perl 5.10.1 as I give up trying to support 5.8 due to other
modules requiring 5.10 and strictures/multidimensional issues.
- Simplify VERSION declarations.
0.16 2019-02-18T06:21:15Z
- Migrate build tooling from Dist::Zilla to Minilla.
0.15 2019-01-09
- BREAKING CHANGE: gitlab-api-v4 now takes parameters in the form of
param:value rather than --param=value. This is to avoid foot-gun
ambiguities when options have the same names as parameters (such
as --url).
- Add --pretty and --canonical options to gitlab-api-v4.
0.14 2018-12-04
- Add all_project_members and all_group_members methods.
- gitlab-api-v4 now handles -- like you'd expect your typical linux
tooling would.
0.13 2018-11-08
- group() now accepts parameters.
- Add the transfer_project_to_namespace() method.
0.12 2018-09-11
- Added API methods for Protected Tags, Search, Project
Import/Export, Project Badges, Resource Label Events, Discussions,
Markdown, Group Issue Boards, Group Badges, and Snippets.
- Reorganized project/group members/access requests sections to
better match the official API.
- Renamed the various project snippet methods to have "project" in
their name.
- Added constants for the snippet visibility levels.
- Overhauled the POD heading layout in order to avoid the massive
TOC.
- Fix minor typo.
0.11 2018-09-01
- Fixed the raw_file method to not try to decode the respository file
contents and instead just return the undecoded response content.
- Renamed the POD section "FILE METHODS" to
"REPOSITORY FILE METHODS", to better match the GitLab API docs.
- Add the hidden NO_ACCESS constant to ::Constants.
- Live tests now run against GitLab CE 11.2.3 (was 10.2.2).
0.10 2018-06-05
- Fix project_hook() so it uses the correct path.
- create_project_hook() and edit_project_hook() now return their
decoded response (the hook).
- delete_project_hook() no longer tries to return anything as a
successful delete is a 204 (no content) and a failed one is a 404.
- Tests for all of the above.
- Fix typo.
0.09 2018-05-28
- Ensure chmod 600 of ~/.gitlab-api-v4-config is maintained.
- Enable and fix upload_file_to_project by using
HTTP::Tiny::Multipart.
- Individual methods may now have a custom note added to their POD.
- Added a self-contained unit test, unit.t, which can be expanded on
in the future. This is unlike regression.t which requires that a
GitLab installation be available.
- Added the rest_client_class argument.
0.08 2018-05-14
- Many API endpoints which return lists and did not support
parameters now do in order for pagination arguments, and the
paginator, to be used with them.
- Add project_languages method.
- Remove upload_file_to_project since it doesn't work. Will re-add
when it is made to work later.
0.07 2018-05-10
- Completely overhaul ::RestClient to use HTTP::Tiny instead of
Role::REST::Client. This change will make it much easier to alter
the behavior of the HTTP communication.
- ::RestClient now supports the ability to decode non-ref JSON, such
as unblock_user which returns just a JSON boolean.
- block_user and unblock_user now return their decoded response.
- delete_user is no longer expected to return anything.
- Response decoding will now only be attempted for methods which are
expected to return something. Slight optimization.
- A 404 on a non-returning method throws an exception now, matching
the docs.
- The *_token arguments are now stored in a closure to help users
avoid accidentally dumping them somewhere such as logs.
- Added all methods for the TODO API.
0.06 2018-04-09
- Add the project_service method.
0.05 2018-03-06
- Fixup gitlab-api-v4 to support parameters who's values are empty or
have whitespace in them.
0.04 2018-02-03
- Support parameters in the project method.
- Allow wide characters when printing the response output in the
gitlab-api-v4 script.
0.03 2018-01-12
- Greatly extended authentication and configuration options for the
gitlab-api-v4 script; added GitLab::API::v4::Config.
- The gitlab-api-v4 script now always outputs JSON (the default was
YAML, with the option to pick other formats).
- Fixed the fork_project method to hit the correct URL.
0.02 2017-12-15
- Fix double-slashes in URL paths.
- Fixed gitlab-api-v4 script to actually work.
0.01 2017-12-11
- Added the sudo method and the sudo_user argument.
- Split the token arguments into the access_token and private_token
arguments.
- Removed the login/email/password arguments as they are not
supported by v4.
- Many many methods added/removed/renamed/modified.
- Imported GitLab::API::v3 @
fb9253c58b68ca1be71feedf12c1d6004c8ba8d6.
LICENSE 100644 000766 000024 104515 13621075102 14077 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
META.json 100644 000766 000024 10406 13621075102 14466 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25 {
"abstract" : "A complete GitLab API v4 client.",
"author" : [
"Aran Clary Deltac "
],
"dynamic_config" : 0,
"generated_by" : "Minilla/v3.1.4",
"license" : [
"gpl_3"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "GitLab-API-v4",
"no_index" : {
"directory" : [
"t",
"xt",
"inc",
"share",
"eg",
"examples",
"author",
"builder"
]
},
"prereqs" : {
"configure" : {
"requires" : {
"Module::Build::Tiny" : "0.035"
}
},
"develop" : {
"requires" : {
"Test::CPAN::Meta" : "0",
"Test::MinimumVersion::Fast" : "0.04",
"Test::PAUSE::Permissions" : "0.04",
"Test::Pod" : "1.41",
"Test::Spellunker" : "v0.2.7"
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
"Const::Fast" : "0.014",
"Exporter" : "0",
"Getopt::Long" : "0",
"HTTP::Tiny" : "0.059",
"HTTP::Tiny::Multipart" : "0.05",
"IO::Prompter" : "0.004014",
"JSON" : "2.59",
"Log::Any" : "1.703",
"Log::Any::Adapter" : "1.703",
"Log::Any::Adapter::Screen" : "0.13",
"Moo" : "2.003000",
"Path::Tiny" : "0.079",
"Pod::Usage" : "0",
"Try::Tiny" : "0.28",
"Types::Common::Numeric" : "1.002001",
"Types::Common::String" : "1.002001",
"Types::Standard" : "1.002001",
"URI" : "1.62",
"URI::Escape" : "1.72",
"namespace::clean" : "0.27",
"perl" : "5.010001",
"strictures" : "2.000003"
}
},
"test" : {
"requires" : {
"Log::Any::Adapter::TAP" : "0.003003",
"MIME::Base64" : "3.15",
"Test2::V0" : "0.000094"
}
}
},
"provides" : {
"GitLab::API::v4" : {
"file" : "lib/GitLab/API/v4.pm",
"version" : "0.25"
},
"GitLab::API::v4::Config" : {
"file" : "lib/GitLab/API/v4/Config.pm",
"version" : "0.25"
},
"GitLab::API::v4::Constants" : {
"file" : "lib/GitLab/API/v4/Constants.pm",
"version" : "0.25"
},
"GitLab::API::v4::Mock" : {
"file" : "lib/GitLab/API/v4/Mock.pm",
"version" : "0.25"
},
"GitLab::API::v4::Mock::Engine" : {
"file" : "lib/GitLab/API/v4/Mock/Engine.pm",
"version" : "0.25"
},
"GitLab::API::v4::Mock::RESTClient" : {
"file" : "lib/GitLab/API/v4/Mock/RESTClient.pm",
"version" : "0.25"
},
"GitLab::API::v4::Paginator" : {
"file" : "lib/GitLab/API/v4/Paginator.pm",
"version" : "0.25"
},
"GitLab::API::v4::RESTClient" : {
"file" : "lib/GitLab/API/v4/RESTClient.pm",
"version" : "0.25"
},
"GitLab::API::v4::WWWClient" : {
"file" : "lib/GitLab/API/v4/WWWClient.pm",
"version" : "0.25"
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/bluefeet/GitLab-API-v4/issues"
},
"homepage" : "https://github.com/bluefeet/GitLab-API-v4",
"repository" : {
"url" : "git://github.com/bluefeet/GitLab-API-v4.git",
"web" : "https://github.com/bluefeet/GitLab-API-v4"
}
},
"version" : "0.25",
"x_authority" : "cpan:BLUEFEET",
"x_contributors" : [
"Dave Webb ",
"Dmitry Frolov ",
"Dotan Dimet ",
"José Joaquín Atria ",
"Kieren Diment ",
"Luc Didry ",
"Marek R. Sotola ",
"Nigel Gregoire ",
"Simon Ruderich ",
"Thomas Klausner ",
"gregor herrmann ",
"royce55 ",
"trunov-ms "
],
"x_serialization_backend" : "JSON::PP version 4.04",
"x_static_install" : 1
}
README.md 100644 000766 000024 367631 13621075102 14363 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25 # NAME
GitLab::API::v4 - A complete GitLab API v4 client.
# SYNOPSIS
```perl
use GitLab::API::v4;
my $api = GitLab::API::v4->new(
url => $v4_api_url,
private_token => $token,
);
my $branches = $api->branches( $project_id );
```
# DESCRIPTION
This module provides a one-to-one interface with the GitLab
API v4. Much is not documented here as it would just be duplicating
GitLab's own [API Documentation](http://doc.gitlab.com/ce/api/README.html).
Note that this distribution also includes the [gitlab-api-v4](https://metacpan.org/pod/gitlab-api-v4) command-line
interface (CLI).
## Upgrading
If you are upgrading from [GitLab::API::v3](https://metacpan.org/pod/GitLab::API::v3) make sure you read:
[https://docs.gitlab.com/ce/api/v3\_to\_v4.html](https://docs.gitlab.com/ce/api/v3_to_v4.html)
Also, review the `Changes` file included in the distribution as it outlines
the changes made to convert the v3 module to v4:
[https://github.com/bluefeet/GitLab-API-v4/blob/master/Changes](https://github.com/bluefeet/GitLab-API-v4/blob/master/Changes)
Finally, be aware that many methods were added, removed, renamed, and/or altered.
If you want to review exactly what was changed you can use GitHub's compare tool:
[https://github.com/bluefeet/GitLab-API-v4/compare/72e384775c9570f60f8ef68dee3a1eecd347fb69...master](https://github.com/bluefeet/GitLab-API-v4/compare/72e384775c9570f60f8ef68dee3a1eecd347fb69...master)
Or clone the repo and run this command:
`git diff 72e384775c9570f60f8ef68dee3a1eecd347fb69..HEAD -- author/sections/`
## Credentials
Authentication credentials may be defined by setting either the ["access\_token"](#access_token)
or ["private\_token"](#private_token) arguments.
If no credentials are supplied then the client will be anonymous and greatly
limited in what it can do with the API.
Extra care has been taken to hide the token arguments behind closures. This way,
if you dump your api object, your tokens won't accidentally leak into places you
don't want them to.
## Constants
The GitLab API, in rare cases, uses a hard-coded value to represent a state.
To make life easier the [GitLab::API::v4::Constants](https://metacpan.org/pod/GitLab::API::v4::Constants) module exposes
these states as named variables.
## Exceptions
The API methods will all throw 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](https://metacpan.org/pod/Try::Tiny).
## Logging
This module uses [Log::Any](https://metacpan.org/pod/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.
## Project ID
Note that many API calls require a `$project_id`. This can be
specified as a numeric project `ID` or, in many cases, maybe all cases,
as a `NAMESPACE_PATH/PROJECT_PATH` string. The GitLab documentation on
this point is vague.
# REQUIRED ARGUMENTS
## url
The URL to your v4 API endpoint. Typically this will be something
like `https://git.example.com/api/v4`.
# OPTIONAL ARGUMENTS
## access\_token
A GitLab API OAuth2 token. If set then ["private\_token"](#private_token) may not be set.
See [https://docs.gitlab.com/ce/api/#oauth2-tokens](https://docs.gitlab.com/ce/api/#oauth2-tokens).
## private\_token
A GitLab API personal token. If set then ["access\_token"](#access_token) may not be set.
See [https://docs.gitlab.com/ce/api/#personal-access-tokens](https://docs.gitlab.com/ce/api/#personal-access-tokens).
## retries
The number of times the request should be retried in case it fails (5XX HTTP
response code). Defaults to `0` (false), meaning that a failed request will
not be retried.
## sudo\_user
The user to execute API calls as. You may find it more useful to use the
["sudo"](#sudo) method instead.
See [https://docs.gitlab.com/ce/api/#sudo](https://docs.gitlab.com/ce/api/#sudo).
## rest\_client
An instance of [GitLab::API::v4::RESTClient](https://metacpan.org/pod/GitLab::API::v4::RESTClient) (or whatever ["rest\_client\_class"](#rest_client_class)
is set to). Typically you will not be setting this as it defaults to a new
instance and customization should not be necessary.
## rest\_client\_class
The class to use when constructing the ["rest\_client"](#rest_client).
Defaults to [GitLab::API::v4::RESTClient](https://metacpan.org/pod/GitLab::API::v4::RESTClient).
# UTILITY METHODS
## paginator
```perl
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::v4::Paginator](https://metacpan.org/pod/GitLab::API::v4::Paginator)
object that will allow you to walk the records one page or one record
at a time.
## sudo
```
$api->sudo('fred')->create_issue(...);
```
Returns a new instance of [GitLab::API::v4](https://metacpan.org/pod/GitLab::API::v4) with the ["sudo\_user"](#sudo_user) argument
set.
See [https://docs.gitlab.com/ce/api/#sudo](https://docs.gitlab.com/ce/api/#sudo).
# API METHODS
## Award Emoji
See [https://docs.gitlab.com/ce/api/award\_emoji.html](https://docs.gitlab.com/ce/api/award_emoji.html).
- issue\_award\_emojis
```perl
my $award_emojis = $api->issue_award_emojis(
$project_id,
$issue_iid,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/award_emoji` and returns the decoded response content.
- merge\_request\_award\_emojis
```perl
my $award_emojis = $api->merge_request_award_emojis(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/award_emoji` and returns the decoded response content.
- snippet\_award\_emojis
```perl
my $award_emojis = $api->snippet_award_emojis(
$project_id,
$merge_request_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_id/award_emoji` and returns the decoded response content.
- issue\_award\_emoji
```perl
my $award_emoji = $api->issue_award_emoji(
$project_id,
$issue_iid,
$award_id,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/award_emoji/:award_id` and returns the decoded response content.
- merge\_request\_award\_emoji
```perl
my $award_emoji = $api->merge_request_award_emoji(
$project_id,
$merge_request_iid,
$award_id,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/award_emoji/:award_id` and returns the decoded response content.
- snippet\_award\_emoji
```perl
my $award_emoji = $api->snippet_award_emoji(
$project_id,
$snippet_id,
$award_id,
);
```
Sends a `GET` request to `projects/:project_id/snippets/:snippet_id/award_emoji/:award_id` and returns the decoded response content.
- create\_issue\_award\_emoji
```perl
my $award_emoji = $api->create_issue_award_emoji(
$project_id,
$issue_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/award_emoji` and returns the decoded response content.
- create\_merge\_request\_award\_emoji
```perl
my $award_emoji = $api->create_merge_request_award_emoji(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/award_emoji` and returns the decoded response content.
- create\_snippet\_award\_emoji
```perl
my $award_emoji = $api->create_snippet_award_emoji(
$project_id,
$snippet_id,
);
```
Sends a `POST` request to `projects/:project_id/snippets/:snippet_id/award_emoji` and returns the decoded response content.
- delete\_issue\_award\_emoji
```perl
my $award_emoji = $api->delete_issue_award_emoji(
$project_id,
$issue_id,
$award_id,
);
```
Sends a `DELETE` request to `projects/:project_id/issues/:issue_id/award_emoji/:award_id` and returns the decoded response content.
- delete\_merge\_request\_award\_emoji
```perl
my $award_emoji = $api->delete_merge_request_award_emoji(
$project_id,
$merge_request_id,
$award_id,
);
```
Sends a `DELETE` request to `projects/:project_id/merge_requests/:merge_request_id/award_emoji/:award_id` and returns the decoded response content.
- delete\_snippet\_award\_emoji
```perl
my $award_emoji = $api->delete_snippet_award_emoji(
$project_id,
$snippet_id,
$award_id,
);
```
Sends a `DELETE` request to `projects/:project_id/snippets/:snippet_id/award_emoji/:award_id` and returns the decoded response content.
- issue\_note\_award\_emojis
```perl
my $award_emojis = $api->issue_note_award_emojis(
$project_id,
$issue_iid,
$note_id,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji` and returns the decoded response content.
- issue\_note\_award\_emoji
```perl
my $award_emoji = $api->issue_note_award_emoji(
$project_id,
$issue_iid,
$note_id,
$award_id,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id` and returns the decoded response content.
- create\_issue\_note\_award\_emoji
```perl
my $award_emoji = $api->create_issue_note_award_emoji(
$project_id,
$issue_iid,
$note_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji` and returns the decoded response content.
- delete\_issue\_note\_award\_emoji
```perl
my $award_emoji = $api->delete_issue_note_award_emoji(
$project_id,
$issue_iid,
$note_id,
$award_id,
);
```
Sends a `DELETE` request to `projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id` and returns the decoded response content.
- merge\_request\_note\_award\_emojis
```perl
my $award_emojis = $api->merge_request_note_award_emojis(
$project_id,
$merge_request_iid,
$note_id,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji` and returns the decoded response content.
- merge\_request\_note\_award\_emoji
```perl
my $award_emoji = $api->merge_request_note_award_emoji(
$project_id,
$merge_request_iid,
$note_id,
$award_id,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji/:award_id` and returns the decoded response content.
- create\_merge\_request\_note\_award\_emoji
```perl
my $award_emoji = $api->create_merge_request_note_award_emoji(
$project_id,
$merge_request_iid,
$note_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji` and returns the decoded response content.
- delete\_merge\_request\_note\_award\_emoji
```perl
my $award_emoji = $api->delete_merge_request_note_award_emoji(
$project_id,
$merge_request_iid,
$note_id,
$award_id,
);
```
Sends a `DELETE` request to `projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji/:award_id` and returns the decoded response content.
## Branches
See [https://docs.gitlab.com/ce/api/branches.html](https://docs.gitlab.com/ce/api/branches.html).
- branches
```perl
my $branches = $api->branches(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/branches` and returns the decoded response content.
- branch
```perl
my $branch = $api->branch(
$project_id,
$branch_name,
);
```
Sends a `GET` request to `projects/:project_id/repository/branches/:branch_name` and returns the decoded response content.
- create\_branch
```perl
my $branch = $api->create_branch(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/repository/branches` and returns the decoded response content.
- delete\_branch
```
$api->delete_branch(
$project_id,
$branch_name,
);
```
Sends a `DELETE` request to `projects/:project_id/repository/branches/:branch_name`.
- delete\_merged\_branches
```
$api->delete_merged_branches(
$project_id,
);
```
Sends a `DELETE` request to `projects/:project_id/repository/merged_branches`.
## Broadcast Messages
See [https://docs.gitlab.com/ce/api/broadcast\_messages.html](https://docs.gitlab.com/ce/api/broadcast_messages.html).
- broadcast\_messages
```perl
my $messages = $api->broadcast_messages(
\%params,
);
```
Sends a `GET` request to `broadcast_messages` and returns the decoded response content.
- broadcast\_message
```perl
my $message = $api->broadcast_message(
$message_id,
);
```
Sends a `GET` request to `broadcast_messages/:message_id` and returns the decoded response content.
- create\_broadcast\_message
```perl
my $message = $api->create_broadcast_message(
\%params,
);
```
Sends a `POST` request to `broadcast_messages` and returns the decoded response content.
- edit\_broadcast\_message
```perl
my $message = $api->edit_broadcast_message(
$message_id,
\%params,
);
```
Sends a `PUT` request to `broadcast_messages/:message_id` and returns the decoded response content.
- delete\_broadcast\_message
```
$api->delete_broadcast_message(
$message_id,
);
```
Sends a `DELETE` request to `broadcast_messages/:message_id`.
## Project-level Variables
See [https://docs.gitlab.com/ce/api/project\_level\_variables.html](https://docs.gitlab.com/ce/api/project_level_variables.html).
- project\_variables
```perl
my $variables = $api->project_variables(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/variables` and returns the decoded response content.
- project\_variable
```perl
my $variable = $api->project_variable(
$project_id,
$variable_key,
);
```
Sends a `GET` request to `projects/:project_id/variables/:variable_key` and returns the decoded response content.
- create\_project\_variable
```perl
my $variable = $api->create_project_variable(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/variables` and returns the decoded response content.
- edit\_project\_variable
```perl
my $variable = $api->edit_project_variable(
$project_id,
$variable_key,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/variables/:variable_key` and returns the decoded response content.
- delete\_project\_variable
```
$api->delete_project_variable(
$project_id,
$variable_key,
);
```
Sends a `DELETE` request to `projects/:project_id/variables/:variable_key`.
## Group-level Variables
See [https://docs.gitlab.com/ce/api/group\_level\_variables.html](https://docs.gitlab.com/ce/api/group_level_variables.html).
- group\_variables
```perl
my $variables = $api->group_variables(
$group_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/variables` and returns the decoded response content.
- group\_variable
```perl
my $variable = $api->group_variable(
$group_id,
$variable_key,
);
```
Sends a `GET` request to `groups/:group_id/variables/:variable_key` and returns the decoded response content.
- create\_group\_variable
```perl
my $variable = $api->create_group_variable(
$group_id,
\%params,
);
```
Sends a `POST` request to `groups/:group_id/variables` and returns the decoded response content.
- edit\_group\_variable
```perl
my $variable = $api->edit_group_variable(
$group_id,
$variable_key,
\%params,
);
```
Sends a `PUT` request to `groups/:group_id/variables/:variable_key` and returns the decoded response content.
- delete\_group\_variable
```
$api->delete_group_variable(
$group_id,
$variable_key,
);
```
Sends a `DELETE` request to `groups/:group_id/variables/:variable_key`.
## Snippets
See [https://docs.gitlab.com/ce/api/snippets.html](https://docs.gitlab.com/ce/api/snippets.html).
- snippets
```perl
my $snippets = $api->snippets();
```
Sends a `GET` request to `snippets` and returns the decoded response content.
- snippet
```perl
my $snippet = $api->snippet(
$snippet_id,
);
```
Sends a `GET` request to `snippets/:snippet_id` and returns the decoded response content.
- create\_snippet
```perl
my $snippet = $api->create_snippet(
\%params,
);
```
Sends a `POST` request to `snippets` and returns the decoded response content.
- edit\_snippet
```perl
my $snippet = $api->edit_snippet(
$snippet_id,
\%params,
);
```
Sends a `PUT` request to `snippets/:snippet_id` and returns the decoded response content.
- delete\_snippet
```
$api->delete_snippet(
$snippet_id,
);
```
Sends a `DELETE` request to `snippets/:snippet_id`.
- public\_snippets
```perl
my $snippets = $api->public_snippets(
\%params,
);
```
Sends a `GET` request to `snippets/public` and returns the decoded response content.
- snippet\_user\_agent\_detail
```perl
my $user_agent = $api->snippet_user_agent_detail(
$snippet_id,
);
```
Sends a `GET` request to `snippets/:snippet_id/user_agent_detail` and returns the decoded response content.
## Commits
See [https://docs.gitlab.com/ce/api/commits.html](https://docs.gitlab.com/ce/api/commits.html).
- commits
```perl
my $commits = $api->commits(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/commits` and returns the decoded response content.
- create\_commit
```perl
my $commit = $api->create_commit(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/repository/commits` and returns the decoded response content.
- commit
```perl
my $commit = $api->commit(
$project_id,
$commit_sha,
);
```
Sends a `GET` request to `projects/:project_id/repository/commits/:commit_sha` and returns the decoded response content.
- commit\_refs
```perl
my $refs = $api->commit_refs(
$project_id,
$commit_sha,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/commits/:commit_sha/refs` and returns the decoded response content.
- cherry\_pick\_commit
```perl
my $commit = $api->cherry_pick_commit(
$project_id,
$commit_sha,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/repository/commits/:commit_sha/cherry_pick` and returns the decoded response content.
- commit\_diff
```perl
my $diff = $api->commit_diff(
$project_id,
$commit_sha,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/commits/:commit_sha/diff` and returns the decoded response content.
- commit\_comments
```perl
my $comments = $api->commit_comments(
$project_id,
$commit_sha,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/commits/:commit_sha/comments` and returns the decoded response content.
- create\_commit\_comment
```
$api->create_commit_comment(
$project_id,
$commit_sha,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/repository/commits/:commit_sha/comments`.
- commit\_statuses
```perl
my $build_statuses = $api->commit_statuses(
$project_id,
$commit_sha,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/commits/:commit_sha/statuses` and returns the decoded response content.
- create\_commit\_status
```perl
my $build_status = $api->create_commit_status(
$project_id,
$commit_sha,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/statuses/:commit_sha` and returns the decoded response content.
## Container Registry
See [https://docs.gitlab.com/ce/api/container\_registry.html](https://docs.gitlab.com/ce/api/container_registry.html).
- registry\_repositories\_in\_project
```perl
my $registry_repositories = $api->registry_repositories_in_project(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/registry/repositories` and returns the decoded response content.
- registry\_repositories\_in\_group
```perl
my $registry_repositories = $api->registry_repositories_in_group(
$id,
\%params,
);
```
Sends a `GET` request to `groups/:id/registry/repositories` and returns the decoded response content.
- delete\_registry\_repository
```
$api->delete_registry_repository(
$project_id,
$repository_id,
);
```
Sends a `DELETE` request to `projects/:project_id/registry/repositories/:repository_id`.
- registry\_repository\_tags
```perl
my $tags = $api->registry_repository_tags(
$project_id,
$repository_id,
);
```
Sends a `GET` request to `projects/:project_id/registry/repositories/:repository_id/tags` and returns the decoded response content.
- registry\_repository\_tag
```perl
my $tag = $api->registry_repository_tag(
$project_id,
$repository_id,
$tag_name,
);
```
Sends a `GET` request to `projects/:project_id/registry/repositories/:repository_id/tags/:tag_name` and returns the decoded response content.
- delete\_registry\_repository\_tag
```
$api->delete_registry_repository_tag(
$project_id,
$repository_id,
$tag_name,
);
```
Sends a `DELETE` request to `projects/:project_id/registry/repositories/:repository_id/tags/:tag_name`.
- bulk\_delete\_registry\_repository\_tags
```
$api->bulk_delete_registry_repository_tags(
$project_id,
$repository_id,
\%params,
);
```
Sends a `DELETE` request to `projects/:project_id/registry/repositories/:repository_id/tags`.
## Custom Attributes
See [https://docs.gitlab.com/ce/api/custom\_attributes.html](https://docs.gitlab.com/ce/api/custom_attributes.html).
- custom\_user\_attributes
```perl
my $attributes = $api->custom_user_attributes(
$user_id,
);
```
Sends a `GET` request to `users/:user_id/custom_attributes` and returns the decoded response content.
- custom\_group\_attributes
```perl
my $attributes = $api->custom_group_attributes(
$group_id,
);
```
Sends a `GET` request to `groups/:group_id/custom_attributes` and returns the decoded response content.
- custom\_project\_attributes
```perl
my $attributes = $api->custom_project_attributes(
$project_id,
);
```
Sends a `GET` request to `projects/:project_id/custom_attributes` and returns the decoded response content.
- custom\_user\_attribute
```perl
my $attribute = $api->custom_user_attribute(
$user_id,
$attribute_key,
);
```
Sends a `GET` request to `users/:user_id/custom_attributes/:attribute_key` and returns the decoded response content.
- custom\_group\_attribute
```perl
my $attribute = $api->custom_group_attribute(
$group_id,
$attribute_key,
);
```
Sends a `GET` request to `groups/:group_id/custom_attributes/:attribute_key` and returns the decoded response content.
- custom\_project\_attribute
```perl
my $attribute = $api->custom_project_attribute(
$project_id,
$attribute_key,
);
```
Sends a `GET` request to `projects/:project_id/custom_attributes/:attribute_key` and returns the decoded response content.
- set\_custom\_user\_attribute
```perl
my $attribute = $api->set_custom_user_attribute(
$user_id,
$attribute_key,
\%params,
);
```
Sends a `PUT` request to `users/:user_id/custom_attributes/:attribute_key` and returns the decoded response content.
- set\_custom\_group\_attribute
```perl
my $attribute = $api->set_custom_group_attribute(
$group_id,
$attribute_key,
\%params,
);
```
Sends a `PUT` request to `groups/:group_id/custom_attributes/:attribute_key` and returns the decoded response content.
- set\_custom\_project\_attribute
```perl
my $attribute = $api->set_custom_project_attribute(
$project_id,
$attribute_key,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/custom_attributes/:attribute_key` and returns the decoded response content.
- delete\_custom\_user\_attribute
```perl
$api->delete_custom_user_attribute(
$user_id,
$attribute_key,
);
```
Sends a `DELETE` request to `users/:user_id/custom_attributes/:attribute_key`.
- delete\_custom\_group\_attribute
```
$api->delete_custom_group_attribute(
$group_id,
$attribute_key,
);
```
Sends a `DELETE` request to `groups/:group_id/custom_attributes/:attribute_key`.
- delete\_custom\_project\_attribute
```
$api->delete_custom_project_attribute(
$project_id,
$attribute_key,
);
```
Sends a `DELETE` request to `projects/:project_id/custom_attributes/:attribute_key`.
## Deployments
See [https://docs.gitlab.com/ce/api/deployments.html](https://docs.gitlab.com/ce/api/deployments.html).
- deployments
```perl
my $deployments = $api->deployments(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/deployments` and returns the decoded response content.
- deployment
```perl
my $deployment = $api->deployment(
$project_id,
$deployment_id,
);
```
Sends a `GET` request to `projects/:project_id/deployments/:deployment_id` and returns the decoded response content.
## Deploy Keys
See [https://docs.gitlab.com/ce/api/deploy\_keys.html](https://docs.gitlab.com/ce/api/deploy_keys.html).
- all\_deploy\_keys
```perl
my $keys = $api->all_deploy_keys(
\%params,
);
```
Sends a `GET` request to `deploy_keys` and returns the decoded response content.
- deploy\_keys
```perl
my $keys = $api->deploy_keys(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/deploy_keys` and returns the decoded response content.
- deploy\_key
```perl
my $key = $api->deploy_key(
$project_id,
$key_id,
);
```
Sends a `GET` request to `projects/:project_id/deploy_keys/:key_id` and returns the decoded response content.
- create\_deploy\_key
```perl
my $key = $api->create_deploy_key(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/deploy_keys` and returns the decoded response content.
- delete\_deploy\_key
```
$api->delete_deploy_key(
$project_id,
$key_id,
);
```
Sends a `DELETE` request to `projects/:project_id/deploy_keys/:key_id`.
- enable\_deploy\_key
```perl
my $key = $api->enable_deploy_key(
$project_id,
$key_id,
);
```
Sends a `POST` request to `projects/:project_id/deploy_keys/:key_id/enable` and returns the decoded response content.
## Environments
See [https://docs.gitlab.com/ce/api/environments.html](https://docs.gitlab.com/ce/api/environments.html).
- environments
```perl
my $environments = $api->environments(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/environments` and returns the decoded response content.
- create\_environment
```perl
my $environment = $api->create_environment(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/environments` and returns the decoded response content.
- edit\_environment
```perl
my $environment = $api->edit_environment(
$project_id,
$environments_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/environments/:environments_id` and returns the decoded response content.
- delete\_environment
```
$api->delete_environment(
$project_id,
$environment_id,
);
```
Sends a `DELETE` request to `projects/:project_id/environments/:environment_id`.
- stop\_environment
```perl
my $environment = $api->stop_environment(
$project_id,
$environment_id,
);
```
Sends a `POST` request to `projects/:project_id/environments/:environment_id/stop` and returns the decoded response content.
## Events
See [https://docs.gitlab.com/ce/api/events.html](https://docs.gitlab.com/ce/api/events.html).
- all\_events
```perl
my $events = $api->all_events(
\%params,
);
```
Sends a `GET` request to `events` and returns the decoded response content.
- user\_events
```perl
my $events = $api->user_events(
$user_id,
\%params,
);
```
Sends a `GET` request to `users/:user_id/events` and returns the decoded response content.
- project\_events
```perl
my $events = $api->project_events(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/events` and returns the decoded response content.
## Feature flags
See [https://docs.gitlab.com/ce/api/features.html](https://docs.gitlab.com/ce/api/features.html).
- features
```perl
my $features = $api->features();
```
Sends a `GET` request to `features` and returns the decoded response content.
- set\_feature
```perl
my $feature = $api->set_feature(
$name,
\%params,
);
```
Sends a `POST` request to `features/:name` and returns the decoded response content.
## Gitignores
See [https://docs.gitlab.com/ce/api/templates/gitignores.html](https://docs.gitlab.com/ce/api/templates/gitignores.html).
- gitignores\_templates
```perl
my $templates = $api->gitignores_templates(
\%params,
);
```
Sends a `GET` request to `templates/gitignores` and returns the decoded response content.
- gitignores\_template
```perl
my $template = $api->gitignores_template(
$template_key,
);
```
Sends a `GET` request to `templates/gitignores/:template_key` and returns the decoded response content.
## GitLab CI YMLs
See [https://docs.gitlab.com/ce/api/templates/gitlab\_ci\_ymls.html](https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html).
- gitlab\_ci\_ymls\_templates
```perl
my $templates = $api->gitlab_ci_ymls_templates(
\%params,
);
```
Sends a `GET` request to `templates/gitlab_ci_ymls` and returns the decoded response content.
- gitlab\_ci\_ymls\_template
```perl
my $template = $api->gitlab_ci_ymls_template(
$template_key,
);
```
Sends a `GET` request to `templates/gitlab_ci_ymls/:template_key` and returns the decoded response content.
## Groups
See [https://docs.gitlab.com/ce/api/groups.html](https://docs.gitlab.com/ce/api/groups.html).
- groups
```perl
my $groups = $api->groups(
\%params,
);
```
Sends a `GET` request to `groups` and returns the decoded response content.
- group\_subgroups
```perl
my $subgroups = $api->group_subgroups(
$group_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/subgroups` and returns the decoded response content.
- group\_projects
```perl
my $projects = $api->group_projects(
$group_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/projects` and returns the decoded response content.
- group
```perl
my $group = $api->group(
$group_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id` and returns the decoded response content.
- create\_group
```
$api->create_group(
\%params,
);
```
Sends a `POST` request to `groups`.
- transfer\_project\_to\_group
```
$api->transfer_project_to_group(
$group_id,
$project_id,
);
```
Sends a `POST` request to `groups/:group_id/projects/:project_id`.
- edit\_group
```perl
my $group = $api->edit_group(
$group_id,
\%params,
);
```
Sends a `PUT` request to `groups/:group_id` and returns the decoded response content.
- delete\_group
```
$api->delete_group(
$group_id,
);
```
Sends a `DELETE` request to `groups/:group_id`.
- sync\_group\_with\_ldap
```
$api->sync_group_with_ldap(
$group_id,
);
```
Sends a `POST` request to `groups/:group_id/ldap_sync`.
- create\_ldap\_group\_link
```
$api->create_ldap_group_link(
$group_id,
\%params,
);
```
Sends a `POST` request to `groups/:group_id/ldap_group_links`.
- delete\_ldap\_group\_link
```
$api->delete_ldap_group_link(
$group_id,
$cn,
);
```
Sends a `DELETE` request to `groups/:group_id/ldap_group_links/:cn`.
- delete\_ldap\_provider\_group\_link
```
$api->delete_ldap_provider_group_link(
$group_id,
$provider,
$cn,
);
```
Sends a `DELETE` request to `groups/:group_id/ldap_group_links/:provider/:cn`.
## Group access requests
See [https://docs.gitlab.com/ce/api/access\_requests.html](https://docs.gitlab.com/ce/api/access_requests.html).
- group\_access\_requests
```perl
my $requests = $api->group_access_requests(
$group_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/access_requests` and returns the decoded response content.
- request\_group\_access
```perl
my $request = $api->request_group_access(
$group_id,
);
```
Sends a `POST` request to `groups/:group_id/access_requests` and returns the decoded response content.
- approve\_group\_access
```perl
my $request = $api->approve_group_access(
$group_id,
$user_id,
);
```
Sends a `PUT` request to `groups/:group_id/access_requests/:user_id/approve` and returns the decoded response content.
- deny\_group\_access
```perl
$api->deny_group_access(
$group_id,
$user_id,
);
```
Sends a `DELETE` request to `groups/:group_id/access_requests/:user_id`.
## Group badges
See [https://docs.gitlab.com/ce/api/group\_badges.html](https://docs.gitlab.com/ce/api/group_badges.html).
- group\_badges
```perl
my $badges = $api->group_badges(
$group_id,
);
```
Sends a `GET` request to `groups/:group_id/badges` and returns the decoded response content.
- group\_badge
```perl
my $badge = $api->group_badge(
$group_id,
$badge_id,
);
```
Sends a `GET` request to `groups/:group_id/badges/:badge_id` and returns the decoded response content.
- create\_group\_badge
```perl
my $badge = $api->create_group_badge(
$group_id,
\%params,
);
```
Sends a `POST` request to `groups/:group_id/badges` and returns the decoded response content.
- edit\_group\_badge
```perl
my $badge = $api->edit_group_badge(
$group_id,
$badge_id,
\%params,
);
```
Sends a `PUT` request to `groups/:group_id/badges/:badge_id` and returns the decoded response content.
- delete\_group\_badge
```
$api->delete_group_badge(
$group_id,
$badge_id,
);
```
Sends a `DELETE` request to `groups/:group_id/badges/:badge_id`.
- preview\_group\_badge
```perl
my $preview = $api->preview_group_badge(
$group_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/badges/render` and returns the decoded response content.
## Group members
See [https://docs.gitlab.com/ce/api/members.html](https://docs.gitlab.com/ce/api/members.html).
- group\_members
```perl
my $members = $api->group_members(
$group_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/members` and returns the decoded response content.
- all\_group\_members
```perl
my $members = $api->all_group_members(
$group_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/members/all` and returns the decoded response content.
- group\_member
```perl
my $member = $api->group_member(
$project_id,
$user_id,
);
```
Sends a `GET` request to `groups/:project_id/members/:user_id` and returns the decoded response content.
- add\_group\_member
```perl
my $member = $api->add_group_member(
$group_id,
\%params,
);
```
Sends a `POST` request to `groups/:group_id/members` and returns the decoded response content.
- update\_group\_member
```perl
my $member = $api->update_group_member(
$group_id,
$user_id,
\%params,
);
```
Sends a `PUT` request to `groups/:group_id/members/:user_id` and returns the decoded response content.
- remove\_group\_member
```perl
$api->remove_group_member(
$group_id,
$user_id,
);
```
Sends a `DELETE` request to `groups/:group_id/members/:user_id`.
## Issues
See [https://docs.gitlab.com/ce/api/issues.html](https://docs.gitlab.com/ce/api/issues.html).
- global\_issues
```perl
my $issues = $api->global_issues(
\%params,
);
```
Sends a `GET` request to `issues` and returns the decoded response content.
- group\_issues
```perl
my $issues = $api->group_issues(
$group_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/issues` and returns the decoded response content.
- issues
```perl
my $issues = $api->issues(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/issues` and returns the decoded response content.
- issue
```perl
my $issue = $api->issue(
$project_id,
$issue_iid,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid` and returns the decoded response content.
- create\_issue
```perl
my $issue = $api->create_issue(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/issues` and returns the decoded response content.
- edit\_issue
```perl
my $issue = $api->edit_issue(
$project_id,
$issue_iid,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/issues/:issue_iid` and returns the decoded response content.
- delete\_issue
```
$api->delete_issue(
$project_id,
$issue_iid,
);
```
Sends a `DELETE` request to `projects/:project_id/issues/:issue_iid`.
- move\_issue
```perl
my $issue = $api->move_issue(
$project_id,
$issue_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/move` and returns the decoded response content.
- subscribe\_to\_issue
```perl
my $issue = $api->subscribe_to_issue(
$project_id,
$issue_iid,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/subscribe` and returns the decoded response content.
- unsubscribe\_from\_issue
```perl
my $issue = $api->unsubscribe_from_issue(
$project_id,
$issue_iid,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/unsubscribe` and returns the decoded response content.
- create\_issue\_todo
```perl
my $todo = $api->create_issue_todo(
$project_id,
$issue_iid,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/todo` and returns the decoded response content.
- set\_issue\_time\_estimate
```perl
my $tracking = $api->set_issue_time_estimate(
$project_id,
$issue_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/time_estimate` and returns the decoded response content.
- reset\_issue\_time\_estimate
```perl
my $tracking = $api->reset_issue_time_estimate(
$project_id,
$issue_iid,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/reset_time_estimate` and returns the decoded response content.
- add\_issue\_spent\_time
```perl
my $tracking = $api->add_issue_spent_time(
$project_id,
$issue_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/add_spent_time` and returns the decoded response content.
- reset\_issue\_spent\_time
```perl
my $tracking = $api->reset_issue_spent_time(
$project_id,
$issue_iid,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/reset_spent_time` and returns the decoded response content.
- issue\_time\_stats
```perl
my $tracking = $api->issue_time_stats(
$project_id,
$issue_iid,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/time_stats` and returns the decoded response content.
- issue\_closed\_by
```perl
my $merge_requests = $api->issue_closed_by(
$project_id,
$issue_iid,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/closed_by` and returns the decoded response content.
- issue\_user\_agent\_detail
```perl
my $user_agent = $api->issue_user_agent_detail(
$project_id,
$issue_iid,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/user_agent_detail` and returns the decoded response content.
## Issue Boards
See [https://docs.gitlab.com/ce/api/boards.html](https://docs.gitlab.com/ce/api/boards.html).
- project\_boards
```perl
my $boards = $api->project_boards(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/boards` and returns the decoded response content.
- project\_board\_lists
```perl
my $lists = $api->project_board_lists(
$project_id,
$board_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/boards/:board_id/lists` and returns the decoded response content.
- project\_board\_list
```perl
my $list = $api->project_board_list(
$project_id,
$board_id,
$list_id,
);
```
Sends a `GET` request to `projects/:project_id/boards/:board_id/lists/:list_id` and returns the decoded response content.
- create\_project\_board\_list
```perl
my $list = $api->create_project_board_list(
$project_id,
$board_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/boards/:board_id/lists` and returns the decoded response content.
- edit\_project\_board\_list
```perl
my $list = $api->edit_project_board_list(
$project_id,
$board_id,
$list_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/boards/:board_id/lists/:list_id` and returns the decoded response content.
- delete\_project\_board\_list
```
$api->delete_project_board_list(
$project_id,
$board_id,
$list_id,
);
```
Sends a `DELETE` request to `projects/:project_id/boards/:board_id/lists/:list_id`.
## Group Issue Boards
See [https://docs.gitlab.com/ce/api/group\_boards.html](https://docs.gitlab.com/ce/api/group_boards.html).
- group\_boards
```perl
my $boards = $api->group_boards(
$group_id,
);
```
Sends a `GET` request to `groups/:group_id/boards` and returns the decoded response content.
- group\_board
```perl
my $board = $api->group_board(
$group_id,
$board_id,
);
```
Sends a `GET` request to `groups/:group_id/boards/:board_id` and returns the decoded response content.
- group\_board\_lists
```perl
my $lists = $api->group_board_lists(
$group_id,
$board_id,
);
```
Sends a `GET` request to `groups/:group_id/boards/:board_id/lists` and returns the decoded response content.
- group\_board\_list
```perl
my $list = $api->group_board_list(
$group_id,
$board_id,
$list_id,
);
```
Sends a `GET` request to `groups/:group_id/boards/:board_id/lists/:list_id` and returns the decoded response content.
- create\_group\_board\_list
```perl
my $list = $api->create_group_board_list(
$group_id,
$board_id,
\%params,
);
```
Sends a `POST` request to `groups/:group_id/boards/:board_id/lists` and returns the decoded response content.
- edit\_group\_board\_list
```perl
my $list = $api->edit_group_board_list(
$group_id,
$board_id,
$list_id,
\%params,
);
```
Sends a `PUT` request to `groups/:group_id/boards/:board_id/lists/:list_id` and returns the decoded response content.
- delete\_group\_board\_list
```
$api->delete_group_board_list(
$group_id,
$board_id,
$list_id,
);
```
Sends a `DELETE` request to `groups/:group_id/boards/:board_id/lists/:list_id`.
## Jobs
See [https://docs.gitlab.com/ce/api/jobs.html](https://docs.gitlab.com/ce/api/jobs.html).
- jobs
```perl
my $jobs = $api->jobs(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/jobs` and returns the decoded response content.
- pipeline\_jobs
```perl
my $jobs = $api->pipeline_jobs(
$project_id,
$pipeline_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/pipelines/:pipeline_id/jobs` and returns the decoded response content.
- job
```perl
my $job = $api->job(
$project_id,
$job_id,
);
```
Sends a `GET` request to `projects/:project_id/jobs/:job_id` and returns the decoded response content.
- job\_artifacts
```perl
my $artifacts = $api->job_artifacts(
$project_id,
$job_id,
);
```
Sends a `GET` request to `projects/:project_id/jobs/:job_id/artifacts` and returns the decoded response content.
- job\_artifacts\_archive
```perl
my $archive = $api->job_artifacts_archive(
$project_id,
$ref_name,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/jobs/artifacts/:ref_name/download` and returns the decoded response content.
- job\_artifacts\_file
```perl
my $file = $api->job_artifacts_file(
$project_id,
$job_id,
$artifact_path,
);
```
Sends a `GET` request to `projects/:project_id/jobs/:job_id/artifacts/:artifact_path` and returns the decoded response content.
- job\_trace\_file
```perl
my $file = $api->job_trace_file(
$project_id,
$job_id,
);
```
Sends a `GET` request to `projects/:project_id/jobs/:job_id/trace` and returns the decoded response content.
- cancel\_job
```perl
my $job = $api->cancel_job(
$project_id,
$job_id,
);
```
Sends a `POST` request to `projects/:project_id/jobs/:job_id/cancel` and returns the decoded response content.
- retry\_job
```perl
my $job = $api->retry_job(
$project_id,
$job_id,
);
```
Sends a `POST` request to `projects/:project_id/jobs/:job_id/retry` and returns the decoded response content.
- erase\_job
```perl
my $job = $api->erase_job(
$project_id,
$job_id,
);
```
Sends a `POST` request to `projects/:project_id/jobs/:job_id/erase` and returns the decoded response content.
- keep\_job\_artifacts
```perl
my $job = $api->keep_job_artifacts(
$project_id,
$job_id,
);
```
Sends a `POST` request to `projects/:project_id/jobs/:job_id/artifacts/keep` and returns the decoded response content.
- play\_job
```perl
my $job = $api->play_job(
$project_id,
$job_id,
);
```
Sends a `POST` request to `projects/:project_id/jobs/:job_id/play` and returns the decoded response content.
## Keys
See [https://docs.gitlab.com/ce/api/keys.html](https://docs.gitlab.com/ce/api/keys.html).
- key
```perl
my $key = $api->key(
$key_id,
);
```
Sends a `GET` request to `keys/:key_id` and returns the decoded response content.
## Labels
See [https://docs.gitlab.com/ce/api/labels.html](https://docs.gitlab.com/ce/api/labels.html).
- labels
```perl
my $labels = $api->labels(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/labels` and returns the decoded response content.
- create\_label
```perl
my $label = $api->create_label(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/labels` and returns the decoded response content.
- delete\_label
```
$api->delete_label(
$project_id,
\%params,
);
```
Sends a `DELETE` request to `projects/:project_id/labels`.
- edit\_label
```perl
my $label = $api->edit_label(
$project_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/labels` and returns the decoded response content.
- subscribe\_to\_label
```perl
my $label = $api->subscribe_to_label(
$project_id,
$label_id,
);
```
Sends a `POST` request to `projects/:project_id/labels/:label_id/subscribe` and returns the decoded response content.
- unsubscribe\_from\_label
```perl
$api->unsubscribe_from_label(
$project_id,
$label_id,
);
```
Sends a `POST` request to `projects/:project_id/labels/:label_id/unsubscribe`.
## Markdown
See [https://docs.gitlab.com/ce/api/markdown.html](https://docs.gitlab.com/ce/api/markdown.html).
- markdown
```perl
my $html = $api->markdown(
\%params,
);
```
Sends a `POST` request to `markdown` and returns the decoded response content.
## Merge requests
See [https://docs.gitlab.com/ce/api/merge\_requests.html](https://docs.gitlab.com/ce/api/merge_requests.html).
- global\_merge\_requests
```perl
my $merge_requests = $api->global_merge_requests(
\%params,
);
```
Sends a `GET` request to `merge_requests` and returns the decoded response content.
- merge\_requests
```perl
my $merge_requests = $api->merge_requests(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests` and returns the decoded response content.
- merge\_request
```perl
my $merge_request = $api->merge_request(
$project_id,
$merge_request_iid,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid` and returns the decoded response content.
- merge\_request\_commits
```perl
my $commits = $api->merge_request_commits(
$project_id,
$merge_request_iid,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/commits` and returns the decoded response content.
- merge\_request\_with\_changes
```perl
my $merge_request = $api->merge_request_with_changes(
$project_id,
$merge_request_iid,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/changes` and returns the decoded response content.
- create\_merge\_request
```perl
my $merge_request = $api->create_merge_request(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests` and returns the decoded response content.
- edit\_merge\_request
```perl
my $merge_request = $api->edit_merge_request(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/merge_requests/:merge_request_iid` and returns the decoded response content.
- delete\_merge\_request
```
$api->delete_merge_request(
$project_id,
$merge_request_iid,
);
```
Sends a `DELETE` request to `projects/:project_id/merge_requests/:merge_request_iid`.
- accept\_merge\_request
```perl
my $merge_request = $api->accept_merge_request(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/merge_requests/:merge_request_iid/merge` and returns the decoded response content.
- cancel\_merge\_when\_pipeline\_succeeds
```perl
my $merge_request = $api->cancel_merge_when_pipeline_succeeds(
$project_id,
$merge_request_iid,
);
```
Sends a `PUT` request to `projects/:project_id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds` and returns the decoded response content.
- merge\_request\_closes\_issues
```perl
my $issues = $api->merge_request_closes_issues(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/closes_issues` and returns the decoded response content.
- subscribe\_to\_merge\_request
```perl
my $merge_request = $api->subscribe_to_merge_request(
$project_id,
$merge_request_iid,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/subscribe` and returns the decoded response content.
- unsubscribe\_from\_merge\_request
```perl
my $merge_request = $api->unsubscribe_from_merge_request(
$project_id,
$merge_request_iid,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/unsubscribe` and returns the decoded response content.
- create\_merge\_request\_todo
```perl
my $todo = $api->create_merge_request_todo(
$project_id,
$merge_request_iid,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/todo` and returns the decoded response content.
- merge\_request\_diff\_versions
```perl
my $versions = $api->merge_request_diff_versions(
$project_id,
$merge_request_iid,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/versions` and returns the decoded response content.
- merge\_request\_diff\_version
```perl
my $version = $api->merge_request_diff_version(
$project_id,
$merge_request_iid,
$version_id,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/versions/:version_id` and returns the decoded response content.
- set\_merge\_request\_time\_estimate
```perl
my $tracking = $api->set_merge_request_time_estimate(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/time_estimate` and returns the decoded response content.
- reset\_merge\_request\_time\_estimate
```perl
my $tracking = $api->reset_merge_request_time_estimate(
$project_id,
$merge_request_iid,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/reset_time_estimate` and returns the decoded response content.
- add\_merge\_request\_spent\_time
```perl
my $tracking = $api->add_merge_request_spent_time(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/add_spent_time` and returns the decoded response content.
- reset\_merge\_request\_spent\_time
```perl
my $tracking = $api->reset_merge_request_spent_time(
$project_id,
$merge_request_iid,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/reset_spent_time` and returns the decoded response content.
- merge\_request\_time\_stats
```perl
my $tracking = $api->merge_request_time_stats(
$project_id,
$merge_request_iid,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/time_stats` and returns the decoded response content.
## Milestones
See [https://docs.gitlab.com/ce/api/milestones.html](https://docs.gitlab.com/ce/api/milestones.html).
- project\_milestones
```perl
my $milestones = $api->project_milestones(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/milestones` and returns the decoded response content.
- project\_milestone
```perl
my $milestone = $api->project_milestone(
$project_id,
$milestone_id,
);
```
Sends a `GET` request to `projects/:project_id/milestones/:milestone_id` and returns the decoded response content.
- create\_project\_milestone
```perl
my $milestone = $api->create_project_milestone(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/milestones` and returns the decoded response content.
- edit\_project\_milestone
```perl
my $milestone = $api->edit_project_milestone(
$project_id,
$milestone_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/milestones/:milestone_id` and returns the decoded response content.
- project\_milestone\_issues
```perl
my $issues = $api->project_milestone_issues(
$project_id,
$milestone_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/milestones/:milestone_id/issues` and returns the decoded response content.
- project\_milestone\_merge\_requests
```perl
my $merge_requests = $api->project_milestone_merge_requests(
$project_id,
$milestone_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/milestones/:milestone_id/merge_requests` and returns the decoded response content.
## Group milestones
See [https://docs.gitlab.com/ce/api/group\_milestones.html](https://docs.gitlab.com/ce/api/group_milestones.html).
- group\_milestones
```perl
my $milestones = $api->group_milestones(
$group_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/milestones` and returns the decoded response content.
- group\_milestone
```perl
my $milestone = $api->group_milestone(
$group_id,
$milestone_id,
);
```
Sends a `GET` request to `groups/:group_id/milestones/:milestone_id` and returns the decoded response content.
- create\_group\_milestone
```perl
my $milestone = $api->create_group_milestone(
$group_id,
\%params,
);
```
Sends a `POST` request to `groups/:group_id/milestones` and returns the decoded response content.
- edit\_group\_milestone
```perl
my $milestone = $api->edit_group_milestone(
$group_id,
$milestone_id,
\%params,
);
```
Sends a `PUT` request to `groups/:group_id/milestones/:milestone_id` and returns the decoded response content.
- group\_milestone\_issues
```perl
my $issues = $api->group_milestone_issues(
$group_id,
$milestone_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/milestones/:milestone_id/issues` and returns the decoded response content.
- group\_milestone\_merge\_requests
```perl
my $merge_requests = $api->group_milestone_merge_requests(
$group_id,
$milestone_id,
\%params,
);
```
Sends a `GET` request to `groups/:group_id/milestones/:milestone_id/merge_requests` and returns the decoded response content.
## Namespaces
See [https://docs.gitlab.com/ce/api/namespaces.html](https://docs.gitlab.com/ce/api/namespaces.html).
- namespaces
```perl
my $namespaces = $api->namespaces(
\%params,
);
```
Sends a `GET` request to `namespaces` and returns the decoded response content.
- namespace
```perl
my $namespace = $api->namespace(
$namespace_id,
);
```
Sends a `GET` request to `namespaces/:namespace_id` and returns the decoded response content.
## Notes
See [https://docs.gitlab.com/ce/api/notes.html](https://docs.gitlab.com/ce/api/notes.html).
- issue\_notes
```perl
my $notes = $api->issue_notes(
$project_id,
$issue_iid,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/notes` and returns the decoded response content.
- issue\_note
```perl
my $note = $api->issue_note(
$project_id,
$issue_iid,
$note_id,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/notes/:note_id` and returns the decoded response content.
- create\_issue\_note
```perl
my $note = $api->create_issue_note(
$project_id,
$issue_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/notes` and returns the decoded response content.
- edit\_issue\_note
```
$api->edit_issue_note(
$project_id,
$issue_iid,
$note_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/issues/:issue_iid/notes/:note_id`.
- delete\_issue\_note
```
$api->delete_issue_note(
$project_id,
$issue_iid,
$note_id,
);
```
Sends a `DELETE` request to `projects/:project_id/issues/:issue_iid/notes/:note_id`.
- snippet\_notes
```perl
my $notes = $api->snippet_notes(
$project_id,
$snippet_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/snippets/:snippet_id/notes` and returns the decoded response content.
- snippet\_note
```perl
my $note = $api->snippet_note(
$project_id,
$snippet_id,
$note_id,
);
```
Sends a `GET` request to `projects/:project_id/snippets/:snippet_id/notes/:note_id` and returns the decoded response content.
- create\_snippet\_note
```perl
my $note = $api->create_snippet_note(
$project_id,
$snippet_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/snippets/:snippet_id/notes` and returns the decoded response content.
- edit\_snippet\_note
```
$api->edit_snippet_note(
$project_id,
$snippet_id,
$note_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/snippets/:snippet_id/notes/:note_id`.
- delete\_snippet\_note
```
$api->delete_snippet_note(
$project_id,
$snippet_id,
$note_id,
);
```
Sends a `DELETE` request to `projects/:project_id/snippets/:snippet_id/notes/:note_id`.
- merge\_request\_notes
```perl
my $notes = $api->merge_request_notes(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/notes` and returns the decoded response content.
- merge\_request\_note
```perl
my $note = $api->merge_request_note(
$project_id,
$merge_request_iid,
$note_id,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id` and returns the decoded response content.
- create\_merge\_request\_note
```perl
my $note = $api->create_merge_request_note(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/notes` and returns the decoded response content.
- edit\_merge\_request\_note
```
$api->edit_merge_request_note(
$project_id,
$merge_request_iid,
$note_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id`.
- delete\_merge\_request\_note
```
$api->delete_merge_request_note(
$project_id,
$merge_request_iid,
$note_id,
);
```
Sends a `DELETE` request to `projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id`.
## Discussions
See [https://docs.gitlab.com/ce/api/discussions.html](https://docs.gitlab.com/ce/api/discussions.html).
- issue\_discussions
```perl
my $discussions = $api->issue_discussions(
$project_id,
$issue_iid,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/discussions` and returns the decoded response content.
- issue\_discussion
```perl
my $discussion = $api->issue_discussion(
$project_id,
$issue_iid,
$discussion_id,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/discussions/:discussion_id` and returns the decoded response content.
- create\_issue\_discussion
```perl
my $discussion = $api->create_issue_discussion(
$project_id,
$issue_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/discussions` and returns the decoded response content.
- create\_issue\_discussion\_note
```
$api->create_issue_discussion_note(
$project_id,
$issue_iid,
$discussion_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes`.
- edit\_issue\_discussion\_note
```
$api->edit_issue_discussion_note(
$project_id,
$issue_iid,
$discussion_id,
$note_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id`.
- delete\_issue\_discussion\_note
```
$api->delete_issue_discussion_note(
$project_id,
$issue_iid,
$discussion_id,
$note_id,
);
```
Sends a `DELETE` request to `projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id`.
- project\_snippet\_discussions
```perl
my $discussions = $api->project_snippet_discussions(
$project_id,
$snippet_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/snippets/:snippet_id/discussions` and returns the decoded response content.
- project\_snippet\_discussion
```perl
my $discussion = $api->project_snippet_discussion(
$project_id,
$snippet_id,
$discussion_id,
);
```
Sends a `GET` request to `projects/:project_id/snippets/:snippet_id/discussions/:discussion_id` and returns the decoded response content.
- create\_project\_snippet\_discussion
```perl
my $discussion = $api->create_project_snippet_discussion(
$project_id,
$snippet_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/snippets/:snippet_id/discussions` and returns the decoded response content.
- create\_project\_snippet\_discussion\_note
```
$api->create_project_snippet_discussion_note(
$project_id,
$snippet_id,
$discussion_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes`.
- edit\_project\_snippet\_discussion\_note
```
$api->edit_project_snippet_discussion_note(
$project_id,
$snippet_id,
$discussion_id,
$note_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id`.
- delete\_project\_snippet\_discussion\_note
```
$api->delete_project_snippet_discussion_note(
$project_id,
$snippet_id,
$discussion_id,
$note_id,
);
```
Sends a `DELETE` request to `projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id`.
- merge\_request\_discussions
```perl
my $discussions = $api->merge_request_discussions(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/discussions` and returns the decoded response content.
- merge\_request\_discussion
```perl
my $discussion = $api->merge_request_discussion(
$project_id,
$merge_request_iid,
$discussion_id,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id` and returns the decoded response content.
- create\_merge\_request\_discussion
```perl
my $discussion = $api->create_merge_request_discussion(
$project_id,
$merge_request_iid,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/discussions` and returns the decoded response content.
- resolve\_merge\_request\_discussion
```
$api->resolve_merge_request_discussion(
$project_id,
$merge_request_iid,
$discussion_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id`.
- create\_merge\_request\_discussion\_note
```
$api->create_merge_request_discussion_note(
$project_id,
$merge_request_iid,
$discussion_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes`.
- edit\_merge\_request\_discussion\_note
```
$api->edit_merge_request_discussion_note(
$project_id,
$merge_request_iid,
$discussion_id,
$note_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id`.
- delete\_merge\_request\_discussion\_note
```
$api->delete_merge_request_discussion_note(
$project_id,
$merge_request_iid,
$discussion_id,
$note_id,
);
```
Sends a `DELETE` request to `projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id`.
- commit\_discussions
```perl
my $discussions = $api->commit_discussions(
$project_id,
$commit_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/commits/:commit_id/discussions` and returns the decoded response content.
- commit\_discussion
```perl
my $discussion = $api->commit_discussion(
$project_id,
$commit_id,
$discussion_id,
);
```
Sends a `GET` request to `projects/:project_id/commits/:commit_id/discussions/:discussion_id` and returns the decoded response content.
- create\_commit\_discussion
```perl
my $discussion = $api->create_commit_discussion(
$project_id,
$commit_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/commits/:commit_id/discussions` and returns the decoded response content.
- create\_commit\_discussion\_note
```
$api->create_commit_discussion_note(
$project_id,
$commit_id,
$discussion_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes`.
- edit\_commit\_discussion\_note
```
$api->edit_commit_discussion_note(
$project_id,
$commit_id,
$discussion_id,
$note_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes/:note_id`.
- delete\_commit\_discussion\_note
```
$api->delete_commit_discussion_note(
$project_id,
$commit_id,
$discussion_id,
$note_id,
);
```
Sends a `DELETE` request to `projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes/:note_id`.
## Resource label events
See [https://docs.gitlab.com/ce/api/resource\_label\_events.html](https://docs.gitlab.com/ce/api/resource_label_events.html).
- issue\_resource\_label\_events
```perl
my $events = $api->issue_resource_label_events(
$project_id,
$issue_iid,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/resource_label_events` and returns the decoded response content.
- issue\_resource\_label\_event
```perl
my $event = $api->issue_resource_label_event(
$project_id,
$issue_iid,
$resource_label_event_id,
);
```
Sends a `GET` request to `projects/:project_id/issues/:issue_iid/resource_label_events/:resource_label_event_id` and returns the decoded response content.
- merge\_request\_resource\_label\_events
```perl
my $events = $api->merge_request_resource_label_events(
$project_id,
$merge_request_iid,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/resource_label_events` and returns the decoded response content.
- merge\_request\_resource\_label\_event
```perl
my $event = $api->merge_request_resource_label_event(
$project_id,
$merge_request_iid,
$resource_label_event_id,
);
```
Sends a `GET` request to `projects/:project_id/merge_requests/:merge_request_iid/resource_label_events/:resource_label_event_id` and returns the decoded response content.
## Notification settings
See [https://docs.gitlab.com/ce/api/notification\_settings.html](https://docs.gitlab.com/ce/api/notification_settings.html).
- global\_notification\_settings
```perl
my $settings = $api->global_notification_settings();
```
Sends a `GET` request to `notification_settings` and returns the decoded response content.
- set\_global\_notification\_settings
```perl
my $settings = $api->set_global_notification_settings(
\%params,
);
```
Sends a `PUT` request to `notification_settings` and returns the decoded response content.
- group\_notification\_settings
```perl
my $settings = $api->group_notification_settings(
$group_id,
);
```
Sends a `GET` request to `groups/:group_id/notification_settings` and returns the decoded response content.
- project\_notification\_settings
```perl
my $settings = $api->project_notification_settings(
$project_id,
);
```
Sends a `GET` request to `projects/:project_id/notification_settings` and returns the decoded response content.
- set\_group\_notification\_settings
```perl
my $settings = $api->set_group_notification_settings(
$group_id,
\%params,
);
```
Sends a `PUT` request to `groups/:group_id/notification_settings` and returns the decoded response content.
- set\_project\_notification\_settings
```perl
my $settings = $api->set_project_notification_settings(
$project_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/notification_settings` and returns the decoded response content.
## Licenses
See [https://docs.gitlab.com/ce/api/templates/licenses.html](https://docs.gitlab.com/ce/api/templates/licenses.html).
- license\_templates
```perl
my $templates = $api->license_templates(
\%params,
);
```
Sends a `GET` request to `templates/licenses` and returns the decoded response content.
- license\_template
```perl
my $template = $api->license_template(
$template_key,
\%params,
);
```
Sends a `GET` request to `templates/licenses/:template_key` and returns the decoded response content.
## Pages domains
See [https://docs.gitlab.com/ce/api/pages\_domains.html](https://docs.gitlab.com/ce/api/pages_domains.html).
- global\_pages\_domains
```perl
my $domains = $api->global_pages_domains(
\%params,
);
```
Sends a `GET` request to `pages/domains` and returns the decoded response content.
- pages\_domains
```perl
my $domains = $api->pages_domains(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/pages/domains` and returns the decoded response content.
- pages\_domain
```perl
my $domain = $api->pages_domain(
$project_id,
$domain,
);
```
Sends a `GET` request to `projects/:project_id/pages/domains/:domain` and returns the decoded response content.
- create\_pages\_domain
```perl
my $domain = $api->create_pages_domain(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/pages/domains` and returns the decoded response content.
- edit\_pages\_domain
```perl
my $domain = $api->edit_pages_domain(
$project_id,
$domain,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/pages/domains/:domain` and returns the decoded response content.
- delete\_pages\_domain
```
$api->delete_pages_domain(
$project_id,
$domain,
);
```
Sends a `DELETE` request to `projects/:project_id/pages/domains/:domain`.
## Pipelines
See [https://docs.gitlab.com/ce/api/pipelines.html](https://docs.gitlab.com/ce/api/pipelines.html).
- pipelines
```perl
my $pipelines = $api->pipelines(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/pipelines` and returns the decoded response content.
- pipeline
```perl
my $pipeline = $api->pipeline(
$project_id,
$pipeline_id,
);
```
Sends a `GET` request to `projects/:project_id/pipelines/:pipeline_id` and returns the decoded response content.
- create\_pipeline
```perl
my $pipeline = $api->create_pipeline(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/pipeline` and returns the decoded response content.
Git ref (branch or tag) name must be specified in the `ref` field of the
`%params` hash. It's also possible to pass variables to a pipeline in
the `variables` field like in the following example:
```perl
my $pipeline = $api->create_pipeline(
$project_id,
{
'ref' => 'master',
variables => [
{ 'key' => 'VARIABLE1', 'value' => 'VALUE1' },
{ 'key' => 'VARIABLE2', 'value' => 'VALUE2' },
],
},
);
```
- retry\_pipeline\_jobs
```perl
my $pipeline = $api->retry_pipeline_jobs(
$project_id,
$pipeline_id,
);
```
Sends a `POST` request to `projects/:project_id/pipelines/:pipeline_id/retry` and returns the decoded response content.
- cancel\_pipeline\_jobs
```perl
my $pipeline = $api->cancel_pipeline_jobs(
$project_id,
$pipeline_id,
);
```
Sends a `POST` request to `projects/:project_id/pipelines/:pipeline_id/cancel` and returns the decoded response content.
- delete\_pipeline
```
$api->delete_pipeline(
$project_id,
$pipeline_id,
);
```
Sends a `DELETE` request to `projects/:project_id/pipelines/:pipeline_id`.
## Pipeline triggers
See [https://docs.gitlab.com/ce/api/pipeline\_triggers.html](https://docs.gitlab.com/ce/api/pipeline_triggers.html).
- triggers
```perl
my $triggers = $api->triggers(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/triggers` and returns the decoded response content.
- trigger
```perl
my $trigger = $api->trigger(
$project_id,
$trigger_id,
);
```
Sends a `GET` request to `projects/:project_id/triggers/:trigger_id` and returns the decoded response content.
- create\_trigger
```perl
my $trigger = $api->create_trigger(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/triggers` and returns the decoded response content.
- edit\_trigger
```perl
my $trigger = $api->edit_trigger(
$project_id,
$trigger_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/triggers/:trigger_id` and returns the decoded response content.
- take\_ownership\_of\_trigger
```perl
my $trigger = $api->take_ownership_of_trigger(
$project_id,
$trigger_id,
);
```
Sends a `POST` request to `projects/:project_id/triggers/:trigger_id/take_ownership` and returns the decoded response content.
- delete\_trigger
```
$api->delete_trigger(
$project_id,
$trigger_id,
);
```
Sends a `DELETE` request to `projects/:project_id/triggers/:trigger_id`.
- trigger\_pipeline
```perl
my $pipeline = $api->trigger_pipeline(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/trigger/pipeline` and returns the decoded response content.
The API authentication token (["private\_token"](#private_token) or ["access\_token"](#access_token)
parameters in a constructor) is not needed when using this method, however
You must pass trigger token (generated at the trigger creation) as `token`
field and git ref name as `ref` field in the `%params` hash. You can also
pass variables to be set in a pipeline in the `variables` field. Example:
```perl
my $pipeline = $api->trigger_pipeline(
$project_id,
{
token => 'd69dba9162ab6ac72fa0993496286ada',
'ref' => 'master',
variables => {
variable1 => 'value1',
variable2 => 'value2',
},
},
);
```
Read more at [https://docs.gitlab.com/ce/ci/triggers/#triggering-a-pipeline](https://docs.gitlab.com/ce/ci/triggers/#triggering-a-pipeline).
## Pipeline schedules
See [https://docs.gitlab.com/ce/api/pipeline\_schedules.html](https://docs.gitlab.com/ce/api/pipeline_schedules.html).
- pipeline\_schedules
```perl
my $schedules = $api->pipeline_schedules(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/pipeline_schedules` and returns the decoded response content.
- pipeline\_schedule
```perl
my $schedule = $api->pipeline_schedule(
$project_id,
$pipeline_schedule_id,
);
```
Sends a `GET` request to `projects/:project_id/pipeline_schedules/:pipeline_schedule_id` and returns the decoded response content.
- create\_pipeline\_schedule
```perl
my $schedule = $api->create_pipeline_schedule(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/pipeline_schedules` and returns the decoded response content.
- edit\_pipeline\_schedule
```perl
my $schedule = $api->edit_pipeline_schedule(
$project_id,
$pipeline_schedule_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/pipeline_schedules/:pipeline_schedule_id` and returns the decoded response content.
- take\_ownership\_of\_pipeline\_schedule
```perl
my $schedule = $api->take_ownership_of_pipeline_schedule(
$project_id,
$pipeline_schedule_id,
);
```
Sends a `POST` request to `projects/:project_id/pipeline_schedules/:pipeline_schedule_id/take_ownership` and returns the decoded response content.
- delete\_pipeline\_schedule
```perl
my $schedule = $api->delete_pipeline_schedule(
$project_id,
$pipeline_schedule_id,
);
```
Sends a `DELETE` request to `projects/:project_id/pipeline_schedules/:pipeline_schedule_id` and returns the decoded response content.
- create\_pipeline\_schedule\_variable
```perl
my $variable = $api->create_pipeline_schedule_variable(
$project_id,
$pipeline_schedule_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables` and returns the decoded response content.
- edit\_pipeline\_schedule\_variable
```perl
my $variable = $api->edit_pipeline_schedule_variable(
$project_id,
$pipeline_schedule_id,
$variable_key,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables/:variable_key` and returns the decoded response content.
- delete\_pipeline\_schedule\_variable
```perl
my $variable = $api->delete_pipeline_schedule_variable(
$project_id,
$pipeline_schedule_id,
$variable_key,
);
```
Sends a `DELETE` request to `projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables/:variable_key` and returns the decoded response content.
## Projects
See [https://docs.gitlab.com/ce/api/projects.html](https://docs.gitlab.com/ce/api/projects.html).
- projects
```perl
my $projects = $api->projects(
\%params,
);
```
Sends a `GET` request to `projects` and returns the decoded response content.
- user\_projects
```perl
my $projects = $api->user_projects(
$user_id,
\%params,
);
```
Sends a `GET` request to `users/:user_id/projects` and returns the decoded response content.
- project
```perl
my $project = $api->project(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id` and returns the decoded response content.
- project\_users
```perl
my $users = $api->project_users(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/users` and returns the decoded response content.
- create\_project
```perl
my $project = $api->create_project(
\%params,
);
```
Sends a `POST` request to `projects` and returns the decoded response content.
- create\_project\_for\_user
```perl
$api->create_project_for_user(
$user_id,
\%params,
);
```
Sends a `POST` request to `projects/user/:user_id`.
- edit\_project
```
$api->edit_project(
$project_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id`.
- fork\_project
```
$api->fork_project(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/fork`.
- project\_forks
```perl
my $forks = $api->project_forks(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/forks` and returns the decoded response content.
- start\_project
```perl
my $project = $api->start_project(
$project_id,
);
```
Sends a `POST` request to `projects/:project_id/star` and returns the decoded response content.
- unstar\_project
```perl
my $project = $api->unstar_project(
$project_id,
);
```
Sends a `POST` request to `projects/:project_id/unstar` and returns the decoded response content.
- project\_languages
```perl
my $languages = $api->project_languages(
$project_id,
);
```
Sends a `GET` request to `projects/:project_id/languages` and returns the decoded response content.
- archive\_project
```perl
my $project = $api->archive_project(
$project_id,
);
```
Sends a `POST` request to `projects/:project_id/archive` and returns the decoded response content.
- unarchive\_project
```perl
my $project = $api->unarchive_project(
$project_id,
);
```
Sends a `POST` request to `projects/:project_id/unarchive` and returns the decoded response content.
- delete\_project
```
$api->delete_project(
$project_id,
);
```
Sends a `DELETE` request to `projects/:project_id`.
- upload\_file\_to\_project
```perl
my $upload = $api->upload_file_to_project(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/uploads` and returns the decoded response content.
The `file` parameter must point to a readable file on the local filesystem.
- share\_project\_with\_group
```
$api->share_project_with_group(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/share`.
- unshare\_project\_with\_group
```
$api->unshare_project_with_group(
$project_id,
$group_id,
);
```
Sends a `DELETE` request to `projects/:project_id/share/:group_id`.
- project\_hooks
```perl
my $hooks = $api->project_hooks(
$project_id,
);
```
Sends a `GET` request to `projects/:project_id/hooks` and returns the decoded response content.
- project\_hook
```perl
my $hook = $api->project_hook(
$project_id,
$hook_id,
);
```
Sends a `GET` request to `projects/:project_id/hooks/:hook_id` and returns the decoded response content.
- create\_project\_hook
```perl
my $hook = $api->create_project_hook(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/hooks` and returns the decoded response content.
- edit\_project\_hook
```perl
my $hook = $api->edit_project_hook(
$project_id,
$hook_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/hooks/:hook_id` and returns the decoded response content.
- delete\_project\_hook
```
$api->delete_project_hook(
$project_id,
$hook_id,
);
```
Sends a `DELETE` request to `projects/:project_id/hooks/:hook_id`.
- set\_project\_fork
```
$api->set_project_fork(
$project_id,
$from_project_id,
);
```
Sends a `POST` request to `projects/:project_id/fork/:from_project_id`.
- clear\_project\_fork
```
$api->clear_project_fork(
$project_id,
);
```
Sends a `DELETE` request to `projects/:project_id/fork`.
- start\_housekeeping
```perl
$api->start_housekeeping(
$project_id,
);
```
Sends a `POST` request to `projects/:project_id/housekeeping`.
- transfer\_project\_to\_namespace
```
$api->transfer_project_to_namespace(
$project_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/transfer`.
## Project access requests
See [https://docs.gitlab.com/ce/api/access\_requests.html](https://docs.gitlab.com/ce/api/access_requests.html).
- project\_access\_requests
```perl
my $requests = $api->project_access_requests(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/access_requests` and returns the decoded response content.
- request\_project\_access
```perl
my $request = $api->request_project_access(
$project_id,
);
```
Sends a `POST` request to `projects/:project_id/access_requests` and returns the decoded response content.
- approve\_project\_access
```perl
my $request = $api->approve_project_access(
$project_id,
$user_id,
);
```
Sends a `PUT` request to `projects/:project_id/access_requests/:user_id/approve` and returns the decoded response content.
- deny\_project\_access
```perl
$api->deny_project_access(
$project_id,
$user_id,
);
```
Sends a `DELETE` request to `projects/:project_id/access_requests/:user_id`.
## Project badges
See [https://docs.gitlab.com/ce/api/project\_badges.html](https://docs.gitlab.com/ce/api/project_badges.html).
- project\_badges
```perl
my $badges = $api->project_badges(
$project_id,
);
```
Sends a `GET` request to `projects/:project_id/badges` and returns the decoded response content.
- project\_badge
```perl
my $badge = $api->project_badge(
$project_id,
$badge_id,
);
```
Sends a `GET` request to `projects/:project_id/badges/:badge_id` and returns the decoded response content.
- create\_project\_badge
```perl
my $badge = $api->create_project_badge(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/badges` and returns the decoded response content.
- edit\_project\_badge
```perl
my $badge = $api->edit_project_badge(
$project_id,
$badge_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/badges/:badge_id` and returns the decoded response content.
- delete\_project\_badge
```
$api->delete_project_badge(
$project_id,
$badge_id,
);
```
Sends a `DELETE` request to `projects/:project_id/badges/:badge_id`.
- preview\_project\_badge
```perl
my $preview = $api->preview_project_badge(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/badges/render` and returns the decoded response content.
## Project import/export
See [https://docs.gitlab.com/ce/api/project\_import\_export.html](https://docs.gitlab.com/ce/api/project_import_export.html).
- schedule\_project\_export
```
$api->schedule_project_export(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/export`.
- project\_export\_status
```perl
my $status = $api->project_export_status(
$project_id,
);
```
Sends a `GET` request to `projects/:project_id/export` and returns the decoded response content.
- download\_project\_export
```perl
my $download = $api->download_project_export(
$project_id,
);
```
Sends a `GET` request to `projects/:project_id/export/download` and returns the decoded response content.
- schedule\_project\_import
```
$api->schedule_project_import(
\%params,
);
```
Sends a `POST` request to `projects/import`.
- project\_import\_status
```perl
my $status = $api->project_import_status(
$project_id,
);
```
Sends a `GET` request to `projects/:project_id/import` and returns the decoded response content.
## Project members
See [https://docs.gitlab.com/ce/api/members.html](https://docs.gitlab.com/ce/api/members.html).
- project\_members
```perl
my $members = $api->project_members(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/members` and returns the decoded response content.
- all\_project\_members
```perl
my $members = $api->all_project_members(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/members/all` and returns the decoded response content.
- project\_member
```perl
my $member = $api->project_member(
$project_id,
$user_id,
);
```
Sends a `GET` request to `projects/:project_id/members/:user_id` and returns the decoded response content.
- add\_project\_member
```perl
my $member = $api->add_project_member(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/members` and returns the decoded response content.
- update\_project\_member
```perl
my $member = $api->update_project_member(
$project_id,
$user_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/members/:user_id` and returns the decoded response content.
- remove\_project\_member
```perl
$api->remove_project_member(
$project_id,
$user_id,
);
```
Sends a `DELETE` request to `projects/:project_id/members/:user_id`.
## Project snippets
See [https://docs.gitlab.com/ce/api/project\_snippets.html](https://docs.gitlab.com/ce/api/project_snippets.html).
- project\_snippets
```perl
my $snippets = $api->project_snippets(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/snippets` and returns the decoded response content.
- project\_snippet
```perl
my $snippet = $api->project_snippet(
$project_id,
$snippet_id,
);
```
Sends a `GET` request to `projects/:project_id/snippets/:snippet_id` and returns the decoded response content.
- create\_project\_snippet
```
$api->create_project_snippet(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/snippets`.
- edit\_project\_snippet
```
$api->edit_project_snippet(
$project_id,
$snippet_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/snippets/:snippet_id`.
- delete\_project\_snippet
```
$api->delete_project_snippet(
$project_id,
$snippet_id,
);
```
Sends a `DELETE` request to `projects/:project_id/snippets/:snippet_id`.
- project\_snippet\_content
```perl
my $content = $api->project_snippet_content(
$project_id,
$snippet_id,
);
```
Sends a `GET` request to `projects/:project_id/snippets/:snippet_id/raw` and returns the decoded response content.
- project\_snippet\_user\_agent\_detail
```perl
my $user_agent = $api->project_snippet_user_agent_detail(
$project_id,
$snippet_id,
);
```
Sends a `GET` request to `projects/:project_id/snippets/:snippet_id/user_agent_detail` and returns the decoded response content.
## Protected branches
See [https://docs.gitlab.com/ce/api/protected\_branches.html](https://docs.gitlab.com/ce/api/protected_branches.html).
- protected\_branches
```perl
my $branches = $api->protected_branches(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/protected_branches` and returns the decoded response content.
- protected\_branch
```perl
my $branch = $api->protected_branch(
$project_id,
$branch_name,
);
```
Sends a `GET` request to `projects/:project_id/protected_branches/:branch_name` and returns the decoded response content.
- protect\_branch
```perl
my $branch = $api->protect_branch(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/protected_branches` and returns the decoded response content.
- unprotect\_branch
```
$api->unprotect_branch(
$project_id,
$branch_name,
);
```
Sends a `DELETE` request to `projects/:project_id/protected_branches/:branch_name`.
## Protected tags
See [https://docs.gitlab.com/ce/api/protected\_tags.html](https://docs.gitlab.com/ce/api/protected_tags.html).
- protected\_tags
```perl
my $tags = $api->protected_tags(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/protected_tags` and returns the decoded response content.
- protected\_tag
```perl
my $tag = $api->protected_tag(
$project_id,
$tag_name,
);
```
Sends a `GET` request to `projects/:project_id/protected_tags/:tag_name` and returns the decoded response content.
- protect\_tag
```perl
my $tag = $api->protect_tag(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/protected_tags` and returns the decoded response content.
- unprotect\_tag
```
$api->unprotect_tag(
$project_id,
$tag_name,
);
```
Sends a `DELETE` request to `projects/:project_id/protected_tags/:tag_name`.
## Releases
See [https://docs.gitlab.com/ce/api/releases/index.html](https://docs.gitlab.com/ce/api/releases/index.html).
- releases
```perl
my $releases = $api->releases(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/releases` and returns the decoded response content.
- release
```perl
my $release = $api->release(
$project_id,
$tag_name,
);
```
Sends a `GET` request to `projects/:project_id/releases/:tag_name` and returns the decoded response content.
- create\_release
```perl
my $release = $api->create_release(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/releases` and returns the decoded response content.
- update\_release
```perl
my $release = $api->update_release(
$project_id,
$tag_name,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/releases/:tag_name` and returns the decoded response content.
- delete\_release
```perl
my $release = $api->delete_release(
$project_id,
$tag_name,
);
```
Sends a `DELETE` request to `projects/:project_id/releases/:tag_name` and returns the decoded response content.
## Release Links
See [https://docs.gitlab.com/ce/api/releases/links.html](https://docs.gitlab.com/ce/api/releases/links.html).
- release\_links
```perl
my $links = $api->release_links(
$project_id,
$tag_name,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/releases/:tag_name/assets/links` and returns the decoded response content.
- release\_link
```perl
my $link = $api->release_link(
$project_id,
$tag_name,
$link_id,
);
```
Sends a `GET` request to `projects/:project_id/releases/:tag_name/assets/links/:link_id` and returns the decoded response content.
- create\_release\_link
```perl
my $link = $api->create_release_link(
$project_id,
$tag_name,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/releases/:tag_name/assets/links` and returns the decoded response content.
- update\_release\_link
```perl
my $link = $api->update_release_link(
$project_id,
$tag_name,
$link_id,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/releases/:tag_name/assets/links/:link_id` and returns the decoded response content.
- delete\_release\_link
```perl
my $link = $api->delete_release_link(
$project_id,
$tag_name,
$link_id,
);
```
Sends a `DELETE` request to `projects/:project_id/releases/:tag_name/assets/links/:link_id` and returns the decoded response content.
## Repositories
See [https://docs.gitlab.com/ce/api/repositories.html](https://docs.gitlab.com/ce/api/repositories.html).
- tree
```perl
my $tree = $api->tree(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/tree` and returns the decoded response content.
- blob
```perl
my $blob = $api->blob(
$project_id,
$sha,
);
```
Sends a `GET` request to `projects/:project_id/repository/blobs/:sha` and returns the decoded response content.
- raw\_blob
```perl
my $raw_blob = $api->raw_blob(
$project_id,
$sha,
);
```
Sends a `GET` request to `projects/:project_id/repository/blobs/:sha/raw` and returns the decoded response content.
- archive
```perl
my $archive = $api->archive(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/archive` and returns the raw response content.
- compare
```perl
my $comparison = $api->compare(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/compare` and returns the decoded response content.
- contributors
```perl
my $contributors = $api->contributors(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/contributors` and returns the decoded response content.
## Repository files
See [https://docs.gitlab.com/ce/api/repository\_files.html](https://docs.gitlab.com/ce/api/repository_files.html).
- file
```perl
my $file = $api->file(
$project_id,
$file_path,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/files/:file_path` and returns the decoded response content.
- raw\_file
```perl
my $content = $api->raw_file(
$project_id,
$file_path,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/files/:file_path/raw` and returns the raw response content.
- create\_file
```
$api->create_file(
$project_id,
$file_path,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/repository/files/:file_path`.
- edit\_file
```
$api->edit_file(
$project_id,
$file_path,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/repository/files/:file_path`.
- delete\_file
```
$api->delete_file(
$project_id,
$file_path,
\%params,
);
```
Sends a `DELETE` request to `projects/:project_id/repository/files/:file_path`.
## Runners
See [https://docs.gitlab.com/ce/api/runners.html](https://docs.gitlab.com/ce/api/runners.html).
- runners
```perl
my $runners = $api->runners(
\%params,
);
```
Sends a `GET` request to `runners` and returns the decoded response content.
- all\_runners
```perl
my $runners = $api->all_runners(
\%params,
);
```
Sends a `GET` request to `runners/all` and returns the decoded response content.
- runner
```perl
my $runner = $api->runner(
$runner_id,
);
```
Sends a `GET` request to `runners/:runner_id` and returns the decoded response content.
- update\_runner
```perl
my $runner = $api->update_runner(
$runner_id,
\%params,
);
```
Sends a `PUT` request to `runners/:runner_id` and returns the decoded response content.
- delete\_runner
```
$api->delete_runner(
$runner_id,
);
```
Sends a `DELETE` request to `runners/:runner_id`.
- runner\_jobs
```perl
my $jobs = $api->runner_jobs(
$runner_id,
\%params,
);
```
Sends a `GET` request to `runners/:runner_id/jobs` and returns the decoded response content.
- project\_runners
```perl
my $runners = $api->project_runners(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/runners` and returns the decoded response content.
- enable\_project\_runner
```perl
my $runner = $api->enable_project_runner(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/runners` and returns the decoded response content.
- disable\_project\_runner
```perl
my $runner = $api->disable_project_runner(
$project_id,
$runner_id,
);
```
Sends a `DELETE` request to `projects/:project_id/runners/:runner_id` and returns the decoded response content.
## Search
See [https://docs.gitlab.com/ce/api/search.html](https://docs.gitlab.com/ce/api/search.html).
- search
```perl
my $results = $api->search(
\%params,
);
```
Sends a `GET` request to `search` and returns the decoded response content.
## Services
See [https://docs.gitlab.com/ce/api/services.html](https://docs.gitlab.com/ce/api/services.html).
- project\_service
```perl
my $service = $api->project_service(
$project_id,
$service_name,
);
```
Sends a `GET` request to `projects/:project_id/services/:service_name` and returns the decoded response content.
- edit\_project\_service
```
$api->edit_project_service(
$project_id,
$service_name,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/services/:service_name`.
- delete\_project\_service
```
$api->delete_project_service(
$project_id,
$service_name,
);
```
Sends a `DELETE` request to `projects/:project_id/services/:service_name`.
## Application settings
See [https://docs.gitlab.com/ce/api/settings.html](https://docs.gitlab.com/ce/api/settings.html).
- settings
```perl
my $settings = $api->settings();
```
Sends a `GET` request to `application/settings` and returns the decoded response content.
- update\_settings
```perl
my $settings = $api->update_settings(
\%params,
);
```
Sends a `PUT` request to `application/settings` and returns the decoded response content.
## Application statistics
See [https://docs.gitlab.com/ce/api/statistics.html](https://docs.gitlab.com/ce/api/statistics.html).
- statistics
```perl
my $statistics = $api->statistics();
```
Sends a `GET` request to `application/statistics` and returns the decoded response content.
## Sidekiq Metrics
See [https://docs.gitlab.com/ce/api/sidekiq\_metrics.html](https://docs.gitlab.com/ce/api/sidekiq_metrics.html).
- queue\_metrics
```perl
my $metrics = $api->queue_metrics();
```
Sends a `GET` request to `sidekiq/queue_metrics` and returns the decoded response content.
- process\_metrics
```perl
my $metrics = $api->process_metrics();
```
Sends a `GET` request to `sidekiq/process_metrics` and returns the decoded response content.
- job\_stats
```perl
my $stats = $api->job_stats();
```
Sends a `GET` request to `sidekiq/job_stats` and returns the decoded response content.
- compound\_metrics
```perl
my $metrics = $api->compound_metrics();
```
Sends a `GET` request to `sidekiq/compound_metrics` and returns the decoded response content.
## System hooks
See [https://docs.gitlab.com/ce/api/system\_hooks.html](https://docs.gitlab.com/ce/api/system_hooks.html).
- hooks
```perl
my $hooks = $api->hooks(
\%params,
);
```
Sends a `GET` request to `hooks` and returns the decoded response content.
- create\_hook
```
$api->create_hook(
\%params,
);
```
Sends a `POST` request to `hooks`.
- test\_hook
```perl
my $hook = $api->test_hook(
$hook_id,
);
```
Sends a `GET` request to `hooks/:hook_id` and returns the decoded response content.
- delete\_hook
```
$api->delete_hook(
$hook_id,
);
```
Sends a `DELETE` request to `hooks/:hook_id`.
## Tags
See [https://docs.gitlab.com/ce/api/tags.html](https://docs.gitlab.com/ce/api/tags.html).
- tags
```perl
my $tags = $api->tags(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/repository/tags` and returns the decoded response content.
- tag
```perl
my $tag = $api->tag(
$project_id,
$tag_name,
);
```
Sends a `GET` request to `projects/:project_id/repository/tags/:tag_name` and returns the decoded response content.
- create\_tag
```perl
my $tag = $api->create_tag(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/repository/tags` and returns the decoded response content.
- delete\_tag
```
$api->delete_tag(
$project_id,
$tag_name,
);
```
Sends a `DELETE` request to `projects/:project_id/repository/tags/:tag_name`.
- create\_tag\_release
```perl
my $release = $api->create_tag_release(
$project_id,
$tag_name,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/repository/tags/:tag_name/release` and returns the decoded response content.
- update\_tag\_release
```perl
my $release = $api->update_tag_release(
$project_id,
$tag_name,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/repository/tags/:tag_name/release` and returns the decoded response content.
## Todos
See [https://docs.gitlab.com/ce/api/todos.html](https://docs.gitlab.com/ce/api/todos.html).
- todos
```perl
my $todos = $api->todos(
\%params,
);
```
Sends a `GET` request to `todos` and returns the decoded response content.
- mark\_todo\_done
```perl
my $todo = $api->mark_todo_done(
$todo_id,
);
```
Sends a `POST` request to `todos/:todo_id/mark_as_done` and returns the decoded response content.
- mark\_all\_todos\_done
```
$api->mark_all_todos_done();
```
Sends a `POST` request to `todos/mark_as_done`.
## Users
See [https://docs.gitlab.com/ce/api/users.html](https://docs.gitlab.com/ce/api/users.html).
- users
```perl
my $users = $api->users(
\%params,
);
```
Sends a `GET` request to `users` and returns the decoded response content.
- user
```perl
my $user = $api->user(
$user_id,
);
```
Sends a `GET` request to `users/:user_id` and returns the decoded response content.
- create\_user
```perl
$api->create_user(
\%params,
);
```
Sends a `POST` request to `users`.
- edit\_user
```perl
$api->edit_user(
$user_id,
\%params,
);
```
Sends a `PUT` request to `users/:user_id`.
- delete\_user
```perl
$api->delete_user(
$user_id,
\%params,
);
```
Sends a `DELETE` request to `users/:user_id`.
- current\_user
```perl
my $user = $api->current_user();
```
Sends a `GET` request to `user` and returns the decoded response content.
- current\_user\_ssh\_keys
```perl
my $keys = $api->current_user_ssh_keys(
\%params,
);
```
Sends a `GET` request to `user/keys` and returns the decoded response content.
- user\_ssh\_keys
```perl
my $keys = $api->user_ssh_keys(
$user_id,
\%params,
);
```
Sends a `GET` request to `users/:user_id/keys` and returns the decoded response content.
- user\_ssh\_key
```perl
my $key = $api->user_ssh_key(
$key_id,
);
```
Sends a `GET` request to `user/keys/:key_id` and returns the decoded response content.
- create\_current\_user\_ssh\_key
```perl
$api->create_current_user_ssh_key(
\%params,
);
```
Sends a `POST` request to `user/keys`.
- create\_user\_ssh\_key
```perl
$api->create_user_ssh_key(
$user_id,
\%params,
);
```
Sends a `POST` request to `users/:user_id/keys`.
- delete\_current\_user\_ssh\_key
```perl
$api->delete_current_user_ssh_key(
$key_id,
);
```
Sends a `DELETE` request to `user/keys/:key_id`.
- delete\_user\_ssh\_key
```perl
$api->delete_user_ssh_key(
$user_id,
$key_id,
);
```
Sends a `DELETE` request to `users/:user_id/keys/:key_id`.
- current\_user\_gpg\_keys
```perl
my $keys = $api->current_user_gpg_keys(
\%params,
);
```
Sends a `GET` request to `user/gpg_keys` and returns the decoded response content.
- current\_user\_gpg\_key
```perl
my $key = $api->current_user_gpg_key(
$key_id,
);
```
Sends a `GET` request to `user/gpg_keys/:key_id` and returns the decoded response content.
- create\_current\_user\_gpg\_key
```perl
$api->create_current_user_gpg_key(
\%params,
);
```
Sends a `POST` request to `user/gpg_keys`.
- delete\_current\_user\_gpg\_key
```perl
$api->delete_current_user_gpg_key(
$key_id,
);
```
Sends a `DELETE` request to `user/gpg_keys/:key_id`.
- user\_gpg\_keys
```perl
my $keys = $api->user_gpg_keys(
$user_id,
\%params,
);
```
Sends a `GET` request to `users/:user_id/gpg_keys` and returns the decoded response content.
- user\_gpg\_key
```perl
my $key = $api->user_gpg_key(
$user_id,
$key_id,
);
```
Sends a `GET` request to `users/:user_id/gpg_keys/:key_id` and returns the decoded response content.
- create\_user\_gpg\_key
```perl
my $keys = $api->create_user_gpg_key(
$user_id,
\%params,
);
```
Sends a `POST` request to `users/:user_id/gpg_keys` and returns the decoded response content.
- delete\_user\_gpg\_key
```perl
$api->delete_user_gpg_key(
$user_id,
$key_id,
);
```
Sends a `DELETE` request to `users/:user_id/gpg_keys/:key_id`.
- current\_user\_emails
```perl
my $emails = $api->current_user_emails(
\%params,
);
```
Sends a `GET` request to `user/emails` and returns the decoded response content.
- user\_emails
```perl
my $emails = $api->user_emails(
$user_id,
\%params,
);
```
Sends a `GET` request to `users/:user_id/emails` and returns the decoded response content.
- current\_user\_email
```perl
my $email = $api->current_user_email(
$email_id,
);
```
Sends a `GET` request to `user/emails/:email_id` and returns the decoded response content.
- create\_current\_user\_email
```perl
my $email = $api->create_current_user_email(
\%params,
);
```
Sends a `POST` request to `user/emails` and returns the decoded response content.
- create\_user\_email
```perl
my $email = $api->create_user_email(
$user_id,
\%params,
);
```
Sends a `POST` request to `users/:user_id/emails` and returns the decoded response content.
- delete\_current\_user\_email
```perl
$api->delete_current_user_email(
$email_id,
);
```
Sends a `DELETE` request to `user/emails/:email_id`.
- delete\_user\_email
```perl
$api->delete_user_email(
$user_id,
$email_id,
);
```
Sends a `DELETE` request to `users/:user_id/emails/:email_id`.
- block\_user
```perl
my $success = $api->block_user(
$user_id,
);
```
Sends a `POST` request to `users/:user_id/block` and returns the decoded response content.
- unblock\_user
```perl
my $success = $api->unblock_user(
$user_id,
);
```
Sends a `POST` request to `users/:user_id/unblock` and returns the decoded response content.
- user\_impersonation\_tokens
```perl
my $tokens = $api->user_impersonation_tokens(
$user_id,
\%params,
);
```
Sends a `GET` request to `users/:user_id/impersonation_tokens` and returns the decoded response content.
- user\_impersonation\_token
```perl
my $token = $api->user_impersonation_token(
$user_id,
$impersonation_token_id,
);
```
Sends a `GET` request to `users/:user_id/impersonation_tokens/:impersonation_token_id` and returns the decoded response content.
- create\_user\_impersonation\_token
```perl
my $token = $api->create_user_impersonation_token(
$user_id,
\%params,
);
```
Sends a `POST` request to `users/:user_id/impersonation_tokens` and returns the decoded response content.
- delete\_user\_impersonation\_token
```perl
$api->delete_user_impersonation_token(
$user_id,
$impersonation_token_id,
);
```
Sends a `DELETE` request to `users/:user_id/impersonation_tokens/:impersonation_token_id`.
- all\_user\_activities
```perl
my $activities = $api->all_user_activities(
\%params,
);
```
Sends a `GET` request to `user/activities` and returns the decoded response content.
## Validate the .gitlab-ci.yml
See [https://docs.gitlab.com/ce/api/lint.html](https://docs.gitlab.com/ce/api/lint.html).
- lint
```perl
my $result = $api->lint(
\%params,
);
```
Sends a `POST` request to `lint` and returns the decoded response content.
## Version
See [https://docs.gitlab.com/ce/api/version.html](https://docs.gitlab.com/ce/api/version.html).
- version
```perl
my $version = $api->version();
```
Sends a `GET` request to `version` and returns the decoded response content.
## Wikis
See [https://docs.gitlab.com/ce/api/wikis.html](https://docs.gitlab.com/ce/api/wikis.html).
- wiki\_pages
```perl
my $pages = $api->wiki_pages(
$project_id,
\%params,
);
```
Sends a `GET` request to `projects/:project_id/wikis` and returns the decoded response content.
- wiki\_page
```perl
my $pages = $api->wiki_page(
$project_id,
$slug,
);
```
Sends a `GET` request to `projects/:project_id/wikis/:slug` and returns the decoded response content.
- create\_wiki\_page
```perl
my $page = $api->create_wiki_page(
$project_id,
\%params,
);
```
Sends a `POST` request to `projects/:project_id/wikis` and returns the decoded response content.
- edit\_wiki\_page
```perl
my $page = $api->edit_wiki_page(
$project_id,
$slug,
\%params,
);
```
Sends a `PUT` request to `projects/:project_id/wikis/:slug` and returns the decoded response content.
- delete\_wiki\_page
```
$api->delete_wiki_page(
$project_id,
$slug,
);
```
Sends a `DELETE` request to `projects/:project_id/wikis/:slug`.
# CONTRIBUTING
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](https://github.com/bluefeet/GitLab-API-v4)
and submit a pull request, just make sure you edit the files in the
`authors/` directory instead of `lib/GitLab/API/v4.pm` directly.
Please see
[https://github.com/bluefeet/GitLab-API-v4/blob/master/author/README.pod](https://github.com/bluefeet/GitLab-API-v4/blob/master/author/README.pod)
for more information.
Alternatively, you can
[open a ticket](https://github.com/bluefeet/GitLab-API-v4/issues).
# SUPPORT
Please submit bugs and feature requests to the
GitLab-API-v4 GitHub issue tracker:
[https://github.com/bluefeet/GitLab-API-v4/issues](https://github.com/bluefeet/GitLab-API-v4/issues)
# ACKNOWLEDGEMENTS
Thanks to [ZipRecruiter](https://www.ziprecruiter.com/)
for encouraging their employees to contribute back to the open
source ecosystem. Without their dedication to quality software
development this distribution would not exist.
# AUTHORS
```
Aran Clary Deltac
Dotan Dimet
Nigel Gregoire
trunov-ms
Marek R. Sotola
José Joaquín Atria
Dave Webb
Simon Ruderich
royce55
gregor herrmann
Luc Didry
Kieren Diment
Dmitry Frolov
Thomas Klausner
```
# COPYRIGHT AND LICENSE
Copyright (C) 2014 Aran Clary Deltac
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
README.pod 100644 000766 000024 2273 13621075102 15773 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author
=pod
The C directory contains the logic for generating the v4.pm
module.
=head1 DATA FILES
The C drives the order and configuration of
individual sections.
The YAML files in the C directory have lines
like this:
- SUB: HTTP_METHOD PATH
- SUB: RETURN = HTTP_METHOD PATH?
=head2 SUB
The name if the subroutine that will be created in v4.pm.
=head2 RETURN
The name of the return variable if any. This is used as part of
generating the documentation. If no return variable is declared
then the subroutine will return an empty list no matter what
the API response returns.
=head2 HTTP_METHOD
One of GET, POST, PUT, or DELETE.
=head2 PATH
The path to the API endpoint (after the /api/v4 bit).
The path is a list of static and dynamic strings separate by
forward slashes. So, if you have:
/foo/:bar/baz
Then the API subroutine would require one argument which would
be injected in place of C<:bar>.
=head2 ?
If the PATH ends with a C> then this signifies that the API
endpoint accepts query parameters.
=head1 GENERATING
To generate C do this:
cd author
perl generate.pl > ../lib/GitLab/API/v4.pm
=cut
config.yml 100644 000766 000024 14671 13621075102 16347 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author ---
sections:
- award_emoji:
head: Award Emoji
doc_url: https://docs.gitlab.com/ce/api/award_emoji.html
- branches:
head: Branches
doc_url: https://docs.gitlab.com/ce/api/branches.html
- broadcast_messages:
head: Broadcast Messages
doc_url: https://docs.gitlab.com/ce/api/broadcast_messages.html
- project_level_variables:
head: Project-level Variables
doc_url: https://docs.gitlab.com/ce/api/project_level_variables.html
- group_level_variables:
head: Group-level Variables
doc_url: https://docs.gitlab.com/ce/api/group_level_variables.html
- snippets:
head: Snippets
doc_url: https://docs.gitlab.com/ce/api/snippets.html
- commits:
head: Commits
doc_url: https://docs.gitlab.com/ce/api/commits.html
- container_registry:
head: Container Registry
doc_url: https://docs.gitlab.com/ce/api/container_registry.html
- custom_attributes:
head: Custom Attributes
doc_url: https://docs.gitlab.com/ce/api/custom_attributes.html
- deployments:
head: Deployments
doc_url: https://docs.gitlab.com/ce/api/deployments.html
- deploy_keys:
head: Deploy Keys
doc_url: https://docs.gitlab.com/ce/api/deploy_keys.html
- environments:
head: Environments
doc_url: https://docs.gitlab.com/ce/api/environments.html
- events:
head: Events
doc_url: https://docs.gitlab.com/ce/api/events.html
- features:
head: Feature flags
doc_url: https://docs.gitlab.com/ce/api/features.html
- gitignores_templates:
head: Gitignores
doc_url: https://docs.gitlab.com/ce/api/templates/gitignores.html
- gitlab_ci_ymls_templates:
head: GitLab CI YMLs
doc_url: https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html
- groups:
head: Groups
doc_url: https://docs.gitlab.com/ce/api/groups.html
- group_access_requests:
head: Group access requests
doc_url: https://docs.gitlab.com/ce/api/access_requests.html
- group_badges:
head: Group badges
doc_url: https://docs.gitlab.com/ce/api/group_badges.html
- group_members:
head: Group members
doc_url: https://docs.gitlab.com/ce/api/members.html
- issues:
head: Issues
doc_url: https://docs.gitlab.com/ce/api/issues.html
- boards:
head: Issue Boards
doc_url: https://docs.gitlab.com/ce/api/boards.html
- group_boards:
head: Group Issue Boards
doc_url: https://docs.gitlab.com/ce/api/group_boards.html
- jobs:
head: Jobs
doc_url: https://docs.gitlab.com/ce/api/jobs.html
- keys:
head: Keys
doc_url: https://docs.gitlab.com/ce/api/keys.html
- labels:
head: Labels
doc_url: https://docs.gitlab.com/ce/api/labels.html
- markdown:
head: Markdown
doc_url: https://docs.gitlab.com/ce/api/markdown.html
- merge_requests:
head: Merge requests
doc_url: https://docs.gitlab.com/ce/api/merge_requests.html
- milestones:
head: Milestones
doc_url: https://docs.gitlab.com/ce/api/milestones.html
- group_milestones:
head: Group milestones
doc_url: https://docs.gitlab.com/ce/api/group_milestones.html
- namespaces:
head: Namespaces
doc_url: https://docs.gitlab.com/ce/api/namespaces.html
- notes:
head: Notes
doc_url: https://docs.gitlab.com/ce/api/notes.html
- discussions:
head: Discussions
doc_url: https://docs.gitlab.com/ce/api/discussions.html
- resource_label_events:
head: Resource label events
doc_url: https://docs.gitlab.com/ce/api/resource_label_events.html
- notification_settings:
head: Notification settings
doc_url: https://docs.gitlab.com/ce/api/notification_settings.html
- licenses_templates:
head: Licenses
doc_url: https://docs.gitlab.com/ce/api/templates/licenses.html
- page_domains:
head: Pages domains
doc_url: https://docs.gitlab.com/ce/api/pages_domains.html
- pipelines:
head: Pipelines
doc_url: https://docs.gitlab.com/ce/api/pipelines.html
- pipeline_triggers:
head: Pipeline triggers
doc_url: https://docs.gitlab.com/ce/api/pipeline_triggers.html
- pipeline_schedules:
head: Pipeline schedules
doc_url: https://docs.gitlab.com/ce/api/pipeline_schedules.html
- projects:
head: Projects
doc_url: https://docs.gitlab.com/ce/api/projects.html
- project_access_requests:
head: Project access requests
doc_url: https://docs.gitlab.com/ce/api/access_requests.html
- project_badges:
head: Project badges
doc_url: https://docs.gitlab.com/ce/api/project_badges.html
- project_import_export:
head: Project import/export
doc_url: https://docs.gitlab.com/ce/api/project_import_export.html
- project_members:
head: Project members
doc_url: https://docs.gitlab.com/ce/api/members.html
- project_snippets:
head: Project snippets
doc_url: https://docs.gitlab.com/ce/api/project_snippets.html
- protected_branches:
head: Protected branches
doc_url: https://docs.gitlab.com/ce/api/protected_branches.html
- protected_tags:
head: Protected tags
doc_url: https://docs.gitlab.com/ce/api/protected_tags.html
- releases:
head: Releases
doc_url: https://docs.gitlab.com/ce/api/releases/index.html
- release_links:
head: Release Links
doc_url: https://docs.gitlab.com/ce/api/releases/links.html
- repositories:
head: Repositories
doc_url: https://docs.gitlab.com/ce/api/repositories.html
- repository_files:
head: Repository files
doc_url: https://docs.gitlab.com/ce/api/repository_files.html
- runners:
head: Runners
doc_url: https://docs.gitlab.com/ce/api/runners.html
- search:
head: Search
doc_url: https://docs.gitlab.com/ce/api/search.html
- services:
head: Services
doc_url: https://docs.gitlab.com/ce/api/services.html
- settings:
head: Application settings
doc_url: https://docs.gitlab.com/ce/api/settings.html
- statistics:
head: Application statistics
doc_url: https://docs.gitlab.com/ce/api/statistics.html
- sidekiq_metrics:
head: Sidekiq Metrics
doc_url: https://docs.gitlab.com/ce/api/sidekiq_metrics.html
- system_hooks:
head: System hooks
doc_url: https://docs.gitlab.com/ce/api/system_hooks.html
- tags:
head: Tags
doc_url: https://docs.gitlab.com/ce/api/tags.html
- todos:
head: Todos
doc_url: https://docs.gitlab.com/ce/api/todos.html
- users:
head: Users
doc_url: https://docs.gitlab.com/ce/api/users.html
- lint:
head: Validate the .gitlab-ci.yml
doc_url: https://docs.gitlab.com/ce/api/lint.html
- version:
head: Version
doc_url: https://docs.gitlab.com/ce/api/version.html
- wikis:
head: Wikis
doc_url: https://docs.gitlab.com/ce/api/wikis.html
footer.pm 100644 000766 000024 4333 13621075102 16165 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author 1;
__END__
=head1 CONTRIBUTING
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
L
and submit a pull request, just make sure you edit the files in the
C directory instead of C directly.
Please see
L
for more information.
Alternatively, you can
L.
=head1 SUPPORT
Please submit bugs and feature requests to the
GitLab-API-v4 GitHub issue tracker:
L
=head1 ACKNOWLEDGEMENTS
Thanks to L
for encouraging their employees to contribute back to the open
source ecosystem. Without their dedication to quality software
development this distribution would not exist.
=head1 AUTHORS
Aran Clary Deltac
Dotan Dimet
Nigel Gregoire
trunov-ms
Marek R. Sotola
José Joaquín Atria
Dave Webb
Simon Ruderich
royce55
gregor herrmann
Luc Didry
Kieren Diment
Dmitry Frolov
Thomas Klausner
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2014 Aran Clary Deltac
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see L.
=cut
generate.pl 100755 000766 000024 10031 13621075102 16473 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author #!/usr/bin/env perl
use strictures 1;
use YAML::XS qw();
use Data::Dumper;
use Path::Tiny;
my $dir = path('sections');
my $header = path('header.pm')->slurp();
my $footer = path('footer.pm')->slurp();
my $config = YAML::XS::Load( path('config.yml')->slurp() );
print $header;
print "=head1 API METHODS\n\n";
foreach my $section_pack (@{ $config->{sections} }) {
foreach my $section_name (keys %$section_pack) {
my $section = $section_pack->{$section_name};
my $file = $dir->child("$section_name.yml");
my $endpoints = YAML::XS::Load( $file->slurp() );
print "=head2 $section->{head}\n\n";
print "See L<$section->{doc_url}>.\n\n";
print "=over\n\n";
foreach my $endpoint (@$endpoints) {
if (keys(%$endpoint) == 1) {
my ($method) = keys %$endpoint;
$endpoint = {
method => $method,
spec => $endpoint->{$method},
};
}
my $method = $endpoint->{method};
my $spec = $endpoint->{spec};
my ($return, $verb, $path, $params_ok);
if ($spec =~ m{^(?:(\S+) = |)(GET|POST|PUT|DELETE) ([^/\s]\S*?[^/\s]?)(\??)$}) {
($return, $verb, $path, $params_ok) = ($1, $2, $3, $4);
}
else {
die "Invalid spec ($method): $spec";
}
my $no_decode = 0;
$no_decode = 1 if !$return;
$no_decode = 1 if $endpoint->{no_decode};
print "=item $method\n\n";
print ' ';
print "my \$$return = " if $return;
print "\$api->$method(";
my @args = (
map { ($_ =~ m{^:(.+)$}) ? "\$$1" : () }
split(m{/}, $path)
);
push @args, '\%params' if $params_ok;
if (@args) {
print "\n" . join('',
map { " $_,\n" }
@args
);
print ' ';
}
print ");\n\n";
print "Sends a C<$verb> request to C<$path>";
print ' and returns the ' . ($no_decode ? 'raw' : 'decoded') . ' response content' if $return;
print ".\n\n";
print "$endpoint->{note}\n" if $endpoint->{note};
print "=cut\n\n";
print "sub $method {\n";
print " my \$self = shift;\n";
if (@args) {
my $min_args = @args;
my $max_args = @args;
$min_args-- if $params_ok;
if ($min_args == $max_args) {
print " croak '$method must be called with $min_args arguments' if \@_ != $min_args;\n";
}
else {
print " croak '$method must be called with $min_args to $max_args arguments' if \@_ < $min_args or \@_ > $max_args;\n";
}
my $i = 0;
foreach my $arg (@args) {
my $is_params = ($params_ok and $i==$#args) ? 1 : 0;
if ($is_params) {
print " croak 'The last argument ($arg) to $method must be a hash ref' if defined(\$_[$i]) and ref(\$_[$i]) ne 'HASH';\n";
}
else {
my $number = $i + 1;
print " croak 'The #$number argument ($arg) to $method must be a scalar' if ref(\$_[$i]) or (!defined \$_[$i]);\n";
}
$i ++;
}
print " my \$params = (\@_ == $max_args) ? pop() : undef;\n" if $params_ok;
}
else {
print " croak \"The $method method does not take any arguments\" if \@_;\n";
}
print " my \$options = {};\n";
print " \$options->{decode} = 0;\n" if $no_decode;
if ($params_ok) {
my $params_key = ($verb eq 'GET' or $verb eq 'HEAD') ? 'query' : 'content';
print " \$options->{$params_key} = \$params if defined \$params;\n";
}
print ' ';
print 'return ' if $return;
print "\$self->_call_rest_client( '$verb', '$path', [\@_], \$options );\n";
print " return;\n" if !$return;
print "}\n\n";
}
print "=back\n\n";
}}
print "=cut\n\n";
print $footer;
header.pm 100644 000766 000024 21607 13621075102 16142 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author package GitLab::API::v4;
our $VERSION = '0.24';
=encoding utf8
=head1 NAME
GitLab::API::v4 - A complete GitLab API v4 client.
=head1 SYNOPSIS
use GitLab::API::v4;
my $api = GitLab::API::v4->new(
url => $v4_api_url,
private_token => $token,
);
my $branches = $api->branches( $project_id );
=head1 DESCRIPTION
This module provides a one-to-one interface with the GitLab
API v4. Much is not documented here as it would just be duplicating
GitLab's own L.
Note that this distribution also includes the L command-line
interface (CLI).
=head2 Upgrading
If you are upgrading from L make sure you read:
L
Also, review the C file included in the distribution as it outlines
the changes made to convert the v3 module to v4:
L
Finally, be aware that many methods were added, removed, renamed, and/or altered.
If you want to review exactly what was changed you can use GitHub's compare tool:
L
Or clone the repo and run this command:
C
=head2 Credentials
Authentication credentials may be defined by setting either the L
or L arguments.
If no credentials are supplied then the client will be anonymous and greatly
limited in what it can do with the API.
Extra care has been taken to hide the token arguments behind closures. This way,
if you dump your api object, your tokens won't accidentally leak into places you
don't want them to.
=head2 Constants
The GitLab API, in rare cases, uses a hard-coded value to represent a state.
To make life easier the L module exposes
these states as named variables.
=head2 Exceptions
The API methods will all throw a useful exception if
an unsuccessful response is received from the API. That is except for
C requests that return a C<404> response - these will return C
for methods that return a value.
If you'd like to catch and handle these exceptions consider using
L.
=head2 Logging
This module uses L and produces some debug messages here
and there, but the most useful bits are the info messages produced
just before each API call.
=head2 Project ID
Note that many API calls require a C<$project_id>. This can be
specified as a numeric project C or, in many cases, maybe all cases,
as a C string. The GitLab documentation on
this point is vague.
=cut
use Carp qw( croak );
use GitLab::API::v4::Paginator;
use GitLab::API::v4::RESTClient;
use Log::Any qw( $log );
use Types::Common::Numeric -types;
use Types::Common::String -types;
use Types::Standard -types;
use Moo;
use strictures 2;
use namespace::clean;
sub BUILD {
my ($self) = @_;
# Ensure any token arguments get moved into their closure before we return
# the built object.
$self->access_token();
$self->private_token();
$log->debugf( "An instance of %s has been created.", ref($self) );
return;
}
sub _call_rest_client {
my ($self, $verb, $path, $path_vars, $options) = @_;
$options->{headers} = $self->_auth_headers();
return $self->rest_client->request(
$verb, $path, $path_vars, $options,
);
}
sub _auth_headers {
my ($self) = @_;
my $headers = {};
$headers->{'authorization'} = 'Bearer ' . $self->access_token()
if defined $self->access_token();
$headers->{'private-token'} = $self->private_token()
if defined $self->private_token();
$headers->{'sudo'} = $self->sudo_user()
if defined $self->sudo_user();
return $headers;
}
sub _clone_args {
my ($self) = @_;
return {
url => $self->url(),
retries => $self->retries(),
rest_client => $self->rest_client(),
(defined $self->access_token()) ? (access_token=>$self->access_token()) : (),
(defined $self->private_token()) ? (private_token=>$self->private_token()) : (),
};
}
sub _clone {
my $self = shift;
my $class = ref $self;
my $args = {
%{ $self->_clone_args() },
%{ $class->BUILDARGS( @_ ) },
};
return $class->new( $args );
}
# Little utility method that avoids any ambiguity in whether a closer is
# causing circular references. Don't ever pass it a ref.
sub _make_safe_closure {
my ($ret) = @_;
return sub{ $ret };
}
=head1 REQUIRED ARGUMENTS
=head2 url
The URL to your v4 API endpoint. Typically this will be something
like C.
=cut
has url => (
is => 'ro',
isa => NonEmptySimpleStr,
required => 1,
);
=head1 OPTIONAL ARGUMENTS
=head2 access_token
A GitLab API OAuth2 token. If set then L may not be set.
See L.
=cut
has _access_token_arg => (
is => 'ro',
isa => NonEmptySimpleStr,
init_arg => 'access_token',
clearer => '_clear_access_token_arg',
);
has _access_token_closure => (
is => 'lazy',
isa => CodeRef,
init_arg => undef,
builder => '_build_access_token_closure',
);
sub _build_access_token_closure {
my ($self) = @_;
my $token = $self->_access_token_arg();
$self->_clear_access_token_arg();
return _make_safe_closure( $token );
}
sub access_token {
my ($self) = @_;
return $self->_access_token_closure->();
}
=head2 private_token
A GitLab API personal token. If set then L may not be set.
See L.
=cut
has _private_token_arg => (
is => 'ro',
isa => NonEmptySimpleStr,
init_arg => 'private_token',
clearer => '_clear_private_token_arg',
);
has _private_token_closure => (
is => 'lazy',
isa => CodeRef,
init_arg => undef,
builder => '_build_private_token_closure',
);
sub _build_private_token_closure {
my ($self) = @_;
my $token = $self->_private_token_arg();
$self->_clear_private_token_arg();
return _make_safe_closure( $token );
}
sub private_token {
my ($self) = @_;
return $self->_private_token_closure->();
}
=head2 retries
The number of times the request should be retried in case it fails (5XX HTTP
response code). Defaults to C<0> (false), meaning that a failed request will
not be retried.
=cut
has retries => (
is => 'ro',
isa => PositiveOrZeroInt,
default => 0,
);
=head2 sudo_user
The user to execute API calls as. You may find it more useful to use the
L method instead.
See L.
=cut
has sudo_user => (
is => 'ro',
isa => NonEmptySimpleStr,
);
=head2 rest_client
An instance of L (or whatever L
is set to). Typically you will not be setting this as it defaults to a new
instance and customization should not be necessary.
=cut
has rest_client => (
is => 'lazy',
isa => InstanceOf[ 'GitLab::API::v4::RESTClient' ],
);
sub _build_rest_client {
my ($self) = @_;
return $self->rest_client_class->new(
base_url => $self->url(),
retries => $self->retries(),
);
}
=head2 rest_client_class
The class to use when constructing the L.
Defaults to L.
=cut
has rest_client_class => (
is => 'lazy',
isa => NonEmptySimpleStr,
);
sub _build_rest_client_class {
return 'GitLab::API::v4::RESTClient';
}
=head1 UTILITY METHODS
=head2 paginator
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 C and C parameters,
and returns an array ref, this will return a L
object that will allow you to walk the records one page or one record
at a time.
=cut
sub paginator {
my ($self, $method, @args) = @_;
my $params = (ref($args[-1]) eq 'HASH') ? pop(@args) : {};
return GitLab::API::v4::Paginator->new(
api => $self,
method => $method,
args => \@args,
params => $params,
);
}
=head2 sudo
$api->sudo('fred')->create_issue(...);
Returns a new instance of L with the L argument
set.
See L.
=cut
sub sudo {
my ($self, $user) = @_;
return $self->_clone(
sudo_user => $user,
);
}
award_emoji.yml 100644 000766 000024 5136 13621075102 21166 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- issue_award_emojis: award_emojis = GET projects/:project_id/issues/:issue_iid/award_emoji?
- merge_request_award_emojis: award_emojis = GET projects/:project_id/merge_requests/:merge_request_iid/award_emoji?
- snippet_award_emojis: award_emojis = GET projects/:project_id/merge_requests/:merge_request_id/award_emoji?
- issue_award_emoji: award_emoji = GET projects/:project_id/issues/:issue_iid/award_emoji/:award_id
- merge_request_award_emoji: award_emoji = GET projects/:project_id/merge_requests/:merge_request_iid/award_emoji/:award_id
- snippet_award_emoji: award_emoji = GET projects/:project_id/snippets/:snippet_id/award_emoji/:award_id
- create_issue_award_emoji: award_emoji = POST projects/:project_id/issues/:issue_iid/award_emoji?
- create_merge_request_award_emoji: award_emoji = POST projects/:project_id/merge_requests/:merge_request_iid/award_emoji?
- create_snippet_award_emoji: award_emoji = POST projects/:project_id/snippets/:snippet_id/award_emoji
- delete_issue_award_emoji: award_emoji = DELETE projects/:project_id/issues/:issue_id/award_emoji/:award_id
- delete_merge_request_award_emoji: award_emoji = DELETE projects/:project_id/merge_requests/:merge_request_id/award_emoji/:award_id
- delete_snippet_award_emoji: award_emoji = DELETE projects/:project_id/snippets/:snippet_id/award_emoji/:award_id
- issue_note_award_emojis: award_emojis = GET projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji
- issue_note_award_emoji: award_emoji = GET projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id
- create_issue_note_award_emoji: award_emoji = POST projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji?
- delete_issue_note_award_emoji: award_emoji = DELETE projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id
- merge_request_note_award_emojis: award_emojis = GET projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji
- merge_request_note_award_emoji: award_emoji = GET projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji/:award_id
- create_merge_request_note_award_emoji: award_emoji = POST projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji?
- delete_merge_request_note_award_emoji: award_emoji = DELETE projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji/:award_id
# What about snippets? Do we make snippet_note_award_emoji methods? The docs only
# reference issues and merge requests. Its probably a failing in GitLab's regularly
# inconsistent documentation. If they exist feel free to add them here and make a PR.
boards.yml 100644 000766 000024 761 13621075102 20136 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- project_boards: boards = GET projects/:project_id/boards?
- project_board_lists: lists = GET projects/:project_id/boards/:board_id/lists?
- project_board_list: list = GET projects/:project_id/boards/:board_id/lists/:list_id
- create_project_board_list: list = POST projects/:project_id/boards/:board_id/lists?
- edit_project_board_list: list = PUT projects/:project_id/boards/:board_id/lists/:list_id?
- delete_project_board_list: DELETE projects/:project_id/boards/:board_id/lists/:list_id
branches.yml 100644 000766 000024 1177 13621075102 20473 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- branches: branches = GET projects/:project_id/repository/branches?
- branch: branch = GET projects/:project_id/repository/branches/:branch_name
- create_branch: branch = POST projects/:project_id/repository/branches?
- delete_branch: DELETE projects/:project_id/repository/branches/:branch_name
- delete_merged_branches: DELETE projects/:project_id/repository/merged_branches
# These are not implemented as they are already deprecated in the v4 API docs.
#- protect_branch: PUT /projects/:project_id/repository/branches/:branch_name/protect?
#- unprotect_branch: PUT /projects/:project_id/repository/branches/:branch_name/unprotect
broadcast_messages.yml 100644 000766 000024 510 13621075102 22505 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- broadcast_messages: messages = GET broadcast_messages?
- broadcast_message: message = GET broadcast_messages/:message_id
- create_broadcast_message: message = POST broadcast_messages?
- edit_broadcast_message: message = PUT broadcast_messages/:message_id?
- delete_broadcast_message: DELETE broadcast_messages/:message_id
commits.yml 100644 000766 000024 1537 13621075102 20361 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- commits: commits = GET projects/:project_id/repository/commits?
- create_commit: commit = POST projects/:project_id/repository/commits?
- commit: commit = GET projects/:project_id/repository/commits/:commit_sha
- commit_refs: refs = GET projects/:project_id/repository/commits/:commit_sha/refs?
- cherry_pick_commit: commit = POST projects/:project_id/repository/commits/:commit_sha/cherry_pick?
- commit_diff: diff = GET projects/:project_id/repository/commits/:commit_sha/diff?
- commit_comments: comments = GET projects/:project_id/repository/commits/:commit_sha/comments?
- create_commit_comment: POST projects/:project_id/repository/commits/:commit_sha/comments?
- commit_statuses: build_statuses = GET projects/:project_id/repository/commits/:commit_sha/statuses?
- create_commit_status: build_status = POST projects/:project_id/statuses/:commit_sha?
container_registry.yml 100644 000766 000024 1344 13621075102 22614 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- registry_repositories_in_project: registry_repositories = GET projects/:project_id/registry/repositories?
- registry_repositories_in_group: registry_repositories = GET groups/:id/registry/repositories?
- delete_registry_repository: DELETE projects/:project_id/registry/repositories/:repository_id
- registry_repository_tags: tags = GET projects/:project_id/registry/repositories/:repository_id/tags
- registry_repository_tag: tag = GET projects/:project_id/registry/repositories/:repository_id/tags/:tag_name
- delete_registry_repository_tag: DELETE projects/:project_id/registry/repositories/:repository_id/tags/:tag_name
- bulk_delete_registry_repository_tags: DELETE projects/:project_id/registry/repositories/:repository_id/tags?
custom_attributes.yml 100644 000766 000024 2102 13621075102 22453 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- custom_user_attributes: attributes = GET users/:user_id/custom_attributes
- custom_group_attributes: attributes = GET groups/:group_id/custom_attributes
- custom_project_attributes: attributes = GET projects/:project_id/custom_attributes
- custom_user_attribute: attribute = GET users/:user_id/custom_attributes/:attribute_key
- custom_group_attribute: attribute = GET groups/:group_id/custom_attributes/:attribute_key
- custom_project_attribute: attribute = GET projects/:project_id/custom_attributes/:attribute_key
- set_custom_user_attribute: attribute = PUT users/:user_id/custom_attributes/:attribute_key?
- set_custom_group_attribute: attribute = PUT groups/:group_id/custom_attributes/:attribute_key?
- set_custom_project_attribute: attribute = PUT projects/:project_id/custom_attributes/:attribute_key?
- delete_custom_user_attribute: DELETE users/:user_id/custom_attributes/:attribute_key
- delete_custom_group_attribute: DELETE groups/:group_id/custom_attributes/:attribute_key
- delete_custom_project_attribute: DELETE projects/:project_id/custom_attributes/:attribute_key
deploy_keys.yml 100644 000766 000024 603 13621075102 21206 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- all_deploy_keys: keys = GET deploy_keys?
- deploy_keys: keys = GET projects/:project_id/deploy_keys?
- deploy_key: key = GET projects/:project_id/deploy_keys/:key_id
- create_deploy_key: key = POST projects/:project_id/deploy_keys?
- delete_deploy_key: DELETE projects/:project_id/deploy_keys/:key_id
- enable_deploy_key: key = POST projects/:project_id/deploy_keys/:key_id/enable
deployments.yml 100644 000766 000024 226 13621075102 21223 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- deployments: deployments = GET projects/:project_id/deployments?
- deployment: deployment = GET projects/:project_id/deployments/:deployment_id
discussions.yml 100644 000766 000024 5540 13621075102 21252 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- issue_discussions: discussions = GET projects/:project_id/issues/:issue_iid/discussions?
- issue_discussion: discussion = GET projects/:project_id/issues/:issue_iid/discussions/:discussion_id
- create_issue_discussion: discussion = POST projects/:project_id/issues/:issue_iid/discussions?
- create_issue_discussion_note: POST projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes?
- edit_issue_discussion_note: PUT projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id?
- delete_issue_discussion_note: DELETE projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id
- project_snippet_discussions: discussions = GET projects/:project_id/snippets/:snippet_id/discussions?
- project_snippet_discussion: discussion = GET projects/:project_id/snippets/:snippet_id/discussions/:discussion_id
- create_project_snippet_discussion: discussion = POST projects/:project_id/snippets/:snippet_id/discussions?
- create_project_snippet_discussion_note: POST projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes?
- edit_project_snippet_discussion_note: PUT projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id?
- delete_project_snippet_discussion_note: DELETE projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id
- merge_request_discussions: discussions = GET projects/:project_id/merge_requests/:merge_request_iid/discussions?
- merge_request_discussion: discussion = GET projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id
- create_merge_request_discussion: discussion = POST projects/:project_id/merge_requests/:merge_request_iid/discussions?
- resolve_merge_request_discussion: PUT projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id?
- create_merge_request_discussion_note: POST projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes?
- edit_merge_request_discussion_note: PUT projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id?
- delete_merge_request_discussion_note: DELETE projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id
- commit_discussions: discussions = GET projects/:project_id/commits/:commit_id/discussions?
- commit_discussion: discussion = GET projects/:project_id/commits/:commit_id/discussions/:discussion_id
- create_commit_discussion: discussion = POST projects/:project_id/commits/:commit_id/discussions?
- create_commit_discussion_note: POST projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes?
- edit_commit_discussion_note: PUT projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes/:note_id?
- delete_commit_discussion_note: DELETE projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes/:note_id
environments.yml 100644 000766 000024 635 13621075102 21413 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- environments: environments = GET projects/:project_id/environments?
- create_environment: environment = POST projects/:project_id/environments?
- edit_environment: environment = PUT projects/:project_id/environments/:environments_id?
- delete_environment: DELETE projects/:project_id/environments/:environment_id
- stop_environment: environment = POST projects/:project_id/environments/:environment_id/stop
events.yml 100644 000766 000024 226 13621075102 20164 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- all_events: events = GET events?
- user_events: events = GET users/:user_id/events?
- project_events: events = GET projects/:project_id/events?
features.yml 100644 000766 000024 126 13621075102 20475 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- features: features = GET features
- set_feature: feature = POST features/:name?
gitignores_templates.yml 100644 000766 000024 213 13621075102 23104 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- gitignores_templates: templates = GET templates/gitignores?
- gitignores_template: template = GET templates/gitignores/:template_key
gitlab_ci_ymls_templates.yml 100644 000766 000024 233 13621075102 23715 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- gitlab_ci_ymls_templates: templates = GET templates/gitlab_ci_ymls?
- gitlab_ci_ymls_template: template = GET templates/gitlab_ci_ymls/:template_key
group_access_requests.yml 100644 000766 000024 464 13621075102 23274 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- group_access_requests: requests = GET groups/:group_id/access_requests?
- request_group_access: request = POST groups/:group_id/access_requests
- approve_group_access: request = PUT groups/:group_id/access_requests/:user_id/approve
- deny_group_access: DELETE groups/:group_id/access_requests/:user_id
group_badges.yml 100644 000766 000024 571 13621075102 21324 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- group_badges: badges = GET groups/:group_id/badges
- group_badge: badge = GET groups/:group_id/badges/:badge_id
- create_group_badge: badge = POST groups/:group_id/badges?
- edit_group_badge: badge = PUT groups/:group_id/badges/:badge_id?
- delete_group_badge: DELETE groups/:group_id/badges/:badge_id
- preview_group_badge: preview = GET groups/:group_id/badges/render?
group_boards.yml 100644 000766 000024 1010 13621075102 21356 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- group_boards: boards = GET groups/:group_id/boards
- group_board: board = GET groups/:group_id/boards/:board_id
- group_board_lists: lists = GET groups/:group_id/boards/:board_id/lists
- group_board_list: list = GET groups/:group_id/boards/:board_id/lists/:list_id
- create_group_board_list: list = POST groups/:group_id/boards/:board_id/lists?
- edit_group_board_list: list = PUT groups/:group_id/boards/:board_id/lists/:list_id?
- delete_group_board_list: DELETE groups/:group_id/boards/:board_id/lists/:list_id
group_level_variables.yml 100644 000766 000024 553 13621075102 23236 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- group_variables: variables = GET groups/:group_id/variables?
- group_variable: variable = GET groups/:group_id/variables/:variable_key
- create_group_variable: variable = POST groups/:group_id/variables?
- edit_group_variable: variable = PUT groups/:group_id/variables/:variable_key?
- delete_group_variable: DELETE groups/:group_id/variables/:variable_key
group_members.yml 100644 000766 000024 602 13621075102 21524 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- group_members: members = GET groups/:group_id/members?
- all_group_members: members = GET groups/:group_id/members/all?
- group_member: member = GET groups/:project_id/members/:user_id
- add_group_member: member = POST groups/:group_id/members?
- update_group_member: member = PUT groups/:group_id/members/:user_id?
- remove_group_member: DELETE groups/:group_id/members/:user_id
group_milestones.yml 100644 000766 000024 770 13621075102 22262 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- group_milestones: milestones = GET groups/:group_id/milestones?
- group_milestone: milestone = GET groups/:group_id/milestones/:milestone_id
- create_group_milestone: milestone = POST groups/:group_id/milestones?
- edit_group_milestone: milestone = PUT groups/:group_id/milestones/:milestone_id?
- group_milestone_issues: issues = GET groups/:group_id/milestones/:milestone_id/issues?
- group_milestone_merge_requests: merge_requests = GET groups/:group_id/milestones/:milestone_id/merge_requests?
groups.yml 100644 000766 000024 1231 13621075102 20214 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- groups: groups = GET groups?
- group_subgroups: subgroups = GET groups/:group_id/subgroups?
- group_projects: projects = GET groups/:group_id/projects?
- group: group = GET groups/:group_id?
- create_group: POST groups?
- transfer_project_to_group: POST groups/:group_id/projects/:project_id
- edit_group: group = PUT groups/:group_id?
- delete_group: DELETE groups/:group_id
- sync_group_with_ldap: POST groups/:group_id/ldap_sync
- create_ldap_group_link: POST groups/:group_id/ldap_group_links?
- delete_ldap_group_link: DELETE groups/:group_id/ldap_group_links/:cn
- delete_ldap_provider_group_link: DELETE groups/:group_id/ldap_group_links/:provider/:cn
issues.yml 100644 000766 000024 2552 13621075102 20217 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- global_issues: issues = GET issues?
- group_issues: issues = GET groups/:group_id/issues?
- issues: issues = GET projects/:project_id/issues?
- issue: issue = GET projects/:project_id/issues/:issue_iid
- create_issue: issue = POST projects/:project_id/issues?
- edit_issue: issue = PUT projects/:project_id/issues/:issue_iid?
- delete_issue: DELETE projects/:project_id/issues/:issue_iid
- move_issue: issue = POST projects/:project_id/issues/:issue_iid/move?
- subscribe_to_issue: issue = POST projects/:project_id/issues/:issue_iid/subscribe
- unsubscribe_from_issue: issue = POST projects/:project_id/issues/:issue_iid/unsubscribe
- create_issue_todo: todo = POST projects/:project_id/issues/:issue_iid/todo
- set_issue_time_estimate: tracking = POST projects/:project_id/issues/:issue_iid/time_estimate?
- reset_issue_time_estimate: tracking = POST projects/:project_id/issues/:issue_iid/reset_time_estimate
- add_issue_spent_time: tracking = POST projects/:project_id/issues/:issue_iid/add_spent_time?
- reset_issue_spent_time: tracking = POST projects/:project_id/issues/:issue_iid/reset_spent_time
- issue_time_stats: tracking = GET projects/:project_id/issues/:issue_iid/time_stats
- issue_closed_by: merge_requests = GET projects/:project_id/issues/:issue_iid/closed_by
- issue_user_agent_detail: user_agent = GET projects/:project_id/issues/:issue_iid/user_agent_detail
jobs.yml 100644 000766 000024 1522 13621075102 17635 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- jobs: jobs = GET projects/:project_id/jobs?
- pipeline_jobs: jobs = GET projects/:project_id/pipelines/:pipeline_id/jobs?
- job: job = GET projects/:project_id/jobs/:job_id
- job_artifacts: artifacts = GET projects/:project_id/jobs/:job_id/artifacts
- job_artifacts_archive: archive = GET projects/:project_id/jobs/artifacts/:ref_name/download?
- job_artifacts_file: file = GET projects/:project_id/jobs/:job_id/artifacts/:artifact_path
- job_trace_file: file = GET projects/:project_id/jobs/:job_id/trace
- cancel_job: job = POST projects/:project_id/jobs/:job_id/cancel
- retry_job: job = POST projects/:project_id/jobs/:job_id/retry
- erase_job: job = POST projects/:project_id/jobs/:job_id/erase
- keep_job_artifacts: job = POST projects/:project_id/jobs/:job_id/artifacts/keep
- play_job: job = POST projects/:project_id/jobs/:job_id/play
keys.yml 100644 000766 000024 42 13621075102 17607 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- key: key = GET keys/:key_id
labels.yml 100644 000766 000024 601 13621075102 20117 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- labels: labels = GET projects/:project_id/labels?
- create_label: label = POST projects/:project_id/labels?
- delete_label: DELETE projects/:project_id/labels?
- edit_label: label = PUT projects/:project_id/labels?
- subscribe_to_label: label = POST projects/:project_id/labels/:label_id/subscribe
- unsubscribe_from_label: POST projects/:project_id/labels/:label_id/unsubscribe
licenses_templates.yml 100644 000766 000024 202 13621075102 22535 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- license_templates: templates = GET templates/licenses?
- license_template: template = GET templates/licenses/:template_key?
lint.yml 100644 000766 000024 40 13621075102 17600 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- lint: result = POST lint?
markdown.yml 100644 000766 000024 46 13621075102 20462 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- markdown: html = POST markdown?
merge_requests.yml 100644 000766 000024 4315 13621075102 21735 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- global_merge_requests: merge_requests = GET merge_requests?
- merge_requests: merge_requests = GET projects/:project_id/merge_requests?
- merge_request: merge_request = GET projects/:project_id/merge_requests/:merge_request_iid
- merge_request_commits: commits = GET projects/:project_id/merge_requests/:merge_request_iid/commits
- merge_request_with_changes: merge_request = GET projects/:project_id/merge_requests/:merge_request_iid/changes
- create_merge_request: merge_request = POST projects/:project_id/merge_requests?
- edit_merge_request: merge_request = PUT projects/:project_id/merge_requests/:merge_request_iid?
- delete_merge_request: DELETE projects/:project_id/merge_requests/:merge_request_iid
- accept_merge_request: merge_request = PUT projects/:project_id/merge_requests/:merge_request_iid/merge?
- cancel_merge_when_pipeline_succeeds: merge_request = PUT projects/:project_id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds
- merge_request_closes_issues: issues = GET projects/:project_id/merge_requests/:merge_request_iid/closes_issues?
- subscribe_to_merge_request: merge_request = POST projects/:project_id/merge_requests/:merge_request_iid/subscribe
- unsubscribe_from_merge_request: merge_request = POST projects/:project_id/merge_requests/:merge_request_iid/unsubscribe
- create_merge_request_todo: todo = POST projects/:project_id/merge_requests/:merge_request_iid/todo
- merge_request_diff_versions: versions = GET projects/:project_id/merge_requests/:merge_request_iid/versions
- merge_request_diff_version: version = GET projects/:project_id/merge_requests/:merge_request_iid/versions/:version_id
- set_merge_request_time_estimate: tracking = POST projects/:project_id/merge_requests/:merge_request_iid/time_estimate?
- reset_merge_request_time_estimate: tracking = POST projects/:project_id/merge_requests/:merge_request_iid/reset_time_estimate
- add_merge_request_spent_time: tracking = POST projects/:project_id/merge_requests/:merge_request_iid/add_spent_time?
- reset_merge_request_spent_time: tracking = POST projects/:project_id/merge_requests/:merge_request_iid/reset_spent_time
- merge_request_time_stats: tracking = GET projects/:project_id/merge_requests/:merge_request_iid/time_stats
milestones.yml 100644 000766 000024 1034 13621075102 21060 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- project_milestones: milestones = GET projects/:project_id/milestones?
- project_milestone: milestone = GET projects/:project_id/milestones/:milestone_id
- create_project_milestone: milestone = POST projects/:project_id/milestones?
- edit_project_milestone: milestone = PUT projects/:project_id/milestones/:milestone_id?
- project_milestone_issues: issues = GET projects/:project_id/milestones/:milestone_id/issues?
- project_milestone_merge_requests: merge_requests = GET projects/:project_id/milestones/:milestone_id/merge_requests?
namespaces.yml 100644 000766 000024 145 13621075102 20777 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- namespaces: namespaces = GET namespaces?
- namespace: namespace = GET namespaces/:namespace_id
notes.yml 100644 000766 000024 2454 13621075102 20035 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- issue_notes: notes = GET projects/:project_id/issues/:issue_iid/notes?
- issue_note: note = GET projects/:project_id/issues/:issue_iid/notes/:note_id
- create_issue_note: note = POST projects/:project_id/issues/:issue_iid/notes?
- edit_issue_note: PUT projects/:project_id/issues/:issue_iid/notes/:note_id?
- delete_issue_note: DELETE projects/:project_id/issues/:issue_iid/notes/:note_id
- snippet_notes: notes = GET projects/:project_id/snippets/:snippet_id/notes?
- snippet_note: note = GET projects/:project_id/snippets/:snippet_id/notes/:note_id
- create_snippet_note: note = POST projects/:project_id/snippets/:snippet_id/notes?
- edit_snippet_note: PUT projects/:project_id/snippets/:snippet_id/notes/:note_id?
- delete_snippet_note: DELETE projects/:project_id/snippets/:snippet_id/notes/:note_id
- merge_request_notes: notes = GET projects/:project_id/merge_requests/:merge_request_iid/notes?
- merge_request_note: note = GET projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id
- create_merge_request_note: note = POST projects/:project_id/merge_requests/:merge_request_iid/notes?
- edit_merge_request_note: PUT projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id?
- delete_merge_request_note: DELETE projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id
notification_settings.yml 100644 000766 000024 775 13621075102 23277 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- global_notification_settings: settings = GET notification_settings
- set_global_notification_settings: settings = PUT notification_settings?
- group_notification_settings: settings = GET groups/:group_id/notification_settings
- project_notification_settings: settings = GET projects/:project_id/notification_settings
- set_group_notification_settings: settings = PUT groups/:group_id/notification_settings?
- set_project_notification_settings: settings = PUT projects/:project_id/notification_settings?
page_domains.yml 100644 000766 000024 644 13621075102 21312 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- global_pages_domains: domains = GET pages/domains?
- pages_domains: domains = GET projects/:project_id/pages/domains?
- pages_domain: domain = GET projects/:project_id/pages/domains/:domain
- create_pages_domain: domain = POST projects/:project_id/pages/domains?
- edit_pages_domain: domain = PUT projects/:project_id/pages/domains/:domain?
- delete_pages_domain: DELETE projects/:project_id/pages/domains/:domain
pipeline_schedules.yml 100644 000766 000024 1766 13621075102 22556 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- pipeline_schedules: schedules = GET projects/:project_id/pipeline_schedules?
- pipeline_schedule: schedule = GET projects/:project_id/pipeline_schedules/:pipeline_schedule_id
- create_pipeline_schedule: schedule = POST projects/:project_id/pipeline_schedules?
- edit_pipeline_schedule: schedule = PUT projects/:project_id/pipeline_schedules/:pipeline_schedule_id?
- take_ownership_of_pipeline_schedule: schedule = POST projects/:project_id/pipeline_schedules/:pipeline_schedule_id/take_ownership
- delete_pipeline_schedule: schedule = DELETE projects/:project_id/pipeline_schedules/:pipeline_schedule_id
- create_pipeline_schedule_variable: variable = POST projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables?
- edit_pipeline_schedule_variable: variable = PUT projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables/:variable_key?
- delete_pipeline_schedule_variable: variable = DELETE projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables/:variable_key
pipeline_triggers.yml 100644 000766 000024 2511 13621075102 22412 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- triggers: triggers = GET projects/:project_id/triggers?
- trigger: trigger = GET projects/:project_id/triggers/:trigger_id
- create_trigger: trigger = POST projects/:project_id/triggers?
- edit_trigger: trigger = PUT projects/:project_id/triggers/:trigger_id?
- take_ownership_of_trigger: trigger = POST projects/:project_id/triggers/:trigger_id/take_ownership
- delete_trigger: DELETE projects/:project_id/triggers/:trigger_id
- method: trigger_pipeline
spec: pipeline = POST projects/:project_id/trigger/pipeline?
note: |
The API authentication token (L or L
parameters in a constructor) is not needed when using this method, however
You must pass trigger token (generated at the trigger creation) as C
field and git ref name as C[ field in the C<%params> hash. You can also
pass variables to be set in a pipeline in the C field. Example:
my $pipeline = $api->trigger_pipeline(
$project_id,
{
token => 'd69dba9162ab6ac72fa0993496286ada',
'ref' => 'master',
variables => {
variable1 => 'value1',
variable2 => 'value2',
},
},
);
Read more at L.
pipelines.yml 100644 000766 000024 1777 13621075102 20704 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- pipelines: pipelines = GET projects/:project_id/pipelines?
- pipeline: pipeline = GET projects/:project_id/pipelines/:pipeline_id
- method: create_pipeline
spec: pipeline = POST projects/:project_id/pipeline?
note: |
Git ref (branch or tag) name must be specified in the C][ field of the
C<%params> hash. It's also possible to pass variables to a pipeline in
the C field like in the following example:
my $pipeline = $api->create_pipeline(
$project_id,
{
'ref' => 'master',
variables => [
{ 'key' => 'VARIABLE1', 'value' => 'VALUE1' },
{ 'key' => 'VARIABLE2', 'value' => 'VALUE2' },
],
},
);
- retry_pipeline_jobs: pipeline = POST projects/:project_id/pipelines/:pipeline_id/retry
- cancel_pipeline_jobs: pipeline = POST projects/:project_id/pipelines/:pipeline_id/cancel
- delete_pipeline: DELETE projects/:project_id/pipelines/:pipeline_id
project_access_requests.yml 100644 000766 000024 514 13621075102 23602 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- project_access_requests: requests = GET projects/:project_id/access_requests?
- request_project_access: request = POST projects/:project_id/access_requests
- approve_project_access: request = PUT projects/:project_id/access_requests/:user_id/approve
- deny_project_access: DELETE projects/:project_id/access_requests/:user_id
project_badges.yml 100644 000766 000024 635 13621075102 21637 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- project_badges: badges = GET projects/:project_id/badges
- project_badge: badge = GET projects/:project_id/badges/:badge_id
- create_project_badge: badge = POST projects/:project_id/badges?
- edit_project_badge: badge = PUT projects/:project_id/badges/:badge_id?
- delete_project_badge: DELETE projects/:project_id/badges/:badge_id
- preview_project_badge: preview = GET projects/:project_id/badges/render?
project_import_export.yml 100644 000766 000024 505 13621075102 23321 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- schedule_project_export: POST projects/:project_id/export?
- project_export_status: status = GET projects/:project_id/export
- download_project_export: download = GET projects/:project_id/export/download
- schedule_project_import: POST projects/import?
- project_import_status: status = GET projects/:project_id/import
project_level_variables.yml 100644 000766 000024 611 13621075102 23543 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- project_variables: variables = GET projects/:project_id/variables?
- project_variable: variable = GET projects/:project_id/variables/:variable_key
- create_project_variable: variable = POST projects/:project_id/variables?
- edit_project_variable: variable = PUT projects/:project_id/variables/:variable_key?
- delete_project_variable: DELETE projects/:project_id/variables/:variable_key
project_members.yml 100644 000766 000024 644 13621075102 22044 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- project_members: members = GET projects/:project_id/members?
- all_project_members: members = GET projects/:project_id/members/all?
- project_member: member = GET projects/:project_id/members/:user_id
- add_project_member: member = POST projects/:project_id/members?
- update_project_member: member = PUT projects/:project_id/members/:user_id?
- remove_project_member: DELETE projects/:project_id/members/:user_id
project_snippets.yml 100644 000766 000024 1052 13621075102 22271 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- project_snippets: snippets = GET projects/:project_id/snippets?
- project_snippet: snippet = GET projects/:project_id/snippets/:snippet_id
- create_project_snippet: POST projects/:project_id/snippets?
- edit_project_snippet: PUT projects/:project_id/snippets/:snippet_id?
- delete_project_snippet: DELETE projects/:project_id/snippets/:snippet_id
- project_snippet_content: content = GET projects/:project_id/snippets/:snippet_id/raw
- project_snippet_user_agent_detail: user_agent = GET projects/:project_id/snippets/:snippet_id/user_agent_detail
projects.yml 100644 000766 000024 3421 13621075102 20531 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- projects: projects = GET projects?
- user_projects: projects = GET users/:user_id/projects?
- project: project = GET projects/:project_id?
- project_users: users = GET projects/:project_id/users?
- create_project: project = POST projects?
- create_project_for_user: POST projects/user/:user_id?
- edit_project: PUT projects/:project_id?
- fork_project: POST projects/:project_id/fork?
- project_forks: forks = GET projects/:project_id/forks?
- start_project: project = POST projects/:project_id/star
- unstar_project: project = POST projects/:project_id/unstar
- project_languages: languages = GET projects/:project_id/languages
- archive_project: project = POST projects/:project_id/archive
- unarchive_project: project = POST projects/:project_id/unarchive
- delete_project: DELETE projects/:project_id
- method: upload_file_to_project
spec: upload = POST projects/:project_id/uploads?
note: The C parameter must point to a readable file on the local filesystem.
- share_project_with_group: POST projects/:project_id/share?
- unshare_project_with_group: DELETE projects/:project_id/share/:group_id
- project_hooks: hooks = GET projects/:project_id/hooks
- project_hook: hook = GET projects/:project_id/hooks/:hook_id
- create_project_hook: hook = POST projects/:project_id/hooks?
- edit_project_hook: hook = PUT projects/:project_id/hooks/:hook_id?
- delete_project_hook: DELETE projects/:project_id/hooks/:hook_id
- set_project_fork: POST projects/:project_id/fork/:from_project_id
- clear_project_fork: DELETE projects/:project_id/fork
- start_housekeeping: POST projects/:project_id/housekeeping
- transfer_project_to_namespace: PUT projects/:project_id/transfer?
# TODO: Support undecoded responses, maybe more.
#- download_project_snapshot: snapshot = GET projects/:project_id/snapshot
protected_branches.yml 100644 000766 000024 501 13621075102 22512 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- protected_branches: branches = GET projects/:project_id/protected_branches?
- protected_branch: branch = GET projects/:project_id/protected_branches/:branch_name
- protect_branch: branch = POST projects/:project_id/protected_branches?
- unprotect_branch: DELETE projects/:project_id/protected_branches/:branch_name
protected_tags.yml 100644 000766 000024 424 13621075102 21667 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- protected_tags: tags = GET projects/:project_id/protected_tags?
- protected_tag: tag = GET projects/:project_id/protected_tags/:tag_name
- protect_tag: tag = POST projects/:project_id/protected_tags?
- unprotect_tag: DELETE projects/:project_id/protected_tags/:tag_name
release_links.yml 100644 000766 000024 715 13621075102 21503 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- release_links: links = GET projects/:project_id/releases/:tag_name/assets/links?
- release_link: link = GET projects/:project_id/releases/:tag_name/assets/links/:link_id
- create_release_link: link = POST projects/:project_id/releases/:tag_name/assets/links?
- update_release_link: link = PUT projects/:project_id/releases/:tag_name/assets/links/:link_id?
- delete_release_link: link = DELETE projects/:project_id/releases/:tag_name/assets/links/:link_id
releases.yml 100644 000766 000024 523 13621075102 20463 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- releases: releases = GET projects/:project_id/releases?
- release: release = GET projects/:project_id/releases/:tag_name
- create_release: release = POST projects/:project_id/releases?
- update_release: release = PUT projects/:project_id/releases/:tag_name?
- delete_release: release = DELETE projects/:project_id/releases/:tag_name
repositories.yml 100644 000766 000024 676 13621075102 21420 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- tree: tree = GET projects/:project_id/repository/tree?
- blob: blob = GET projects/:project_id/repository/blobs/:sha
- raw_blob: raw_blob = GET projects/:project_id/repository/blobs/:sha/raw
- method: archive
spec: archive = GET projects/:project_id/repository/archive?
no_decode: true
- compare: comparison = GET projects/:project_id/repository/compare?
- contributors: contributors = GET projects/:project_id/repository/contributors?
repository_files.yml 100644 000766 000024 613 13621075102 22261 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- file: file = GET projects/:project_id/repository/files/:file_path?
- method: raw_file
spec: content = GET projects/:project_id/repository/files/:file_path/raw?
no_decode: true
- create_file: POST projects/:project_id/repository/files/:file_path?
- edit_file: PUT projects/:project_id/repository/files/:file_path?
- delete_file: DELETE projects/:project_id/repository/files/:file_path?
resource_label_events.yml 100644 000766 000024 1007 13621075102 23250 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- issue_resource_label_events: events = GET projects/:project_id/issues/:issue_iid/resource_label_events
- issue_resource_label_event: event = GET projects/:project_id/issues/:issue_iid/resource_label_events/:resource_label_event_id
- merge_request_resource_label_events: events = GET projects/:project_id/merge_requests/:merge_request_iid/resource_label_events
- merge_request_resource_label_event: event = GET projects/:project_id/merge_requests/:merge_request_iid/resource_label_events/:resource_label_event_id
runners.yml 100644 000766 000024 740 13621075102 20355 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- runners: runners = GET runners?
- all_runners: runners = GET runners/all?
- runner: runner = GET runners/:runner_id
- update_runner: runner = PUT runners/:runner_id?
- delete_runner: DELETE runners/:runner_id
- runner_jobs: jobs = GET runners/:runner_id/jobs?
- project_runners: runners = GET projects/:project_id/runners?
- enable_project_runner: runner = POST projects/:project_id/runners?
- disable_project_runner: runner = DELETE projects/:project_id/runners/:runner_id
search.yml 100644 000766 000024 44 13621075102 20103 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- search: results = GET search?
services.yml 100644 000766 000024 347 13621075102 20507 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- project_service: service = GET projects/:project_id/services/:service_name
- edit_project_service: PUT projects/:project_id/services/:service_name?
- delete_project_service: DELETE projects/:project_id/services/:service_name
settings.yml 100644 000766 000024 154 13621075102 20520 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- settings: settings = GET application/settings
- update_settings: settings = PUT application/settings?
sidekiq_metrics.yml 100644 000766 000024 330 13621075102 22033 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- queue_metrics: metrics = GET sidekiq/queue_metrics
- process_metrics: metrics = GET sidekiq/process_metrics
- job_stats: stats = GET sidekiq/job_stats
- compound_metrics: metrics = GET sidekiq/compound_metrics
snippets.yml 100644 000766 000024 553 13621075102 20530 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- snippets: snippets = GET snippets
- snippet: snippet = GET snippets/:snippet_id
- create_snippet: snippet = POST snippets?
- edit_snippet: snippet = PUT snippets/:snippet_id?
- delete_snippet: DELETE snippets/:snippet_id
- public_snippets: snippets = GET snippets/public?
- snippet_user_agent_detail: user_agent = GET snippets/:snippet_id/user_agent_detail
statistics.yml 100644 000766 000024 72 13621075102 21031 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- statistics: statistics = GET application/statistics
system_hooks.yml 100644 000766 000024 207 13621075102 21406 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- hooks: hooks = GET hooks?
- create_hook: POST hooks?
- test_hook: hook = GET hooks/:hook_id
- delete_hook: DELETE hooks/:hook_id
tags.yml 100644 000766 000024 671 13621075102 17622 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- tags: tags = GET projects/:project_id/repository/tags?
- tag: tag = GET projects/:project_id/repository/tags/:tag_name
- create_tag: tag = POST projects/:project_id/repository/tags?
- delete_tag: DELETE projects/:project_id/repository/tags/:tag_name
- create_tag_release: release = POST projects/:project_id/repository/tags/:tag_name/release?
- update_tag_release: release = PUT projects/:project_id/repository/tags/:tag_name/release?
todos.yml 100644 000766 000024 211 13621075102 20002 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- todos: todos = GET todos?
- mark_todo_done: todo = POST todos/:todo_id/mark_as_done
- mark_all_todos_done: POST todos/mark_as_done
users.yml 100644 000766 000024 3566 13621075102 20053 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- users: users = GET users?
- user: user = GET users/:user_id
- create_user: POST users?
- edit_user: PUT users/:user_id?
- delete_user: DELETE users/:user_id?
- current_user: user = GET user
- current_user_ssh_keys: keys = GET user/keys?
- user_ssh_keys: keys = GET users/:user_id/keys?
- user_ssh_key: key = GET user/keys/:key_id
- create_current_user_ssh_key: POST user/keys?
- create_user_ssh_key: POST users/:user_id/keys?
- delete_current_user_ssh_key: DELETE user/keys/:key_id
- delete_user_ssh_key: DELETE users/:user_id/keys/:key_id
- current_user_gpg_keys: keys = GET user/gpg_keys?
- current_user_gpg_key: key = GET user/gpg_keys/:key_id
- create_current_user_gpg_key: POST user/gpg_keys?
- delete_current_user_gpg_key: DELETE user/gpg_keys/:key_id
- user_gpg_keys: keys = GET users/:user_id/gpg_keys?
- user_gpg_key: key = GET users/:user_id/gpg_keys/:key_id
- create_user_gpg_key: keys = POST users/:user_id/gpg_keys?
- delete_user_gpg_key: DELETE users/:user_id/gpg_keys/:key_id
- current_user_emails: emails = GET user/emails?
- user_emails: emails = GET users/:user_id/emails?
- current_user_email: email = GET user/emails/:email_id
- create_current_user_email: email = POST user/emails?
- create_user_email: email = POST users/:user_id/emails?
- delete_current_user_email: DELETE user/emails/:email_id
- delete_user_email: DELETE users/:user_id/emails/:email_id
- block_user: success = POST users/:user_id/block
- unblock_user: success = POST users/:user_id/unblock
- user_impersonation_tokens: tokens = GET users/:user_id/impersonation_tokens?
- user_impersonation_token: token = GET users/:user_id/impersonation_tokens/:impersonation_token_id
- create_user_impersonation_token: token = POST users/:user_id/impersonation_tokens?
- delete_user_impersonation_token: DELETE users/:user_id/impersonation_tokens/:impersonation_token_id
- all_user_activities: activities = GET user/activities?
version.yml 100644 000766 000024 45 13621075102 20324 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- version: version = GET version
wikis.yml 100644 000766 000024 453 13621075102 20010 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author/sections ---
- wiki_pages: pages = GET projects/:project_id/wikis?
- wiki_page: pages = GET projects/:project_id/wikis/:slug
- create_wiki_page: page = POST projects/:project_id/wikis?
- edit_wiki_page: page = PUT projects/:project_id/wikis/:slug?
- delete_wiki_page: DELETE projects/:project_id/wikis/:slug
setup-test-container 100755 000766 000024 1232 13621075102 20347 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/author #!/bin/sh
docker stop test-gitlab-api-v4
sleep 5
docker run -d --rm \
-p 80:80 \
--name test-gitlab-api-v4 \
gitlab/gitlab-ce:11.10.4-ce.0
echo 1. Open you browser to: http://localhost \(it may take several minutes for it to respond\)
echo 2. And set a password for the root user.
echo 3. Then login and goto: http://localhost/profile/personal_access_tokens
echo 4. Create a new private token \(use this token below\).
echo 5. Then set the following env vars:
echo export GITLAB_API_V4_URL=http://localhost/api/v4
echo export GITLAB_API_V4_PRIVATE_TOKEN=
echo export GITLAB_API_V4_ROOT_PASSWORD=
echo 6. You should now be able to run: t/regression.t
cpanfile 100644 000766 000024 2134 13621075102 14530 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25 requires 'perl' => '5.010001';
# Common modules.
requires 'Moo' => '2.003000';
requires 'strictures' => '2.000003';
requires 'namespace::clean' => '0.27';
requires 'Types::Standard' => '1.002001';
requires 'Types::Common::String' => '1.002001';
requires 'Types::Common::Numeric' => '1.002001';
requires 'Log::Any' => '1.703';
requires 'Carp' => 0;
requires 'JSON' => '2.59';
# Used by GitLab::API::v4::RESTClient.
requires 'HTTP::Tiny' => '0.059';
requires 'HTTP::Tiny::Multipart' => '0.05';
requires 'URI' => '1.62';
requires 'URI::Escape' => '1.72';
# Used by GitLab::API::v4::Constants.
requires 'Const::Fast' => '0.014';
requires 'Exporter' => 0;
# Used by gitlab-api-v4 and/or GitLab::API::v4::Config.
requires 'Try::Tiny' => '0.28';
requires 'Getopt::Long' => 0;
requires 'Pod::Usage' => 0;
requires 'Log::Any::Adapter' => '1.703';
requires 'Log::Any::Adapter::Screen' => '0.13';
requires 'Path::Tiny' => '0.079';
requires 'IO::Prompter' => '0.004014';
on test => sub {
requires 'Test2::V0' => '0.000094';
requires 'Log::Any::Adapter::TAP' => '0.003003';
requires 'MIME::Base64' => '3.15';
};
v4.pm 100644 000766 000024 1350507 13621075102 16327 0 ustar 00aran staff 000000 000000 GitLab-API-v4-0.25/lib/GitLab/API package GitLab::API::v4;
our $VERSION = '0.25';
=encoding utf8
=head1 NAME
GitLab::API::v4 - A complete GitLab API v4 client.
=head1 SYNOPSIS
use GitLab::API::v4;
my $api = GitLab::API::v4->new(
url => $v4_api_url,
private_token => $token,
);
my $branches = $api->branches( $project_id );
=head1 DESCRIPTION
This module provides a one-to-one interface with the GitLab
API v4. Much is not documented here as it would just be duplicating
GitLab's own L.
Note that this distribution also includes the L command-line
interface (CLI).
=head2 Upgrading
If you are upgrading from L make sure you read:
L
Also, review the C file included in the distribution as it outlines
the changes made to convert the v3 module to v4:
L
Finally, be aware that many methods were added, removed, renamed, and/or altered.
If you want to review exactly what was changed you can use GitHub's compare tool:
L
Or clone the repo and run this command:
C
=head2 Credentials
Authentication credentials may be defined by setting either the L
or L arguments.
If no credentials are supplied then the client will be anonymous and greatly
limited in what it can do with the API.
Extra care has been taken to hide the token arguments behind closures. This way,
if you dump your api object, your tokens won't accidentally leak into places you
don't want them to.
=head2 Constants
The GitLab API, in rare cases, uses a hard-coded value to represent a state.
To make life easier the L module exposes
these states as named variables.
=head2 Exceptions
The API methods will all throw a useful exception if
an unsuccessful response is received from the API. That is except for
C requests that return a C<404> response - these will return C
for methods that return a value.
If you'd like to catch and handle these exceptions consider using
L.
=head2 Logging
This module uses L and produces some debug messages here
and there, but the most useful bits are the info messages produced
just before each API call.
=head2 Project ID
Note that many API calls require a C<$project_id>. This can be
specified as a numeric project C or, in many cases, maybe all cases,
as a C string. The GitLab documentation on
this point is vague.
=cut
use Carp qw( croak );
use GitLab::API::v4::Paginator;
use GitLab::API::v4::RESTClient;
use Log::Any qw( $log );
use Types::Common::Numeric -types;
use Types::Common::String -types;
use Types::Standard -types;
use Moo;
use strictures 2;
use namespace::clean;
sub BUILD {
my ($self) = @_;
# Ensure any token arguments get moved into their closure before we return
# the built object.
$self->access_token();
$self->private_token();
$log->debugf( "An instance of %s has been created.", ref($self) );
return;
}
sub _call_rest_client {
my ($self, $verb, $path, $path_vars, $options) = @_;
$options->{headers} = $self->_auth_headers();
return $self->rest_client->request(
$verb, $path, $path_vars, $options,
);
}
sub _auth_headers {
my ($self) = @_;
my $headers = {};
$headers->{'authorization'} = 'Bearer ' . $self->access_token()
if defined $self->access_token();
$headers->{'private-token'} = $self->private_token()
if defined $self->private_token();
$headers->{'sudo'} = $self->sudo_user()
if defined $self->sudo_user();
return $headers;
}
sub _clone_args {
my ($self) = @_;
return {
url => $self->url(),
retries => $self->retries(),
rest_client => $self->rest_client(),
(defined $self->access_token()) ? (access_token=>$self->access_token()) : (),
(defined $self->private_token()) ? (private_token=>$self->private_token()) : (),
};
}
sub _clone {
my $self = shift;
my $class = ref $self;
my $args = {
%{ $self->_clone_args() },
%{ $class->BUILDARGS( @_ ) },
};
return $class->new( $args );
}
# Little utility method that avoids any ambiguity in whether a closer is
# causing circular references. Don't ever pass it a ref.
sub _make_safe_closure {
my ($ret) = @_;
return sub{ $ret };
}
=head1 REQUIRED ARGUMENTS
=head2 url
The URL to your v4 API endpoint. Typically this will be something
like C.
=cut
has url => (
is => 'ro',
isa => NonEmptySimpleStr,
required => 1,
);
=head1 OPTIONAL ARGUMENTS
=head2 access_token
A GitLab API OAuth2 token. If set then L may not be set.
See L.
=cut
has _access_token_arg => (
is => 'ro',
isa => NonEmptySimpleStr,
init_arg => 'access_token',
clearer => '_clear_access_token_arg',
);
has _access_token_closure => (
is => 'lazy',
isa => CodeRef,
init_arg => undef,
builder => '_build_access_token_closure',
);
sub _build_access_token_closure {
my ($self) = @_;
my $token = $self->_access_token_arg();
$self->_clear_access_token_arg();
return _make_safe_closure( $token );
}
sub access_token {
my ($self) = @_;
return $self->_access_token_closure->();
}
=head2 private_token
A GitLab API personal token. If set then L may not be set.
See L.
=cut
has _private_token_arg => (
is => 'ro',
isa => NonEmptySimpleStr,
init_arg => 'private_token',
clearer => '_clear_private_token_arg',
);
has _private_token_closure => (
is => 'lazy',
isa => CodeRef,
init_arg => undef,
builder => '_build_private_token_closure',
);
sub _build_private_token_closure {
my ($self) = @_;
my $token = $self->_private_token_arg();
$self->_clear_private_token_arg();
return _make_safe_closure( $token );
}
sub private_token {
my ($self) = @_;
return $self->_private_token_closure->();
}
=head2 retries
The number of times the request should be retried in case it fails (5XX HTTP
response code). Defaults to C<0> (false), meaning that a failed request will
not be retried.
=cut
has retries => (
is => 'ro',
isa => PositiveOrZeroInt,
default => 0,
);
=head2 sudo_user
The user to execute API calls as. You may find it more useful to use the
L method instead.
See L.
=cut
has sudo_user => (
is => 'ro',
isa => NonEmptySimpleStr,
);
=head2 rest_client
An instance of L (or whatever L
is set to). Typically you will not be setting this as it defaults to a new
instance and customization should not be necessary.
=cut
has rest_client => (
is => 'lazy',
isa => InstanceOf[ 'GitLab::API::v4::RESTClient' ],
);
sub _build_rest_client {
my ($self) = @_;
return $self->rest_client_class->new(
base_url => $self->url(),
retries => $self->retries(),
);
}
=head2 rest_client_class
The class to use when constructing the L.
Defaults to L.
=cut
has rest_client_class => (
is => 'lazy',
isa => NonEmptySimpleStr,
);
sub _build_rest_client_class {
return 'GitLab::API::v4::RESTClient';
}
=head1 UTILITY METHODS
=head2 paginator
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 C and C parameters,
and returns an array ref, this will return a L
object that will allow you to walk the records one page or one record
at a time.
=cut
sub paginator {
my ($self, $method, @args) = @_;
my $params = (ref($args[-1]) eq 'HASH') ? pop(@args) : {};
return GitLab::API::v4::Paginator->new(
api => $self,
method => $method,
args => \@args,
params => $params,
);
}
=head2 sudo
$api->sudo('fred')->create_issue(...);
Returns a new instance of L with the L argument
set.
See L.
=cut
sub sudo {
my ($self, $user) = @_;
return $self->_clone(
sudo_user => $user,
);
}
=head1 API METHODS
=head2 Award Emoji
See L.
=over
=item issue_award_emojis
my $award_emojis = $api->issue_award_emojis(
$project_id,
$issue_iid,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub issue_award_emojis {
my $self = shift;
croak 'issue_award_emojis must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to issue_award_emojis must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($issue_iid) to issue_award_emojis must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to issue_award_emojis must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid/award_emoji', [@_], $options );
}
=item merge_request_award_emojis
my $award_emojis = $api->merge_request_award_emojis(
$project_id,
$merge_request_iid,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub merge_request_award_emojis {
my $self = shift;
croak 'merge_request_award_emojis must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to merge_request_award_emojis must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($merge_request_iid) to merge_request_award_emojis must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to merge_request_award_emojis must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_iid/award_emoji', [@_], $options );
}
=item snippet_award_emojis
my $award_emojis = $api->snippet_award_emojis(
$project_id,
$merge_request_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub snippet_award_emojis {
my $self = shift;
croak 'snippet_award_emojis must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to snippet_award_emojis must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($merge_request_id) to snippet_award_emojis must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to snippet_award_emojis must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_id/award_emoji', [@_], $options );
}
=item issue_award_emoji
my $award_emoji = $api->issue_award_emoji(
$project_id,
$issue_iid,
$award_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub issue_award_emoji {
my $self = shift;
croak 'issue_award_emoji must be called with 3 arguments' if @_ != 3;
croak 'The #1 argument ($project_id) to issue_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($issue_iid) to issue_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($award_id) to issue_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid/award_emoji/:award_id', [@_], $options );
}
=item merge_request_award_emoji
my $award_emoji = $api->merge_request_award_emoji(
$project_id,
$merge_request_iid,
$award_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub merge_request_award_emoji {
my $self = shift;
croak 'merge_request_award_emoji must be called with 3 arguments' if @_ != 3;
croak 'The #1 argument ($project_id) to merge_request_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($merge_request_iid) to merge_request_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($award_id) to merge_request_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_iid/award_emoji/:award_id', [@_], $options );
}
=item snippet_award_emoji
my $award_emoji = $api->snippet_award_emoji(
$project_id,
$snippet_id,
$award_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub snippet_award_emoji {
my $self = shift;
croak 'snippet_award_emoji must be called with 3 arguments' if @_ != 3;
croak 'The #1 argument ($project_id) to snippet_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($snippet_id) to snippet_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($award_id) to snippet_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/snippets/:snippet_id/award_emoji/:award_id', [@_], $options );
}
=item create_issue_award_emoji
my $award_emoji = $api->create_issue_award_emoji(
$project_id,
$issue_iid,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_issue_award_emoji {
my $self = shift;
croak 'create_issue_award_emoji must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to create_issue_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($issue_iid) to create_issue_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to create_issue_award_emoji must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'projects/:project_id/issues/:issue_iid/award_emoji', [@_], $options );
}
=item create_merge_request_award_emoji
my $award_emoji = $api->create_merge_request_award_emoji(
$project_id,
$merge_request_iid,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_merge_request_award_emoji {
my $self = shift;
croak 'create_merge_request_award_emoji must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to create_merge_request_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($merge_request_iid) to create_merge_request_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to create_merge_request_award_emoji must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'projects/:project_id/merge_requests/:merge_request_iid/award_emoji', [@_], $options );
}
=item create_snippet_award_emoji
my $award_emoji = $api->create_snippet_award_emoji(
$project_id,
$snippet_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_snippet_award_emoji {
my $self = shift;
croak 'create_snippet_award_emoji must be called with 2 arguments' if @_ != 2;
croak 'The #1 argument ($project_id) to create_snippet_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($snippet_id) to create_snippet_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
my $options = {};
return $self->_call_rest_client( 'POST', 'projects/:project_id/snippets/:snippet_id/award_emoji', [@_], $options );
}
=item delete_issue_award_emoji
my $award_emoji = $api->delete_issue_award_emoji(
$project_id,
$issue_id,
$award_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub delete_issue_award_emoji {
my $self = shift;
croak 'delete_issue_award_emoji must be called with 3 arguments' if @_ != 3;
croak 'The #1 argument ($project_id) to delete_issue_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($issue_id) to delete_issue_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($award_id) to delete_issue_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
my $options = {};
return $self->_call_rest_client( 'DELETE', 'projects/:project_id/issues/:issue_id/award_emoji/:award_id', [@_], $options );
}
=item delete_merge_request_award_emoji
my $award_emoji = $api->delete_merge_request_award_emoji(
$project_id,
$merge_request_id,
$award_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub delete_merge_request_award_emoji {
my $self = shift;
croak 'delete_merge_request_award_emoji must be called with 3 arguments' if @_ != 3;
croak 'The #1 argument ($project_id) to delete_merge_request_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($merge_request_id) to delete_merge_request_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($award_id) to delete_merge_request_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
my $options = {};
return $self->_call_rest_client( 'DELETE', 'projects/:project_id/merge_requests/:merge_request_id/award_emoji/:award_id', [@_], $options );
}
=item delete_snippet_award_emoji
my $award_emoji = $api->delete_snippet_award_emoji(
$project_id,
$snippet_id,
$award_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub delete_snippet_award_emoji {
my $self = shift;
croak 'delete_snippet_award_emoji must be called with 3 arguments' if @_ != 3;
croak 'The #1 argument ($project_id) to delete_snippet_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($snippet_id) to delete_snippet_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($award_id) to delete_snippet_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
my $options = {};
return $self->_call_rest_client( 'DELETE', 'projects/:project_id/snippets/:snippet_id/award_emoji/:award_id', [@_], $options );
}
=item issue_note_award_emojis
my $award_emojis = $api->issue_note_award_emojis(
$project_id,
$issue_iid,
$note_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub issue_note_award_emojis {
my $self = shift;
croak 'issue_note_award_emojis must be called with 3 arguments' if @_ != 3;
croak 'The #1 argument ($project_id) to issue_note_award_emojis must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($issue_iid) to issue_note_award_emojis must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($note_id) to issue_note_award_emojis must be a scalar' if ref($_[2]) or (!defined $_[2]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji', [@_], $options );
}
=item issue_note_award_emoji
my $award_emoji = $api->issue_note_award_emoji(
$project_id,
$issue_iid,
$note_id,
$award_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub issue_note_award_emoji {
my $self = shift;
croak 'issue_note_award_emoji must be called with 4 arguments' if @_ != 4;
croak 'The #1 argument ($project_id) to issue_note_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($issue_iid) to issue_note_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($note_id) to issue_note_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
croak 'The #4 argument ($award_id) to issue_note_award_emoji must be a scalar' if ref($_[3]) or (!defined $_[3]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id', [@_], $options );
}
=item create_issue_note_award_emoji
my $award_emoji = $api->create_issue_note_award_emoji(
$project_id,
$issue_iid,
$note_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_issue_note_award_emoji {
my $self = shift;
croak 'create_issue_note_award_emoji must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4;
croak 'The #1 argument ($project_id) to create_issue_note_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($issue_iid) to create_issue_note_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($note_id) to create_issue_note_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
croak 'The last argument (\%params) to create_issue_note_award_emoji must be a hash ref' if defined($_[3]) and ref($_[3]) ne 'HASH';
my $params = (@_ == 4) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji', [@_], $options );
}
=item delete_issue_note_award_emoji
my $award_emoji = $api->delete_issue_note_award_emoji(
$project_id,
$issue_iid,
$note_id,
$award_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub delete_issue_note_award_emoji {
my $self = shift;
croak 'delete_issue_note_award_emoji must be called with 4 arguments' if @_ != 4;
croak 'The #1 argument ($project_id) to delete_issue_note_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($issue_iid) to delete_issue_note_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($note_id) to delete_issue_note_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
croak 'The #4 argument ($award_id) to delete_issue_note_award_emoji must be a scalar' if ref($_[3]) or (!defined $_[3]);
my $options = {};
return $self->_call_rest_client( 'DELETE', 'projects/:project_id/issues/:issue_iid/notes/:note_id/award_emoji/:award_id', [@_], $options );
}
=item merge_request_note_award_emojis
my $award_emojis = $api->merge_request_note_award_emojis(
$project_id,
$merge_request_iid,
$note_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub merge_request_note_award_emojis {
my $self = shift;
croak 'merge_request_note_award_emojis must be called with 3 arguments' if @_ != 3;
croak 'The #1 argument ($project_id) to merge_request_note_award_emojis must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($merge_request_iid) to merge_request_note_award_emojis must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($note_id) to merge_request_note_award_emojis must be a scalar' if ref($_[2]) or (!defined $_[2]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji', [@_], $options );
}
=item merge_request_note_award_emoji
my $award_emoji = $api->merge_request_note_award_emoji(
$project_id,
$merge_request_iid,
$note_id,
$award_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub merge_request_note_award_emoji {
my $self = shift;
croak 'merge_request_note_award_emoji must be called with 4 arguments' if @_ != 4;
croak 'The #1 argument ($project_id) to merge_request_note_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($merge_request_iid) to merge_request_note_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($note_id) to merge_request_note_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
croak 'The #4 argument ($award_id) to merge_request_note_award_emoji must be a scalar' if ref($_[3]) or (!defined $_[3]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji/:award_id', [@_], $options );
}
=item create_merge_request_note_award_emoji
my $award_emoji = $api->create_merge_request_note_award_emoji(
$project_id,
$merge_request_iid,
$note_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_merge_request_note_award_emoji {
my $self = shift;
croak 'create_merge_request_note_award_emoji must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4;
croak 'The #1 argument ($project_id) to create_merge_request_note_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($merge_request_iid) to create_merge_request_note_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($note_id) to create_merge_request_note_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
croak 'The last argument (\%params) to create_merge_request_note_award_emoji must be a hash ref' if defined($_[3]) and ref($_[3]) ne 'HASH';
my $params = (@_ == 4) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji', [@_], $options );
}
=item delete_merge_request_note_award_emoji
my $award_emoji = $api->delete_merge_request_note_award_emoji(
$project_id,
$merge_request_iid,
$note_id,
$award_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub delete_merge_request_note_award_emoji {
my $self = shift;
croak 'delete_merge_request_note_award_emoji must be called with 4 arguments' if @_ != 4;
croak 'The #1 argument ($project_id) to delete_merge_request_note_award_emoji must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($merge_request_iid) to delete_merge_request_note_award_emoji must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($note_id) to delete_merge_request_note_award_emoji must be a scalar' if ref($_[2]) or (!defined $_[2]);
croak 'The #4 argument ($award_id) to delete_merge_request_note_award_emoji must be a scalar' if ref($_[3]) or (!defined $_[3]);
my $options = {};
return $self->_call_rest_client( 'DELETE', 'projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji/:award_id', [@_], $options );
}
=back
=head2 Branches
See L.
=over
=item branches
my $branches = $api->branches(
$project_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub branches {
my $self = shift;
croak 'branches must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($project_id) to branches must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to branches must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/branches', [@_], $options );
}
=item branch
my $branch = $api->branch(
$project_id,
$branch_name,
);
Sends a C request to C and returns the decoded response content.
=cut
sub branch {
my $self = shift;
croak 'branch must be called with 2 arguments' if @_ != 2;
croak 'The #1 argument ($project_id) to branch must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($branch_name) to branch must be a scalar' if ref($_[1]) or (!defined $_[1]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/branches/:branch_name', [@_], $options );
}
=item create_branch
my $branch = $api->create_branch(
$project_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_branch {
my $self = shift;
croak 'create_branch must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($project_id) to create_branch must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to create_branch must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'projects/:project_id/repository/branches', [@_], $options );
}
=item delete_branch
$api->delete_branch(
$project_id,
$branch_name,
);
Sends a C request to C.
=cut
sub delete_branch {
my $self = shift;
croak 'delete_branch must be called with 2 arguments' if @_ != 2;
croak 'The #1 argument ($project_id) to delete_branch must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($branch_name) to delete_branch must be a scalar' if ref($_[1]) or (!defined $_[1]);
my $options = {};
$options->{decode} = 0;
$self->_call_rest_client( 'DELETE', 'projects/:project_id/repository/branches/:branch_name', [@_], $options );
return;
}
=item delete_merged_branches
$api->delete_merged_branches(
$project_id,
);
Sends a C request to C.
=cut
sub delete_merged_branches {
my $self = shift;
croak 'delete_merged_branches must be called with 1 arguments' if @_ != 1;
croak 'The #1 argument ($project_id) to delete_merged_branches must be a scalar' if ref($_[0]) or (!defined $_[0]);
my $options = {};
$options->{decode} = 0;
$self->_call_rest_client( 'DELETE', 'projects/:project_id/repository/merged_branches', [@_], $options );
return;
}
=back
=head2 Broadcast Messages
See L.
=over
=item broadcast_messages
my $messages = $api->broadcast_messages(
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub broadcast_messages {
my $self = shift;
croak 'broadcast_messages must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1;
croak 'The last argument (\%params) to broadcast_messages must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH';
my $params = (@_ == 1) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'broadcast_messages', [@_], $options );
}
=item broadcast_message
my $message = $api->broadcast_message(
$message_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub broadcast_message {
my $self = shift;
croak 'broadcast_message must be called with 1 arguments' if @_ != 1;
croak 'The #1 argument ($message_id) to broadcast_message must be a scalar' if ref($_[0]) or (!defined $_[0]);
my $options = {};
return $self->_call_rest_client( 'GET', 'broadcast_messages/:message_id', [@_], $options );
}
=item create_broadcast_message
my $message = $api->create_broadcast_message(
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_broadcast_message {
my $self = shift;
croak 'create_broadcast_message must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1;
croak 'The last argument (\%params) to create_broadcast_message must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH';
my $params = (@_ == 1) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'broadcast_messages', [@_], $options );
}
=item edit_broadcast_message
my $message = $api->edit_broadcast_message(
$message_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub edit_broadcast_message {
my $self = shift;
croak 'edit_broadcast_message must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($message_id) to edit_broadcast_message must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to edit_broadcast_message must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'PUT', 'broadcast_messages/:message_id', [@_], $options );
}
=item delete_broadcast_message
$api->delete_broadcast_message(
$message_id,
);
Sends a C request to C.
=cut
sub delete_broadcast_message {
my $self = shift;
croak 'delete_broadcast_message must be called with 1 arguments' if @_ != 1;
croak 'The #1 argument ($message_id) to delete_broadcast_message must be a scalar' if ref($_[0]) or (!defined $_[0]);
my $options = {};
$options->{decode} = 0;
$self->_call_rest_client( 'DELETE', 'broadcast_messages/:message_id', [@_], $options );
return;
}
=back
=head2 Project-level Variables
See L.
=over
=item project_variables
my $variables = $api->project_variables(
$project_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub project_variables {
my $self = shift;
croak 'project_variables must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($project_id) to project_variables must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to project_variables must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/variables', [@_], $options );
}
=item project_variable
my $variable = $api->project_variable(
$project_id,
$variable_key,
);
Sends a C request to C and returns the decoded response content.
=cut
sub project_variable {
my $self = shift;
croak 'project_variable must be called with 2 arguments' if @_ != 2;
croak 'The #1 argument ($project_id) to project_variable must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($variable_key) to project_variable must be a scalar' if ref($_[1]) or (!defined $_[1]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/variables/:variable_key', [@_], $options );
}
=item create_project_variable
my $variable = $api->create_project_variable(
$project_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_project_variable {
my $self = shift;
croak 'create_project_variable must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($project_id) to create_project_variable must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to create_project_variable must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'projects/:project_id/variables', [@_], $options );
}
=item edit_project_variable
my $variable = $api->edit_project_variable(
$project_id,
$variable_key,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub edit_project_variable {
my $self = shift;
croak 'edit_project_variable must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to edit_project_variable must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($variable_key) to edit_project_variable must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to edit_project_variable must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'PUT', 'projects/:project_id/variables/:variable_key', [@_], $options );
}
=item delete_project_variable
$api->delete_project_variable(
$project_id,
$variable_key,
);
Sends a C request to C.
=cut
sub delete_project_variable {
my $self = shift;
croak 'delete_project_variable must be called with 2 arguments' if @_ != 2;
croak 'The #1 argument ($project_id) to delete_project_variable must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($variable_key) to delete_project_variable must be a scalar' if ref($_[1]) or (!defined $_[1]);
my $options = {};
$options->{decode} = 0;
$self->_call_rest_client( 'DELETE', 'projects/:project_id/variables/:variable_key', [@_], $options );
return;
}
=back
=head2 Group-level Variables
See L.
=over
=item group_variables
my $variables = $api->group_variables(
$group_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub group_variables {
my $self = shift;
croak 'group_variables must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($group_id) to group_variables must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to group_variables must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'groups/:group_id/variables', [@_], $options );
}
=item group_variable
my $variable = $api->group_variable(
$group_id,
$variable_key,
);
Sends a C request to C and returns the decoded response content.
=cut
sub group_variable {
my $self = shift;
croak 'group_variable must be called with 2 arguments' if @_ != 2;
croak 'The #1 argument ($group_id) to group_variable must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($variable_key) to group_variable must be a scalar' if ref($_[1]) or (!defined $_[1]);
my $options = {};
return $self->_call_rest_client( 'GET', 'groups/:group_id/variables/:variable_key', [@_], $options );
}
=item create_group_variable
my $variable = $api->create_group_variable(
$group_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_group_variable {
my $self = shift;
croak 'create_group_variable must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($group_id) to create_group_variable must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to create_group_variable must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'groups/:group_id/variables', [@_], $options );
}
=item edit_group_variable
my $variable = $api->edit_group_variable(
$group_id,
$variable_key,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub edit_group_variable {
my $self = shift;
croak 'edit_group_variable must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($group_id) to edit_group_variable must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($variable_key) to edit_group_variable must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to edit_group_variable must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'PUT', 'groups/:group_id/variables/:variable_key', [@_], $options );
}
=item delete_group_variable
$api->delete_group_variable(
$group_id,
$variable_key,
);
Sends a C request to C.
=cut
sub delete_group_variable {
my $self = shift;
croak 'delete_group_variable must be called with 2 arguments' if @_ != 2;
croak 'The #1 argument ($group_id) to delete_group_variable must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($variable_key) to delete_group_variable must be a scalar' if ref($_[1]) or (!defined $_[1]);
my $options = {};
$options->{decode} = 0;
$self->_call_rest_client( 'DELETE', 'groups/:group_id/variables/:variable_key', [@_], $options );
return;
}
=back
=head2 Snippets
See L.
=over
=item snippets
my $snippets = $api->snippets();
Sends a C request to C and returns the decoded response content.
=cut
sub snippets {
my $self = shift;
croak "The snippets method does not take any arguments" if @_;
my $options = {};
return $self->_call_rest_client( 'GET', 'snippets', [@_], $options );
}
=item snippet
my $snippet = $api->snippet(
$snippet_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub snippet {
my $self = shift;
croak 'snippet must be called with 1 arguments' if @_ != 1;
croak 'The #1 argument ($snippet_id) to snippet must be a scalar' if ref($_[0]) or (!defined $_[0]);
my $options = {};
return $self->_call_rest_client( 'GET', 'snippets/:snippet_id', [@_], $options );
}
=item create_snippet
my $snippet = $api->create_snippet(
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_snippet {
my $self = shift;
croak 'create_snippet must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1;
croak 'The last argument (\%params) to create_snippet must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH';
my $params = (@_ == 1) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'snippets', [@_], $options );
}
=item edit_snippet
my $snippet = $api->edit_snippet(
$snippet_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub edit_snippet {
my $self = shift;
croak 'edit_snippet must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($snippet_id) to edit_snippet must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to edit_snippet must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'PUT', 'snippets/:snippet_id', [@_], $options );
}
=item delete_snippet
$api->delete_snippet(
$snippet_id,
);
Sends a C request to C.
=cut
sub delete_snippet {
my $self = shift;
croak 'delete_snippet must be called with 1 arguments' if @_ != 1;
croak 'The #1 argument ($snippet_id) to delete_snippet must be a scalar' if ref($_[0]) or (!defined $_[0]);
my $options = {};
$options->{decode} = 0;
$self->_call_rest_client( 'DELETE', 'snippets/:snippet_id', [@_], $options );
return;
}
=item public_snippets
my $snippets = $api->public_snippets(
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub public_snippets {
my $self = shift;
croak 'public_snippets must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1;
croak 'The last argument (\%params) to public_snippets must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH';
my $params = (@_ == 1) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'snippets/public', [@_], $options );
}
=item snippet_user_agent_detail
my $user_agent = $api->snippet_user_agent_detail(
$snippet_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub snippet_user_agent_detail {
my $self = shift;
croak 'snippet_user_agent_detail must be called with 1 arguments' if @_ != 1;
croak 'The #1 argument ($snippet_id) to snippet_user_agent_detail must be a scalar' if ref($_[0]) or (!defined $_[0]);
my $options = {};
return $self->_call_rest_client( 'GET', 'snippets/:snippet_id/user_agent_detail', [@_], $options );
}
=back
=head2 Commits
See L.
=over
=item commits
my $commits = $api->commits(
$project_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub commits {
my $self = shift;
croak 'commits must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($project_id) to commits must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to commits must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/commits', [@_], $options );
}
=item create_commit
my $commit = $api->create_commit(
$project_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_commit {
my $self = shift;
croak 'create_commit must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($project_id) to create_commit must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to create_commit must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'projects/:project_id/repository/commits', [@_], $options );
}
=item commit
my $commit = $api->commit(
$project_id,
$commit_sha,
);
Sends a C request to C and returns the decoded response content.
=cut
sub commit {
my $self = shift;
croak 'commit must be called with 2 arguments' if @_ != 2;
croak 'The #1 argument ($project_id) to commit must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($commit_sha) to commit must be a scalar' if ref($_[1]) or (!defined $_[1]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/commits/:commit_sha', [@_], $options );
}
=item commit_refs
my $refs = $api->commit_refs(
$project_id,
$commit_sha,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub commit_refs {
my $self = shift;
croak 'commit_refs must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to commit_refs must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($commit_sha) to commit_refs must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to commit_refs must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/commits/:commit_sha/refs', [@_], $options );
}
=item cherry_pick_commit
my $commit = $api->cherry_pick_commit(
$project_id,
$commit_sha,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub cherry_pick_commit {
my $self = shift;
croak 'cherry_pick_commit must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to cherry_pick_commit must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($commit_sha) to cherry_pick_commit must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to cherry_pick_commit must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'projects/:project_id/repository/commits/:commit_sha/cherry_pick', [@_], $options );
}
=item commit_diff
my $diff = $api->commit_diff(
$project_id,
$commit_sha,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub commit_diff {
my $self = shift;
croak 'commit_diff must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to commit_diff must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($commit_sha) to commit_diff must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to commit_diff must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/commits/:commit_sha/diff', [@_], $options );
}
=item commit_comments
my $comments = $api->commit_comments(
$project_id,
$commit_sha,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub commit_comments {
my $self = shift;
croak 'commit_comments must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to commit_comments must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($commit_sha) to commit_comments must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to commit_comments must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/commits/:commit_sha/comments', [@_], $options );
}
=item create_commit_comment
$api->create_commit_comment(
$project_id,
$commit_sha,
\%params,
);
Sends a C request to C.
=cut
sub create_commit_comment {
my $self = shift;
croak 'create_commit_comment must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to create_commit_comment must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($commit_sha) to create_commit_comment must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to create_commit_comment must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{decode} = 0;
$options->{content} = $params if defined $params;
$self->_call_rest_client( 'POST', 'projects/:project_id/repository/commits/:commit_sha/comments', [@_], $options );
return;
}
=item commit_statuses
my $build_statuses = $api->commit_statuses(
$project_id,
$commit_sha,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub commit_statuses {
my $self = shift;
croak 'commit_statuses must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to commit_statuses must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($commit_sha) to commit_statuses must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to commit_statuses must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/commits/:commit_sha/statuses', [@_], $options );
}
=item create_commit_status
my $build_status = $api->create_commit_status(
$project_id,
$commit_sha,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub create_commit_status {
my $self = shift;
croak 'create_commit_status must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to create_commit_status must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($commit_sha) to create_commit_status must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to create_commit_status must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{content} = $params if defined $params;
return $self->_call_rest_client( 'POST', 'projects/:project_id/statuses/:commit_sha', [@_], $options );
}
=back
=head2 Container Registry
See L.
=over
=item registry_repositories_in_project
my $registry_repositories = $api->registry_repositories_in_project(
$project_id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub registry_repositories_in_project {
my $self = shift;
croak 'registry_repositories_in_project must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($project_id) to registry_repositories_in_project must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to registry_repositories_in_project must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'projects/:project_id/registry/repositories', [@_], $options );
}
=item registry_repositories_in_group
my $registry_repositories = $api->registry_repositories_in_group(
$id,
\%params,
);
Sends a C request to C and returns the decoded response content.
=cut
sub registry_repositories_in_group {
my $self = shift;
croak 'registry_repositories_in_group must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2;
croak 'The #1 argument ($id) to registry_repositories_in_group must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The last argument (\%params) to registry_repositories_in_group must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH';
my $params = (@_ == 2) ? pop() : undef;
my $options = {};
$options->{query} = $params if defined $params;
return $self->_call_rest_client( 'GET', 'groups/:id/registry/repositories', [@_], $options );
}
=item delete_registry_repository
$api->delete_registry_repository(
$project_id,
$repository_id,
);
Sends a C request to C.
=cut
sub delete_registry_repository {
my $self = shift;
croak 'delete_registry_repository must be called with 2 arguments' if @_ != 2;
croak 'The #1 argument ($project_id) to delete_registry_repository must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($repository_id) to delete_registry_repository must be a scalar' if ref($_[1]) or (!defined $_[1]);
my $options = {};
$options->{decode} = 0;
$self->_call_rest_client( 'DELETE', 'projects/:project_id/registry/repositories/:repository_id', [@_], $options );
return;
}
=item registry_repository_tags
my $tags = $api->registry_repository_tags(
$project_id,
$repository_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub registry_repository_tags {
my $self = shift;
croak 'registry_repository_tags must be called with 2 arguments' if @_ != 2;
croak 'The #1 argument ($project_id) to registry_repository_tags must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($repository_id) to registry_repository_tags must be a scalar' if ref($_[1]) or (!defined $_[1]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/registry/repositories/:repository_id/tags', [@_], $options );
}
=item registry_repository_tag
my $tag = $api->registry_repository_tag(
$project_id,
$repository_id,
$tag_name,
);
Sends a C request to C and returns the decoded response content.
=cut
sub registry_repository_tag {
my $self = shift;
croak 'registry_repository_tag must be called with 3 arguments' if @_ != 3;
croak 'The #1 argument ($project_id) to registry_repository_tag must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($repository_id) to registry_repository_tag must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($tag_name) to registry_repository_tag must be a scalar' if ref($_[2]) or (!defined $_[2]);
my $options = {};
return $self->_call_rest_client( 'GET', 'projects/:project_id/registry/repositories/:repository_id/tags/:tag_name', [@_], $options );
}
=item delete_registry_repository_tag
$api->delete_registry_repository_tag(
$project_id,
$repository_id,
$tag_name,
);
Sends a C request to C.
=cut
sub delete_registry_repository_tag {
my $self = shift;
croak 'delete_registry_repository_tag must be called with 3 arguments' if @_ != 3;
croak 'The #1 argument ($project_id) to delete_registry_repository_tag must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($repository_id) to delete_registry_repository_tag must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The #3 argument ($tag_name) to delete_registry_repository_tag must be a scalar' if ref($_[2]) or (!defined $_[2]);
my $options = {};
$options->{decode} = 0;
$self->_call_rest_client( 'DELETE', 'projects/:project_id/registry/repositories/:repository_id/tags/:tag_name', [@_], $options );
return;
}
=item bulk_delete_registry_repository_tags
$api->bulk_delete_registry_repository_tags(
$project_id,
$repository_id,
\%params,
);
Sends a C request to C.
=cut
sub bulk_delete_registry_repository_tags {
my $self = shift;
croak 'bulk_delete_registry_repository_tags must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3;
croak 'The #1 argument ($project_id) to bulk_delete_registry_repository_tags must be a scalar' if ref($_[0]) or (!defined $_[0]);
croak 'The #2 argument ($repository_id) to bulk_delete_registry_repository_tags must be a scalar' if ref($_[1]) or (!defined $_[1]);
croak 'The last argument (\%params) to bulk_delete_registry_repository_tags must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH';
my $params = (@_ == 3) ? pop() : undef;
my $options = {};
$options->{decode} = 0;
$options->{content} = $params if defined $params;
$self->_call_rest_client( 'DELETE', 'projects/:project_id/registry/repositories/:repository_id/tags', [@_], $options );
return;
}
=back
=head2 Custom Attributes
See L.
=over
=item custom_user_attributes
my $attributes = $api->custom_user_attributes(
$user_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub custom_user_attributes {
my $self = shift;
croak 'custom_user_attributes must be called with 1 arguments' if @_ != 1;
croak 'The #1 argument ($user_id) to custom_user_attributes must be a scalar' if ref($_[0]) or (!defined $_[0]);
my $options = {};
return $self->_call_rest_client( 'GET', 'users/:user_id/custom_attributes', [@_], $options );
}
=item custom_group_attributes
my $attributes = $api->custom_group_attributes(
$group_id,
);
Sends a C request to C and returns the decoded response content.
=cut
sub custom_group_attributes {
my $self = shift;
croak 'custom_group_attributes must be called with 1 arguments' if @_ != 1;
croak 'The #1 argument ($group_id) to custom_group_attributes must be a scalar' if ref($_[0]) or (!defined $_[0]);
my $options = {};
return $self->_call_rest_client( 'GET', 'groups/:group_id/custom_attributes', [@_], $options );
}
=item custom_project_attributes
my $attributes = $api->custom_project_attributes(
$project_id,
);
Sends a C]