Build.PL100644000765000024 45514440166670 14320 0ustar00aranstaff000000000000GitLab-API-v4-0.27# ========================================================================= # 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(); Changes100644000765000024 1615314440166670 14361 0ustar00aranstaff000000000000GitLab-API-v4-0.27Revision history for Perl extension GitLab-API-v4. 0.27 2023-06-07T20:50:56Z - Add run_pipeline_schedule. - Add share_group_with_group and unshare_group_with_group. - Add approve_merge_request and unapprove_merge_request - Add approve_user and reject_user. - Add ban_user and unban_user. - Add activate_user and deactivate_user. - Allow multi-line arguments. - Use JSON::MaybeXS instead of JSON. - Add verify_SSL=>1 to HTTP::Tiny to verify https server identity. - Handle multiple cookies correctly when there is more than one. - Live tests now run against GitLab CE 16.0.3 (was 11.10.4). - Add the the remote_mirrors, create_remote_mirror, and edit_remote_mirror methods. - Fixed incorrect license messaging in POD. 0.26 2021-01-30T07:10:57Z - Changed licensing terms to be the same as Perl 5. - Add the user_memeberships method. - Remove file renaming before upload. - Provide a .editorconfig instead of .lvimrc. 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. LICENSE100644000765000024 4377014440166670 14100 0ustar00aranstaff000000000000GitLab-API-v4-0.27This software is copyright (c) 2014 by Aran Clary Deltac . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2019 by Aran Clary Deltac . This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, 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 make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the 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 a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 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. END OF TERMS AND CONDITIONS Appendix: 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 humanity, 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 convey 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) 19yy 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 1, 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision 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, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2019 by Aran Clary Deltac . This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End META.json100644000765000024 1111514440166670 14500 0ustar00aranstaff000000000000GitLab-API-v4-0.27{ "abstract" : "A complete GitLab API v4 client.", "author" : [ "Aran Clary Deltac " ], "dynamic_config" : 0, "generated_by" : "Minilla/v3.1.21", "license" : [ "perl_5" ], "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.07", "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::MaybeXS" : "1.003007", "List::Util" : "0", "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.27" }, "GitLab::API::v4::Config" : { "file" : "lib/GitLab/API/v4/Config.pm", "version" : "0.27" }, "GitLab::API::v4::Constants" : { "file" : "lib/GitLab/API/v4/Constants.pm", "version" : "0.27" }, "GitLab::API::v4::Mock" : { "file" : "lib/GitLab/API/v4/Mock.pm", "version" : "0.27" }, "GitLab::API::v4::Mock::Engine" : { "file" : "lib/GitLab/API/v4/Mock/Engine.pm", "version" : "0.27" }, "GitLab::API::v4::Mock::RESTClient" : { "file" : "lib/GitLab/API/v4/Mock/RESTClient.pm", "version" : "0.27" }, "GitLab::API::v4::Paginator" : { "file" : "lib/GitLab/API/v4/Paginator.pm", "version" : "0.27" }, "GitLab::API::v4::RESTClient" : { "file" : "lib/GitLab/API/v4/RESTClient.pm", "version" : "0.27" }, "GitLab::API::v4::WWWClient" : { "file" : "lib/GitLab/API/v4/WWWClient.pm", "version" : "0.27" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/bluefeet/GitLab-API-v4/issues" }, "homepage" : "https://github.com/bluefeet/GitLab-API-v4", "repository" : { "type" : "git", "url" : "https://github.com/bluefeet/GitLab-API-v4.git", "web" : "https://github.com/bluefeet/GitLab-API-v4" } }, "version" : "0.27", "x_authority" : "cpan:BLUEFEET", "x_contributors" : [ "Dan Book ", "Dave Webb ", "Dmitry Frolov ", "Dotan Dimet ", "Graham Knop ", "James Wright ", "Jonathan Taylor ", "José Joaquín Atria ", "Kieren Diment ", "Luc Didry ", "Marek R. Sotola ", "Nigel Gregoire ", "Simon Ruderich ", "Stig Palmquist ", "Thomas Klausner ", "g0t mi1k ", "gregor herrmann ", "royce55 ", "trunov-ms " ], "x_serialization_backend" : "JSON::PP version 4.07", "x_static_install" : 1 } README.md100644000765000024 37514414440166670 14375 0ustar00aranstaff000000000000GitLab-API-v4-0.27# 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%3A%3AAPI%3A%3Av3) 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%3A%3AAPI%3A%3Av4%3A%3AConstants) 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%3A%3ATiny). ## Logging This module uses [Log::Any](https://metacpan.org/pod/Log%3A%3AAny) 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%3A%3AAPI%3A%3Av4%3A%3ARESTClient) (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%3A%3AAPI%3A%3Av4%3A%3ARESTClient). # 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%3A%3AAPI%3A%3Av4%3A%3APaginator) 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%3A%3AAPI%3A%3Av4) 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( $group_id, \%params, ); ``` Sends a `GET` request to `groups/:group_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`. - share\_group\_with\_group ``` $api->share_group_with_group( $group_id, \%params, ); ``` Sends a `POST` request to `groups/:group_id/share`. - unshare\_group\_with\_group ``` $api->unshare_group_with_group( $group_id, $shared_with_group_id, ); ``` Sends a `DELETE` request to `groups/:group_id/share/:shared_with_group_id`. ## 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. - approve\_merge\_request ```perl my $merge_request = $api->approve_merge_request( $project_id, $merge_request_iid, \%params, ); ``` Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/approve` and returns the decoded response content. - unapprove\_merge\_request ```perl my $merge_request = $api->unapprove_merge_request( $project_id, $merge_request_iid, \%params, ); ``` Sends a `POST` request to `projects/:project_id/merge_requests/:merge_request_iid/unapprove` 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. - run\_pipeline\_schedule ```perl my $variable = $api->run_pipeline_schedule( $project_id, $pipeline_schedule_id, ); ``` Sends a `POST` request to `projects/:project_id/pipeline_schedules/:pipeline_schedule_id/play` 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. ## Remote Mirrors See [https://docs.gitlab.com/ce/api/remote\_mirrors.html](https://docs.gitlab.com/ce/api/remote_mirrors.html). - remote\_mirrors ```perl my $mirrors = $api->remote_mirrors( $project_id, ); ``` Sends a `GET` request to `projects/:project_id/remote_mirrors` and returns the decoded response content. - create\_remote\_mirror ```perl my $mirror = $api->create_remote_mirror( $project_id, \%params, ); ``` Sends a `POST` request to `projects/:project_id/remote_mirrors` and returns the decoded response content. - edit\_remote\_mirror ```perl my $mirror = $api->edit_remote_mirror( $project_id, $mirror_id, \%params, ); ``` Sends a `PUT` request to `projects/:project_id/remote_mirrors/:mirror_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. - approve\_user ```perl $api->approve_user( $user_id, ); ``` Sends a `POST` request to `users/:user_id/approve`. - reject\_user ```perl $api->reject_user( $user_id, ); ``` Sends a `POST` request to `users/:user_id/reject`. - activate\_user ```perl $api->activate_user( $user_id, ); ``` Sends a `POST` request to `users/:user_id/activate`. - deactivate\_user ```perl $api->deactivate_user( $user_id, ); ``` Sends a `POST` request to `users/:user_id/deactivate`. - ban\_user ```perl $api->ban_user( $user_id, ); ``` Sends a `POST` request to `users/:user_id/ban`. - unban\_user ```perl $api->unban_user( $user_id, ); ``` Sends a `POST` request to `users/:user_id/unban`. - 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. - user\_memberships ```perl my $memberships = $api->user_memberships( $user_id, \%params, ); ``` Sends a `GET` request to `users/:user_id/memberships` 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) # AUTHOR ``` Aran Clary Deltac ``` # CONTRIBUTORS ``` 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 Graham Knop Stig Palmquist Dan Book James Wright Jonathan Taylor g0t mi1k ``` # LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. README.pod100644000765000024 227314440166670 16007 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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 of 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.yml100644000765000024 1504414440166670 16356 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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 - remote_mirrors: head: Remote Mirrors doc_url: https://docs.gitlab.com/ce/api/remote_mirrors.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.pm100644000765000024 324314440166670 16200 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author1; __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 AUTHOR Aran Clary Deltac =head1 CONTRIBUTORS 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 Graham Knop Stig Palmquist Dan Book James Wright Jonathan Taylor g0t mi1k =head1 LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut generate.pl100755000765000024 1003114440166670 16507 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.pm100644000765000024 2160714440166670 16156 0ustar00aranstaff000000000000GitLab-API-v4-0.27/authorpackage GitLab::API::v4; our $VERSION = '0.26'; =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.yml100644000765000024 513614440166670 21202 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 76114440166670 20152 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 117714440166670 20507 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 51014440166670 22521 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 153714440166670 20375 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 135214440166670 22627 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - registry_repositories_in_project: registry_repositories = GET projects/:project_id/registry/repositories? - registry_repositories_in_group: registry_repositories = GET groups/:group_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.yml100644000765000024 210214440166670 22467 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 60314440166670 21222 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 22614440166670 21237 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - deployments: deployments = GET projects/:project_id/deployments? - deployment: deployment = GET projects/:project_id/deployments/:deployment_id discussions.yml100644000765000024 554014440166670 21266 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 63514440166670 21427 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 22614440166670 20200 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - all_events: events = GET events? - user_events: events = GET users/:user_id/events? - project_events: events = GET projects/:project_id/events? features.yml100644000765000024 12614440166670 20511 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - features: features = GET features - set_feature: feature = POST features/:name? gitignores_templates.yml100644000765000024 21314440166670 23120 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - gitignores_templates: templates = GET templates/gitignores? - gitignores_template: template = GET templates/gitignores/:template_key gitlab_ci_ymls_templates.yml100644000765000024 23314440166670 23731 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 46414440166670 23310 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 57114440166670 21340 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 101014440166670 21372 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 55314440166670 23252 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 60214440166670 21540 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 77014440166670 22276 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 143714440166670 20240 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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 - share_group_with_group: POST groups/:group_id/share? - unshare_group_with_group: DELETE groups/:group_id/share/:shared_with_group_idissues.yml100644000765000024 255214440166670 20233 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 152214440166670 17651 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 4214440166670 17623 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - key: key = GET keys/:key_id labels.yml100644000765000024 60114440166670 20133 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 20214440166670 22551 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - license_templates: templates = GET templates/licenses? - license_template: template = GET templates/licenses/:template_key? lint.yml100644000765000024 4014440166670 17614 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - lint: result = POST lint? markdown.yml100644000765000024 4614440166670 20476 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - markdown: html = POST markdown? merge_requests.yml100644000765000024 465514440166670 21760 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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? - approve_merge_request: merge_request = POST projects/:project_id/merge_requests/:merge_request_iid/approve? - unapprove_merge_request: merge_request = POST projects/:project_id/merge_requests/:merge_request_iid/unapprove? - 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.yml100644000765000024 103414440166670 21074 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 14514440166670 21013 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - namespaces: namespaces = GET namespaces? - namespace: namespace = GET namespaces/:namespace_id notes.yml100644000765000024 245414440166670 20051 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 77514440166670 23313 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 64414440166670 21326 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 214214440166670 22557 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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 - run_pipeline_schedule: variable = POST projects/:project_id/pipeline_schedules/:pipeline_schedule_id/play - 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.yml100644000765000024 251114440166670 22426 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 177714440166670 20720 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 51414440166670 23616 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 63514440166670 21653 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 50514440166670 23335 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 61114440166670 23557 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 64414440166670 22060 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 105214440166670 22305 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 342114440166670 20545 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 50114440166670 22526 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 42414440166670 21703 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 71514440166670 21517 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 52314440166670 20477 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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 remote_mirrors.yml100644000765000024 34714440166670 21750 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - remote_mirrors: mirrors = GET projects/:project_id/remote_mirrors - create_remote_mirror: mirror = POST projects/:project_id/remote_mirrors? - edit_remote_mirror: mirror = PUT projects/:project_id/remote_mirrors/:mirror_id? repositories.yml100644000765000024 67614440166670 21434 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 61314440166670 22275 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 100714440166670 23264 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 74014440166670 20371 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 4414440166670 20117 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - search: results = GET search? services.yml100644000765000024 34714440166670 20523 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 15414440166670 20534 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - settings: settings = GET application/settings - update_settings: settings = PUT application/settings? sidekiq_metrics.yml100644000765000024 33014440166670 22047 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 55314440166670 20544 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 7214440166670 21045 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - statistics: statistics = GET application/statistics system_hooks.yml100644000765000024 20714440166670 21422 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - hooks: hooks = GET hooks? - create_hook: POST hooks? - test_hook: hook = GET hooks/:hook_id - delete_hook: DELETE hooks/:hook_id tags.yml100644000765000024 67114440166670 17636 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 21114440166670 20016 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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.yml100644000765000024 427214440166670 20062 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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 - approve_user: POST users/:user_id/approve - reject_user: POST users/:user_id/reject - activate_user: POST users/:user_id/activate - deactivate_user: POST users/:user_id/deactivate - ban_user: POST users/:user_id/ban - unban_user: POST users/:user_id/unban - 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? - user_memberships: memberships = GET users/:user_id/memberships? version.yml100644000765000024 4514440166670 20340 0ustar00aranstaff000000000000GitLab-API-v4-0.27/author/sections--- - version: version = GET version wikis.yml100644000765000024 45314440166670 20024 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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-container100755000765000024 136114440166670 20366 0ustar00aranstaff000000000000GitLab-API-v4-0.27/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:16.0.3-ce.0 echo 1. Open you browser to: http://localhost \(it may take several minutes for it to respond\) echo 2. Get the root password with: sudo docker exec -it test-gitlab-api-v4 grep 'Password:' /etc/gitlab/initial_root_password 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 cpanfile100644000765000024 220314440166670 14541 0ustar00aranstaff000000000000GitLab-API-v4-0.27requires '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'; requires 'JSON::MaybeXS' => '1.003007'; # 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::WWWClient. requires 'List::Util'; # Used by GitLab::API::v4::Constants. requires 'Const::Fast' => '0.014'; requires 'Exporter'; # Used by gitlab-api-v4 and/or GitLab::API::v4::Config. requires 'Try::Tiny' => '0.28'; requires 'Getopt::Long'; requires 'Pod::Usage'; requires 'Log::Any::Adapter' => '1.703'; requires 'Log::Any::Adapter::Screen' => '0.13'; requires 'Path::Tiny' => '0.079'; requires 'IO::Prompter' => '0.004014'; test_requires 'Test2::V0' => '0.000094'; test_requires 'Log::Any::Adapter::TAP' => '0.003003'; test_requires 'MIME::Base64' => '3.15'; v4.pm100644000765000024 137450414440166670 16346 0ustar00aranstaff000000000000GitLab-API-v4-0.27/lib/GitLab/APIpackage GitLab::API::v4; our $VERSION = '0.27'; =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( $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 ($group_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/:group_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 request to C and returns the decoded response content. =cut sub custom_project_attributes { my $self = shift; croak 'custom_project_attributes must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to custom_project_attributes must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/custom_attributes', [@_], $options ); } =item custom_user_attribute my $attribute = $api->custom_user_attribute( $user_id, $attribute_key, ); Sends a C request to C and returns the decoded response content. =cut sub custom_user_attribute { my $self = shift; croak 'custom_user_attribute must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($user_id) to custom_user_attribute must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($attribute_key) to custom_user_attribute must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'users/:user_id/custom_attributes/:attribute_key', [@_], $options ); } =item custom_group_attribute my $attribute = $api->custom_group_attribute( $group_id, $attribute_key, ); Sends a C request to C and returns the decoded response content. =cut sub custom_group_attribute { my $self = shift; croak 'custom_group_attribute must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to custom_group_attribute must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($attribute_key) to custom_group_attribute must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'groups/:group_id/custom_attributes/:attribute_key', [@_], $options ); } =item custom_project_attribute my $attribute = $api->custom_project_attribute( $project_id, $attribute_key, ); Sends a C request to C and returns the decoded response content. =cut sub custom_project_attribute { my $self = shift; croak 'custom_project_attribute must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to custom_project_attribute must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($attribute_key) to custom_project_attribute must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/custom_attributes/:attribute_key', [@_], $options ); } =item set_custom_user_attribute my $attribute = $api->set_custom_user_attribute( $user_id, $attribute_key, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub set_custom_user_attribute { my $self = shift; croak 'set_custom_user_attribute must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($user_id) to set_custom_user_attribute must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($attribute_key) to set_custom_user_attribute must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to set_custom_user_attribute 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', 'users/:user_id/custom_attributes/:attribute_key', [@_], $options ); } =item set_custom_group_attribute my $attribute = $api->set_custom_group_attribute( $group_id, $attribute_key, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub set_custom_group_attribute { my $self = shift; croak 'set_custom_group_attribute must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($group_id) to set_custom_group_attribute must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($attribute_key) to set_custom_group_attribute must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to set_custom_group_attribute 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/custom_attributes/:attribute_key', [@_], $options ); } =item set_custom_project_attribute my $attribute = $api->set_custom_project_attribute( $project_id, $attribute_key, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub set_custom_project_attribute { my $self = shift; croak 'set_custom_project_attribute must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to set_custom_project_attribute must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($attribute_key) to set_custom_project_attribute must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to set_custom_project_attribute 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/custom_attributes/:attribute_key', [@_], $options ); } =item delete_custom_user_attribute $api->delete_custom_user_attribute( $user_id, $attribute_key, ); Sends a C request to C. =cut sub delete_custom_user_attribute { my $self = shift; croak 'delete_custom_user_attribute must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($user_id) to delete_custom_user_attribute must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($attribute_key) to delete_custom_user_attribute must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'users/:user_id/custom_attributes/:attribute_key', [@_], $options ); return; } =item delete_custom_group_attribute $api->delete_custom_group_attribute( $group_id, $attribute_key, ); Sends a C request to C. =cut sub delete_custom_group_attribute { my $self = shift; croak 'delete_custom_group_attribute must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to delete_custom_group_attribute must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($attribute_key) to delete_custom_group_attribute must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'groups/:group_id/custom_attributes/:attribute_key', [@_], $options ); return; } =item delete_custom_project_attribute $api->delete_custom_project_attribute( $project_id, $attribute_key, ); Sends a C request to C. =cut sub delete_custom_project_attribute { my $self = shift; croak 'delete_custom_project_attribute must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_custom_project_attribute must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($attribute_key) to delete_custom_project_attribute must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/custom_attributes/:attribute_key', [@_], $options ); return; } =back =head2 Deployments See L. =over =item deployments my $deployments = $api->deployments( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub deployments { my $self = shift; croak 'deployments must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to deployments must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to deployments 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/deployments', [@_], $options ); } =item deployment my $deployment = $api->deployment( $project_id, $deployment_id, ); Sends a C request to C and returns the decoded response content. =cut sub deployment { my $self = shift; croak 'deployment must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to deployment must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($deployment_id) to deployment must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/deployments/:deployment_id', [@_], $options ); } =back =head2 Deploy Keys See L. =over =item all_deploy_keys my $keys = $api->all_deploy_keys( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub all_deploy_keys { my $self = shift; croak 'all_deploy_keys must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to all_deploy_keys 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', 'deploy_keys', [@_], $options ); } =item deploy_keys my $keys = $api->deploy_keys( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub deploy_keys { my $self = shift; croak 'deploy_keys must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to deploy_keys must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to deploy_keys 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/deploy_keys', [@_], $options ); } =item deploy_key my $key = $api->deploy_key( $project_id, $key_id, ); Sends a C request to C and returns the decoded response content. =cut sub deploy_key { my $self = shift; croak 'deploy_key must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to deploy_key must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($key_id) to deploy_key must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/deploy_keys/:key_id', [@_], $options ); } =item create_deploy_key my $key = $api->create_deploy_key( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_deploy_key { my $self = shift; croak 'create_deploy_key must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_deploy_key must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_deploy_key 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/deploy_keys', [@_], $options ); } =item delete_deploy_key $api->delete_deploy_key( $project_id, $key_id, ); Sends a C request to C. =cut sub delete_deploy_key { my $self = shift; croak 'delete_deploy_key must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_deploy_key must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($key_id) to delete_deploy_key must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/deploy_keys/:key_id', [@_], $options ); return; } =item enable_deploy_key my $key = $api->enable_deploy_key( $project_id, $key_id, ); Sends a C request to C and returns the decoded response content. =cut sub enable_deploy_key { my $self = shift; croak 'enable_deploy_key must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to enable_deploy_key must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($key_id) to enable_deploy_key must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/deploy_keys/:key_id/enable', [@_], $options ); } =back =head2 Environments See L. =over =item environments my $environments = $api->environments( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub environments { my $self = shift; croak 'environments must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to environments must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to environments 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/environments', [@_], $options ); } =item create_environment my $environment = $api->create_environment( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_environment { my $self = shift; croak 'create_environment must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_environment must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_environment 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/environments', [@_], $options ); } =item edit_environment my $environment = $api->edit_environment( $project_id, $environments_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_environment { my $self = shift; croak 'edit_environment must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_environment must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($environments_id) to edit_environment must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_environment 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/environments/:environments_id', [@_], $options ); } =item delete_environment $api->delete_environment( $project_id, $environment_id, ); Sends a C request to C. =cut sub delete_environment { my $self = shift; croak 'delete_environment must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_environment must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($environment_id) to delete_environment must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/environments/:environment_id', [@_], $options ); return; } =item stop_environment my $environment = $api->stop_environment( $project_id, $environment_id, ); Sends a C request to C and returns the decoded response content. =cut sub stop_environment { my $self = shift; croak 'stop_environment must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to stop_environment must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($environment_id) to stop_environment must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/environments/:environment_id/stop', [@_], $options ); } =back =head2 Events See L. =over =item all_events my $events = $api->all_events( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub all_events { my $self = shift; croak 'all_events must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to all_events 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', 'events', [@_], $options ); } =item user_events my $events = $api->user_events( $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub user_events { my $self = shift; croak 'user_events must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to user_events must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to user_events 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', 'users/:user_id/events', [@_], $options ); } =item project_events my $events = $api->project_events( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_events { my $self = shift; croak 'project_events must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to project_events must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to project_events 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/events', [@_], $options ); } =back =head2 Feature flags See L. =over =item features my $features = $api->features(); Sends a C request to C and returns the decoded response content. =cut sub features { my $self = shift; croak "The features method does not take any arguments" if @_; my $options = {}; return $self->_call_rest_client( 'GET', 'features', [@_], $options ); } =item set_feature my $feature = $api->set_feature( $name, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub set_feature { my $self = shift; croak 'set_feature must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($name) to set_feature must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to set_feature 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', 'features/:name', [@_], $options ); } =back =head2 Gitignores See L. =over =item gitignores_templates my $templates = $api->gitignores_templates( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub gitignores_templates { my $self = shift; croak 'gitignores_templates must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to gitignores_templates 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', 'templates/gitignores', [@_], $options ); } =item gitignores_template my $template = $api->gitignores_template( $template_key, ); Sends a C request to C and returns the decoded response content. =cut sub gitignores_template { my $self = shift; croak 'gitignores_template must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($template_key) to gitignores_template must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'templates/gitignores/:template_key', [@_], $options ); } =back =head2 GitLab CI YMLs See L. =over =item gitlab_ci_ymls_templates my $templates = $api->gitlab_ci_ymls_templates( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub gitlab_ci_ymls_templates { my $self = shift; croak 'gitlab_ci_ymls_templates must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to gitlab_ci_ymls_templates 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', 'templates/gitlab_ci_ymls', [@_], $options ); } =item gitlab_ci_ymls_template my $template = $api->gitlab_ci_ymls_template( $template_key, ); Sends a C request to C and returns the decoded response content. =cut sub gitlab_ci_ymls_template { my $self = shift; croak 'gitlab_ci_ymls_template must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($template_key) to gitlab_ci_ymls_template must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'templates/gitlab_ci_ymls/:template_key', [@_], $options ); } =back =head2 Groups See L. =over =item groups my $groups = $api->groups( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub groups { my $self = shift; croak 'groups must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to groups 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', 'groups', [@_], $options ); } =item group_subgroups my $subgroups = $api->group_subgroups( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub group_subgroups { my $self = shift; croak 'group_subgroups must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to group_subgroups must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to group_subgroups 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/subgroups', [@_], $options ); } =item group_projects my $projects = $api->group_projects( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub group_projects { my $self = shift; croak 'group_projects must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to group_projects must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to group_projects 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/projects', [@_], $options ); } =item group my $group = $api->group( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub group { my $self = shift; croak 'group must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to group must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to 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/:group_id', [@_], $options ); } =item create_group $api->create_group( \%params, ); Sends a C request to C. =cut sub create_group { my $self = shift; croak 'create_group must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to create_group must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH'; my $params = (@_ == 1) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'groups', [@_], $options ); return; } =item transfer_project_to_group $api->transfer_project_to_group( $group_id, $project_id, ); Sends a C request to C. =cut sub transfer_project_to_group { my $self = shift; croak 'transfer_project_to_group must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to transfer_project_to_group must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($project_id) to transfer_project_to_group must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'groups/:group_id/projects/:project_id', [@_], $options ); return; } =item edit_group my $group = $api->edit_group( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_group { my $self = shift; croak 'edit_group must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to edit_group must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to edit_group 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', 'groups/:group_id', [@_], $options ); } =item delete_group $api->delete_group( $group_id, ); Sends a C request to C. =cut sub delete_group { my $self = shift; croak 'delete_group must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($group_id) to delete_group must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'groups/:group_id', [@_], $options ); return; } =item sync_group_with_ldap $api->sync_group_with_ldap( $group_id, ); Sends a C request to C. =cut sub sync_group_with_ldap { my $self = shift; croak 'sync_group_with_ldap must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($group_id) to sync_group_with_ldap must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'groups/:group_id/ldap_sync', [@_], $options ); return; } =item create_ldap_group_link $api->create_ldap_group_link( $group_id, \%params, ); Sends a C request to C. =cut sub create_ldap_group_link { my $self = shift; croak 'create_ldap_group_link must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to create_ldap_group_link must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_ldap_group_link must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'groups/:group_id/ldap_group_links', [@_], $options ); return; } =item delete_ldap_group_link $api->delete_ldap_group_link( $group_id, $cn, ); Sends a C request to C. =cut sub delete_ldap_group_link { my $self = shift; croak 'delete_ldap_group_link must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to delete_ldap_group_link must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($cn) to delete_ldap_group_link must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'groups/:group_id/ldap_group_links/:cn', [@_], $options ); return; } =item delete_ldap_provider_group_link $api->delete_ldap_provider_group_link( $group_id, $provider, $cn, ); Sends a C request to C. =cut sub delete_ldap_provider_group_link { my $self = shift; croak 'delete_ldap_provider_group_link must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($group_id) to delete_ldap_provider_group_link must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($provider) to delete_ldap_provider_group_link must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($cn) to delete_ldap_provider_group_link must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'groups/:group_id/ldap_group_links/:provider/:cn', [@_], $options ); return; } =item share_group_with_group $api->share_group_with_group( $group_id, \%params, ); Sends a C request to C. =cut sub share_group_with_group { my $self = shift; croak 'share_group_with_group must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to share_group_with_group must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to share_group_with_group must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'groups/:group_id/share', [@_], $options ); return; } =item unshare_group_with_group $api->unshare_group_with_group( $group_id, $shared_with_group_id, ); Sends a C request to C. =cut sub unshare_group_with_group { my $self = shift; croak 'unshare_group_with_group must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to unshare_group_with_group must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($shared_with_group_id) to unshare_group_with_group must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'groups/:group_id/share/:shared_with_group_id', [@_], $options ); return; } =back =head2 Group access requests See L. =over =item group_access_requests my $requests = $api->group_access_requests( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub group_access_requests { my $self = shift; croak 'group_access_requests must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to group_access_requests must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to group_access_requests 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/access_requests', [@_], $options ); } =item request_group_access my $request = $api->request_group_access( $group_id, ); Sends a C request to C and returns the decoded response content. =cut sub request_group_access { my $self = shift; croak 'request_group_access must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($group_id) to request_group_access must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'POST', 'groups/:group_id/access_requests', [@_], $options ); } =item approve_group_access my $request = $api->approve_group_access( $group_id, $user_id, ); Sends a C request to C and returns the decoded response content. =cut sub approve_group_access { my $self = shift; croak 'approve_group_access must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to approve_group_access must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($user_id) to approve_group_access must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'PUT', 'groups/:group_id/access_requests/:user_id/approve', [@_], $options ); } =item deny_group_access $api->deny_group_access( $group_id, $user_id, ); Sends a C request to C. =cut sub deny_group_access { my $self = shift; croak 'deny_group_access must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to deny_group_access must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($user_id) to deny_group_access must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'groups/:group_id/access_requests/:user_id', [@_], $options ); return; } =back =head2 Group badges See L. =over =item group_badges my $badges = $api->group_badges( $group_id, ); Sends a C request to C and returns the decoded response content. =cut sub group_badges { my $self = shift; croak 'group_badges must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($group_id) to group_badges must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'groups/:group_id/badges', [@_], $options ); } =item group_badge my $badge = $api->group_badge( $group_id, $badge_id, ); Sends a C request to C and returns the decoded response content. =cut sub group_badge { my $self = shift; croak 'group_badge must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to group_badge must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($badge_id) to group_badge must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'groups/:group_id/badges/:badge_id', [@_], $options ); } =item create_group_badge my $badge = $api->create_group_badge( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_group_badge { my $self = shift; croak 'create_group_badge must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to create_group_badge must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_group_badge 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/badges', [@_], $options ); } =item edit_group_badge my $badge = $api->edit_group_badge( $group_id, $badge_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_group_badge { my $self = shift; croak 'edit_group_badge must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($group_id) to edit_group_badge must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($badge_id) to edit_group_badge must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_group_badge 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/badges/:badge_id', [@_], $options ); } =item delete_group_badge $api->delete_group_badge( $group_id, $badge_id, ); Sends a C request to C. =cut sub delete_group_badge { my $self = shift; croak 'delete_group_badge must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to delete_group_badge must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($badge_id) to delete_group_badge must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'groups/:group_id/badges/:badge_id', [@_], $options ); return; } =item preview_group_badge my $preview = $api->preview_group_badge( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub preview_group_badge { my $self = shift; croak 'preview_group_badge must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to preview_group_badge must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to preview_group_badge 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/badges/render', [@_], $options ); } =back =head2 Group members See L. =over =item group_members my $members = $api->group_members( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub group_members { my $self = shift; croak 'group_members must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to group_members must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to group_members 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/members', [@_], $options ); } =item all_group_members my $members = $api->all_group_members( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub all_group_members { my $self = shift; croak 'all_group_members must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to all_group_members must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to all_group_members 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/members/all', [@_], $options ); } =item group_member my $member = $api->group_member( $project_id, $user_id, ); Sends a C request to C and returns the decoded response content. =cut sub group_member { my $self = shift; croak 'group_member must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to group_member must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($user_id) to group_member must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'groups/:project_id/members/:user_id', [@_], $options ); } =item add_group_member my $member = $api->add_group_member( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub add_group_member { my $self = shift; croak 'add_group_member must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to add_group_member must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to add_group_member 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/members', [@_], $options ); } =item update_group_member my $member = $api->update_group_member( $group_id, $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub update_group_member { my $self = shift; croak 'update_group_member must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($group_id) to update_group_member must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($user_id) to update_group_member must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to update_group_member 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/members/:user_id', [@_], $options ); } =item remove_group_member $api->remove_group_member( $group_id, $user_id, ); Sends a C request to C. =cut sub remove_group_member { my $self = shift; croak 'remove_group_member must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to remove_group_member must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($user_id) to remove_group_member must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'groups/:group_id/members/:user_id', [@_], $options ); return; } =back =head2 Issues See L. =over =item global_issues my $issues = $api->global_issues( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub global_issues { my $self = shift; croak 'global_issues must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to global_issues 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', 'issues', [@_], $options ); } =item group_issues my $issues = $api->group_issues( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub group_issues { my $self = shift; croak 'group_issues must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to group_issues must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to group_issues 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/issues', [@_], $options ); } =item issues my $issues = $api->issues( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub issues { my $self = shift; croak 'issues must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to issues must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to issues 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/issues', [@_], $options ); } =item issue my $issue = $api->issue( $project_id, $issue_iid, ); Sends a C request to C and returns the decoded response content. =cut sub issue { my $self = shift; croak 'issue must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to issue must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to issue must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid', [@_], $options ); } =item create_issue my $issue = $api->create_issue( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_issue { my $self = shift; croak 'create_issue must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_issue must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_issue 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/issues', [@_], $options ); } =item edit_issue my $issue = $api->edit_issue( $project_id, $issue_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_issue { my $self = shift; croak 'edit_issue must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_issue must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to edit_issue must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_issue 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/issues/:issue_iid', [@_], $options ); } =item delete_issue $api->delete_issue( $project_id, $issue_iid, ); Sends a C request to C. =cut sub delete_issue { my $self = shift; croak 'delete_issue must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_issue must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to delete_issue must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/issues/:issue_iid', [@_], $options ); return; } =item move_issue my $issue = $api->move_issue( $project_id, $issue_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub move_issue { my $self = shift; croak 'move_issue must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to move_issue must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to move_issue must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to move_issue 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/move', [@_], $options ); } =item subscribe_to_issue my $issue = $api->subscribe_to_issue( $project_id, $issue_iid, ); Sends a C request to C and returns the decoded response content. =cut sub subscribe_to_issue { my $self = shift; croak 'subscribe_to_issue must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to subscribe_to_issue must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to subscribe_to_issue must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/issues/:issue_iid/subscribe', [@_], $options ); } =item unsubscribe_from_issue my $issue = $api->unsubscribe_from_issue( $project_id, $issue_iid, ); Sends a C request to C and returns the decoded response content. =cut sub unsubscribe_from_issue { my $self = shift; croak 'unsubscribe_from_issue must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to unsubscribe_from_issue must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to unsubscribe_from_issue must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/issues/:issue_iid/unsubscribe', [@_], $options ); } =item create_issue_todo my $todo = $api->create_issue_todo( $project_id, $issue_iid, ); Sends a C request to C and returns the decoded response content. =cut sub create_issue_todo { my $self = shift; croak 'create_issue_todo must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to create_issue_todo must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to create_issue_todo must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/issues/:issue_iid/todo', [@_], $options ); } =item set_issue_time_estimate my $tracking = $api->set_issue_time_estimate( $project_id, $issue_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub set_issue_time_estimate { my $self = shift; croak 'set_issue_time_estimate must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to set_issue_time_estimate must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to set_issue_time_estimate must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to set_issue_time_estimate 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/time_estimate', [@_], $options ); } =item reset_issue_time_estimate my $tracking = $api->reset_issue_time_estimate( $project_id, $issue_iid, ); Sends a C request to C and returns the decoded response content. =cut sub reset_issue_time_estimate { my $self = shift; croak 'reset_issue_time_estimate must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to reset_issue_time_estimate must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to reset_issue_time_estimate must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/issues/:issue_iid/reset_time_estimate', [@_], $options ); } =item add_issue_spent_time my $tracking = $api->add_issue_spent_time( $project_id, $issue_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub add_issue_spent_time { my $self = shift; croak 'add_issue_spent_time must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to add_issue_spent_time must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to add_issue_spent_time must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to add_issue_spent_time 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/add_spent_time', [@_], $options ); } =item reset_issue_spent_time my $tracking = $api->reset_issue_spent_time( $project_id, $issue_iid, ); Sends a C request to C and returns the decoded response content. =cut sub reset_issue_spent_time { my $self = shift; croak 'reset_issue_spent_time must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to reset_issue_spent_time must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to reset_issue_spent_time must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/issues/:issue_iid/reset_spent_time', [@_], $options ); } =item issue_time_stats my $tracking = $api->issue_time_stats( $project_id, $issue_iid, ); Sends a C request to C and returns the decoded response content. =cut sub issue_time_stats { my $self = shift; croak 'issue_time_stats must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to issue_time_stats must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to issue_time_stats must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid/time_stats', [@_], $options ); } =item issue_closed_by my $merge_requests = $api->issue_closed_by( $project_id, $issue_iid, ); Sends a C request to C and returns the decoded response content. =cut sub issue_closed_by { my $self = shift; croak 'issue_closed_by must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to issue_closed_by must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to issue_closed_by must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid/closed_by', [@_], $options ); } =item issue_user_agent_detail my $user_agent = $api->issue_user_agent_detail( $project_id, $issue_iid, ); Sends a C request to C and returns the decoded response content. =cut sub issue_user_agent_detail { my $self = shift; croak 'issue_user_agent_detail must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to issue_user_agent_detail must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to issue_user_agent_detail must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid/user_agent_detail', [@_], $options ); } =back =head2 Issue Boards See L. =over =item project_boards my $boards = $api->project_boards( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_boards { my $self = shift; croak 'project_boards must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to project_boards must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to project_boards 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/boards', [@_], $options ); } =item project_board_lists my $lists = $api->project_board_lists( $project_id, $board_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_board_lists { my $self = shift; croak 'project_board_lists must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to project_board_lists must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to project_board_lists must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to project_board_lists 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/boards/:board_id/lists', [@_], $options ); } =item project_board_list my $list = $api->project_board_list( $project_id, $board_id, $list_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_board_list { my $self = shift; croak 'project_board_list must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to project_board_list must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to project_board_list must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($list_id) to project_board_list must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/boards/:board_id/lists/:list_id', [@_], $options ); } =item create_project_board_list my $list = $api->create_project_board_list( $project_id, $board_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_project_board_list { my $self = shift; croak 'create_project_board_list must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_project_board_list must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to create_project_board_list must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_project_board_list 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/boards/:board_id/lists', [@_], $options ); } =item edit_project_board_list my $list = $api->edit_project_board_list( $project_id, $board_id, $list_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_project_board_list { my $self = shift; croak 'edit_project_board_list must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to edit_project_board_list must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to edit_project_board_list must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($list_id) to edit_project_board_list must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to edit_project_board_list 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( 'PUT', 'projects/:project_id/boards/:board_id/lists/:list_id', [@_], $options ); } =item delete_project_board_list $api->delete_project_board_list( $project_id, $board_id, $list_id, ); Sends a C request to C. =cut sub delete_project_board_list { my $self = shift; croak 'delete_project_board_list must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to delete_project_board_list must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to delete_project_board_list must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($list_id) to delete_project_board_list must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/boards/:board_id/lists/:list_id', [@_], $options ); return; } =back =head2 Group Issue Boards See L. =over =item group_boards my $boards = $api->group_boards( $group_id, ); Sends a C request to C and returns the decoded response content. =cut sub group_boards { my $self = shift; croak 'group_boards must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($group_id) to group_boards must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'groups/:group_id/boards', [@_], $options ); } =item group_board my $board = $api->group_board( $group_id, $board_id, ); Sends a C request to C and returns the decoded response content. =cut sub group_board { my $self = shift; croak 'group_board must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to group_board must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to group_board must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'groups/:group_id/boards/:board_id', [@_], $options ); } =item group_board_lists my $lists = $api->group_board_lists( $group_id, $board_id, ); Sends a C request to C and returns the decoded response content. =cut sub group_board_lists { my $self = shift; croak 'group_board_lists must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to group_board_lists must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to group_board_lists must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'groups/:group_id/boards/:board_id/lists', [@_], $options ); } =item group_board_list my $list = $api->group_board_list( $group_id, $board_id, $list_id, ); Sends a C request to C and returns the decoded response content. =cut sub group_board_list { my $self = shift; croak 'group_board_list must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($group_id) to group_board_list must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to group_board_list must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($list_id) to group_board_list must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'GET', 'groups/:group_id/boards/:board_id/lists/:list_id', [@_], $options ); } =item create_group_board_list my $list = $api->create_group_board_list( $group_id, $board_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_group_board_list { my $self = shift; croak 'create_group_board_list must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($group_id) to create_group_board_list must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to create_group_board_list must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_group_board_list 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', 'groups/:group_id/boards/:board_id/lists', [@_], $options ); } =item edit_group_board_list my $list = $api->edit_group_board_list( $group_id, $board_id, $list_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_group_board_list { my $self = shift; croak 'edit_group_board_list must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($group_id) to edit_group_board_list must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to edit_group_board_list must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($list_id) to edit_group_board_list must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to edit_group_board_list 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( 'PUT', 'groups/:group_id/boards/:board_id/lists/:list_id', [@_], $options ); } =item delete_group_board_list $api->delete_group_board_list( $group_id, $board_id, $list_id, ); Sends a C request to C. =cut sub delete_group_board_list { my $self = shift; croak 'delete_group_board_list must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($group_id) to delete_group_board_list must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($board_id) to delete_group_board_list must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($list_id) to delete_group_board_list must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'groups/:group_id/boards/:board_id/lists/:list_id', [@_], $options ); return; } =back =head2 Jobs See L. =over =item jobs my $jobs = $api->jobs( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub jobs { my $self = shift; croak 'jobs must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to jobs must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to jobs 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/jobs', [@_], $options ); } =item pipeline_jobs my $jobs = $api->pipeline_jobs( $project_id, $pipeline_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub pipeline_jobs { my $self = shift; croak 'pipeline_jobs must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to pipeline_jobs must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_id) to pipeline_jobs must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to pipeline_jobs 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/pipelines/:pipeline_id/jobs', [@_], $options ); } =item job my $job = $api->job( $project_id, $job_id, ); Sends a C request to C and returns the decoded response content. =cut sub job { my $self = shift; croak 'job must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to job must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($job_id) to job must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/jobs/:job_id', [@_], $options ); } =item job_artifacts my $artifacts = $api->job_artifacts( $project_id, $job_id, ); Sends a C request to C and returns the decoded response content. =cut sub job_artifacts { my $self = shift; croak 'job_artifacts must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to job_artifacts must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($job_id) to job_artifacts must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/jobs/:job_id/artifacts', [@_], $options ); } =item job_artifacts_archive my $archive = $api->job_artifacts_archive( $project_id, $ref_name, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub job_artifacts_archive { my $self = shift; croak 'job_artifacts_archive must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to job_artifacts_archive must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($ref_name) to job_artifacts_archive must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to job_artifacts_archive 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/jobs/artifacts/:ref_name/download', [@_], $options ); } =item job_artifacts_file my $file = $api->job_artifacts_file( $project_id, $job_id, $artifact_path, ); Sends a C request to C and returns the decoded response content. =cut sub job_artifacts_file { my $self = shift; croak 'job_artifacts_file must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to job_artifacts_file must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($job_id) to job_artifacts_file must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($artifact_path) to job_artifacts_file must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/jobs/:job_id/artifacts/:artifact_path', [@_], $options ); } =item job_trace_file my $file = $api->job_trace_file( $project_id, $job_id, ); Sends a C request to C and returns the decoded response content. =cut sub job_trace_file { my $self = shift; croak 'job_trace_file must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to job_trace_file must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($job_id) to job_trace_file must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/jobs/:job_id/trace', [@_], $options ); } =item cancel_job my $job = $api->cancel_job( $project_id, $job_id, ); Sends a C request to C and returns the decoded response content. =cut sub cancel_job { my $self = shift; croak 'cancel_job must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to cancel_job must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($job_id) to cancel_job must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/jobs/:job_id/cancel', [@_], $options ); } =item retry_job my $job = $api->retry_job( $project_id, $job_id, ); Sends a C request to C and returns the decoded response content. =cut sub retry_job { my $self = shift; croak 'retry_job must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to retry_job must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($job_id) to retry_job must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/jobs/:job_id/retry', [@_], $options ); } =item erase_job my $job = $api->erase_job( $project_id, $job_id, ); Sends a C request to C and returns the decoded response content. =cut sub erase_job { my $self = shift; croak 'erase_job must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to erase_job must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($job_id) to erase_job must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/jobs/:job_id/erase', [@_], $options ); } =item keep_job_artifacts my $job = $api->keep_job_artifacts( $project_id, $job_id, ); Sends a C request to C and returns the decoded response content. =cut sub keep_job_artifacts { my $self = shift; croak 'keep_job_artifacts must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to keep_job_artifacts must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($job_id) to keep_job_artifacts must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/jobs/:job_id/artifacts/keep', [@_], $options ); } =item play_job my $job = $api->play_job( $project_id, $job_id, ); Sends a C request to C and returns the decoded response content. =cut sub play_job { my $self = shift; croak 'play_job must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to play_job must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($job_id) to play_job must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/jobs/:job_id/play', [@_], $options ); } =back =head2 Keys See L. =over =item key my $key = $api->key( $key_id, ); Sends a C request to C and returns the decoded response content. =cut sub key { my $self = shift; croak 'key must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($key_id) to key must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'keys/:key_id', [@_], $options ); } =back =head2 Labels See L. =over =item labels my $labels = $api->labels( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub labels { my $self = shift; croak 'labels must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to labels must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to labels 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/labels', [@_], $options ); } =item create_label my $label = $api->create_label( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_label { my $self = shift; croak 'create_label must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_label must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_label 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/labels', [@_], $options ); } =item delete_label $api->delete_label( $project_id, \%params, ); Sends a C request to C. =cut sub delete_label { my $self = shift; croak 'delete_label must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to delete_label must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to delete_label must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'DELETE', 'projects/:project_id/labels', [@_], $options ); return; } =item edit_label my $label = $api->edit_label( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_label { my $self = shift; croak 'edit_label must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to edit_label must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to edit_label 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', 'projects/:project_id/labels', [@_], $options ); } =item subscribe_to_label my $label = $api->subscribe_to_label( $project_id, $label_id, ); Sends a C request to C and returns the decoded response content. =cut sub subscribe_to_label { my $self = shift; croak 'subscribe_to_label must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to subscribe_to_label must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($label_id) to subscribe_to_label must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/labels/:label_id/subscribe', [@_], $options ); } =item unsubscribe_from_label $api->unsubscribe_from_label( $project_id, $label_id, ); Sends a C request to C. =cut sub unsubscribe_from_label { my $self = shift; croak 'unsubscribe_from_label must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to unsubscribe_from_label must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($label_id) to unsubscribe_from_label must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'projects/:project_id/labels/:label_id/unsubscribe', [@_], $options ); return; } =back =head2 Markdown See L. =over =item markdown my $html = $api->markdown( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub markdown { my $self = shift; croak 'markdown must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to markdown 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', 'markdown', [@_], $options ); } =back =head2 Merge requests See L. =over =item global_merge_requests my $merge_requests = $api->global_merge_requests( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub global_merge_requests { my $self = shift; croak 'global_merge_requests must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to global_merge_requests 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', 'merge_requests', [@_], $options ); } =item merge_requests my $merge_requests = $api->merge_requests( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub merge_requests { my $self = shift; croak 'merge_requests must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to merge_requests must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to merge_requests 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/merge_requests', [@_], $options ); } =item merge_request my $merge_request = $api->merge_request( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request { my $self = shift; croak 'merge_request must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to merge_request must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_iid', [@_], $options ); } =item merge_request_commits my $commits = $api->merge_request_commits( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_commits { my $self = shift; croak 'merge_request_commits must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to merge_request_commits must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_commits must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_iid/commits', [@_], $options ); } =item merge_request_with_changes my $merge_request = $api->merge_request_with_changes( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_with_changes { my $self = shift; croak 'merge_request_with_changes must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to merge_request_with_changes must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_with_changes must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_iid/changes', [@_], $options ); } =item create_merge_request my $merge_request = $api->create_merge_request( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_merge_request { my $self = shift; croak 'create_merge_request must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_merge_request must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_merge_request 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/merge_requests', [@_], $options ); } =item edit_merge_request my $merge_request = $api->edit_merge_request( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_merge_request { my $self = shift; croak 'edit_merge_request must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_merge_request must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to edit_merge_request must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_merge_request 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/merge_requests/:merge_request_iid', [@_], $options ); } =item delete_merge_request $api->delete_merge_request( $project_id, $merge_request_iid, ); Sends a C request to C. =cut sub delete_merge_request { my $self = shift; croak 'delete_merge_request must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_merge_request must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to delete_merge_request must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/merge_requests/:merge_request_iid', [@_], $options ); return; } =item accept_merge_request my $merge_request = $api->accept_merge_request( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub accept_merge_request { my $self = shift; croak 'accept_merge_request must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to accept_merge_request must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to accept_merge_request must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to accept_merge_request 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/merge_requests/:merge_request_iid/merge', [@_], $options ); } =item approve_merge_request my $merge_request = $api->approve_merge_request( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub approve_merge_request { my $self = shift; croak 'approve_merge_request must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to approve_merge_request must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to approve_merge_request must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to approve_merge_request 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/approve', [@_], $options ); } =item unapprove_merge_request my $merge_request = $api->unapprove_merge_request( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub unapprove_merge_request { my $self = shift; croak 'unapprove_merge_request must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to unapprove_merge_request must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to unapprove_merge_request must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to unapprove_merge_request 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/unapprove', [@_], $options ); } =item cancel_merge_when_pipeline_succeeds my $merge_request = $api->cancel_merge_when_pipeline_succeeds( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub cancel_merge_when_pipeline_succeeds { my $self = shift; croak 'cancel_merge_when_pipeline_succeeds must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to cancel_merge_when_pipeline_succeeds must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to cancel_merge_when_pipeline_succeeds must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'PUT', 'projects/:project_id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds', [@_], $options ); } =item merge_request_closes_issues my $issues = $api->merge_request_closes_issues( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_closes_issues { my $self = shift; croak 'merge_request_closes_issues must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to merge_request_closes_issues must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_closes_issues must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to merge_request_closes_issues 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/closes_issues', [@_], $options ); } =item subscribe_to_merge_request my $merge_request = $api->subscribe_to_merge_request( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub subscribe_to_merge_request { my $self = shift; croak 'subscribe_to_merge_request must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to subscribe_to_merge_request must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to subscribe_to_merge_request must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/merge_requests/:merge_request_iid/subscribe', [@_], $options ); } =item unsubscribe_from_merge_request my $merge_request = $api->unsubscribe_from_merge_request( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub unsubscribe_from_merge_request { my $self = shift; croak 'unsubscribe_from_merge_request must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to unsubscribe_from_merge_request must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to unsubscribe_from_merge_request must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/merge_requests/:merge_request_iid/unsubscribe', [@_], $options ); } =item create_merge_request_todo my $todo = $api->create_merge_request_todo( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub create_merge_request_todo { my $self = shift; croak 'create_merge_request_todo must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to create_merge_request_todo must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to create_merge_request_todo must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/merge_requests/:merge_request_iid/todo', [@_], $options ); } =item merge_request_diff_versions my $versions = $api->merge_request_diff_versions( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_diff_versions { my $self = shift; croak 'merge_request_diff_versions must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to merge_request_diff_versions must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_diff_versions must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_iid/versions', [@_], $options ); } =item merge_request_diff_version my $version = $api->merge_request_diff_version( $project_id, $merge_request_iid, $version_id, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_diff_version { my $self = shift; croak 'merge_request_diff_version must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to merge_request_diff_version must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_diff_version must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($version_id) to merge_request_diff_version 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/versions/:version_id', [@_], $options ); } =item set_merge_request_time_estimate my $tracking = $api->set_merge_request_time_estimate( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub set_merge_request_time_estimate { my $self = shift; croak 'set_merge_request_time_estimate must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to set_merge_request_time_estimate must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to set_merge_request_time_estimate must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to set_merge_request_time_estimate 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/time_estimate', [@_], $options ); } =item reset_merge_request_time_estimate my $tracking = $api->reset_merge_request_time_estimate( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub reset_merge_request_time_estimate { my $self = shift; croak 'reset_merge_request_time_estimate must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to reset_merge_request_time_estimate must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to reset_merge_request_time_estimate must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/merge_requests/:merge_request_iid/reset_time_estimate', [@_], $options ); } =item add_merge_request_spent_time my $tracking = $api->add_merge_request_spent_time( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub add_merge_request_spent_time { my $self = shift; croak 'add_merge_request_spent_time must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to add_merge_request_spent_time must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to add_merge_request_spent_time must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to add_merge_request_spent_time 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/add_spent_time', [@_], $options ); } =item reset_merge_request_spent_time my $tracking = $api->reset_merge_request_spent_time( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub reset_merge_request_spent_time { my $self = shift; croak 'reset_merge_request_spent_time must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to reset_merge_request_spent_time must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to reset_merge_request_spent_time must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/merge_requests/:merge_request_iid/reset_spent_time', [@_], $options ); } =item merge_request_time_stats my $tracking = $api->merge_request_time_stats( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_time_stats { my $self = shift; croak 'merge_request_time_stats must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to merge_request_time_stats must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_time_stats must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_iid/time_stats', [@_], $options ); } =back =head2 Milestones See L. =over =item project_milestones my $milestones = $api->project_milestones( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_milestones { my $self = shift; croak 'project_milestones must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to project_milestones must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to project_milestones 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/milestones', [@_], $options ); } =item project_milestone my $milestone = $api->project_milestone( $project_id, $milestone_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_milestone { my $self = shift; croak 'project_milestone must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to project_milestone must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($milestone_id) to project_milestone must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/milestones/:milestone_id', [@_], $options ); } =item create_project_milestone my $milestone = $api->create_project_milestone( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_project_milestone { my $self = shift; croak 'create_project_milestone must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_project_milestone must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_project_milestone 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/milestones', [@_], $options ); } =item edit_project_milestone my $milestone = $api->edit_project_milestone( $project_id, $milestone_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_project_milestone { my $self = shift; croak 'edit_project_milestone must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_project_milestone must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($milestone_id) to edit_project_milestone must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_project_milestone 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/milestones/:milestone_id', [@_], $options ); } =item project_milestone_issues my $issues = $api->project_milestone_issues( $project_id, $milestone_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_milestone_issues { my $self = shift; croak 'project_milestone_issues must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to project_milestone_issues must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($milestone_id) to project_milestone_issues must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to project_milestone_issues 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/milestones/:milestone_id/issues', [@_], $options ); } =item project_milestone_merge_requests my $merge_requests = $api->project_milestone_merge_requests( $project_id, $milestone_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_milestone_merge_requests { my $self = shift; croak 'project_milestone_merge_requests must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to project_milestone_merge_requests must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($milestone_id) to project_milestone_merge_requests must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to project_milestone_merge_requests 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/milestones/:milestone_id/merge_requests', [@_], $options ); } =back =head2 Group milestones See L. =over =item group_milestones my $milestones = $api->group_milestones( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub group_milestones { my $self = shift; croak 'group_milestones must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to group_milestones must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to group_milestones 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/milestones', [@_], $options ); } =item group_milestone my $milestone = $api->group_milestone( $group_id, $milestone_id, ); Sends a C request to C and returns the decoded response content. =cut sub group_milestone { my $self = shift; croak 'group_milestone must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($group_id) to group_milestone must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($milestone_id) to group_milestone must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'groups/:group_id/milestones/:milestone_id', [@_], $options ); } =item create_group_milestone my $milestone = $api->create_group_milestone( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_group_milestone { my $self = shift; croak 'create_group_milestone must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to create_group_milestone must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_group_milestone 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/milestones', [@_], $options ); } =item edit_group_milestone my $milestone = $api->edit_group_milestone( $group_id, $milestone_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_group_milestone { my $self = shift; croak 'edit_group_milestone must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($group_id) to edit_group_milestone must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($milestone_id) to edit_group_milestone must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_group_milestone 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/milestones/:milestone_id', [@_], $options ); } =item group_milestone_issues my $issues = $api->group_milestone_issues( $group_id, $milestone_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub group_milestone_issues { my $self = shift; croak 'group_milestone_issues must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($group_id) to group_milestone_issues must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($milestone_id) to group_milestone_issues must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to group_milestone_issues 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', 'groups/:group_id/milestones/:milestone_id/issues', [@_], $options ); } =item group_milestone_merge_requests my $merge_requests = $api->group_milestone_merge_requests( $group_id, $milestone_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub group_milestone_merge_requests { my $self = shift; croak 'group_milestone_merge_requests must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($group_id) to group_milestone_merge_requests must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($milestone_id) to group_milestone_merge_requests must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to group_milestone_merge_requests 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', 'groups/:group_id/milestones/:milestone_id/merge_requests', [@_], $options ); } =back =head2 Namespaces See L. =over =item namespaces my $namespaces = $api->namespaces( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub namespaces { my $self = shift; croak 'namespaces must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to namespaces 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', 'namespaces', [@_], $options ); } =item namespace my $namespace = $api->namespace( $namespace_id, ); Sends a C request to C and returns the decoded response content. =cut sub namespace { my $self = shift; croak 'namespace must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($namespace_id) to namespace must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'namespaces/:namespace_id', [@_], $options ); } =back =head2 Notes See L. =over =item issue_notes my $notes = $api->issue_notes( $project_id, $issue_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub issue_notes { my $self = shift; croak 'issue_notes must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to issue_notes must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to issue_notes must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to issue_notes 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/notes', [@_], $options ); } =item issue_note my $note = $api->issue_note( $project_id, $issue_iid, $note_id, ); Sends a C request to C and returns the decoded response content. =cut sub issue_note { my $self = shift; croak 'issue_note must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to issue_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to issue_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($note_id) to issue_note 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', [@_], $options ); } =item create_issue_note my $note = $api->create_issue_note( $project_id, $issue_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_issue_note { my $self = shift; croak 'create_issue_note must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_issue_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to create_issue_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_issue_note 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/notes', [@_], $options ); } =item edit_issue_note $api->edit_issue_note( $project_id, $issue_iid, $note_id, \%params, ); Sends a C request to C. =cut sub edit_issue_note { my $self = shift; croak 'edit_issue_note must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to edit_issue_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to edit_issue_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($note_id) to edit_issue_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to edit_issue_note must be a hash ref' if defined($_[3]) and ref($_[3]) ne 'HASH'; my $params = (@_ == 4) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'projects/:project_id/issues/:issue_iid/notes/:note_id', [@_], $options ); return; } =item delete_issue_note $api->delete_issue_note( $project_id, $issue_iid, $note_id, ); Sends a C request to C. =cut sub delete_issue_note { my $self = shift; croak 'delete_issue_note must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to delete_issue_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to delete_issue_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($note_id) to delete_issue_note must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/issues/:issue_iid/notes/:note_id', [@_], $options ); return; } =item snippet_notes my $notes = $api->snippet_notes( $project_id, $snippet_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub snippet_notes { my $self = shift; croak 'snippet_notes must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to snippet_notes must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to snippet_notes must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to snippet_notes 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/snippets/:snippet_id/notes', [@_], $options ); } =item snippet_note my $note = $api->snippet_note( $project_id, $snippet_id, $note_id, ); Sends a C request to C and returns the decoded response content. =cut sub snippet_note { my $self = shift; croak 'snippet_note must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to snippet_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to snippet_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($note_id) to snippet_note must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/snippets/:snippet_id/notes/:note_id', [@_], $options ); } =item create_snippet_note my $note = $api->create_snippet_note( $project_id, $snippet_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_snippet_note { my $self = shift; croak 'create_snippet_note must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_snippet_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to create_snippet_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_snippet_note 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/snippets/:snippet_id/notes', [@_], $options ); } =item edit_snippet_note $api->edit_snippet_note( $project_id, $snippet_id, $note_id, \%params, ); Sends a C request to C. =cut sub edit_snippet_note { my $self = shift; croak 'edit_snippet_note must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to edit_snippet_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to edit_snippet_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($note_id) to edit_snippet_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to edit_snippet_note must be a hash ref' if defined($_[3]) and ref($_[3]) ne 'HASH'; my $params = (@_ == 4) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'projects/:project_id/snippets/:snippet_id/notes/:note_id', [@_], $options ); return; } =item delete_snippet_note $api->delete_snippet_note( $project_id, $snippet_id, $note_id, ); Sends a C request to C. =cut sub delete_snippet_note { my $self = shift; croak 'delete_snippet_note must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to delete_snippet_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to delete_snippet_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($note_id) to delete_snippet_note must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/snippets/:snippet_id/notes/:note_id', [@_], $options ); return; } =item merge_request_notes my $notes = $api->merge_request_notes( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_notes { my $self = shift; croak 'merge_request_notes must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to merge_request_notes must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_notes must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to merge_request_notes 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/notes', [@_], $options ); } =item merge_request_note my $note = $api->merge_request_note( $project_id, $merge_request_iid, $note_id, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_note { my $self = shift; croak 'merge_request_note must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to merge_request_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($note_id) to merge_request_note 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', [@_], $options ); } =item create_merge_request_note my $note = $api->create_merge_request_note( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_merge_request_note { my $self = shift; croak 'create_merge_request_note must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_merge_request_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to create_merge_request_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_merge_request_note 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/notes', [@_], $options ); } =item edit_merge_request_note $api->edit_merge_request_note( $project_id, $merge_request_iid, $note_id, \%params, ); Sends a C request to C. =cut sub edit_merge_request_note { my $self = shift; croak 'edit_merge_request_note must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to edit_merge_request_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to edit_merge_request_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($note_id) to edit_merge_request_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to edit_merge_request_note must be a hash ref' if defined($_[3]) and ref($_[3]) ne 'HASH'; my $params = (@_ == 4) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id', [@_], $options ); return; } =item delete_merge_request_note $api->delete_merge_request_note( $project_id, $merge_request_iid, $note_id, ); Sends a C request to C. =cut sub delete_merge_request_note { my $self = shift; croak 'delete_merge_request_note must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to delete_merge_request_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to delete_merge_request_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($note_id) to delete_merge_request_note must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/merge_requests/:merge_request_iid/notes/:note_id', [@_], $options ); return; } =back =head2 Discussions See L. =over =item issue_discussions my $discussions = $api->issue_discussions( $project_id, $issue_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub issue_discussions { my $self = shift; croak 'issue_discussions must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to issue_discussions must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to issue_discussions must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to issue_discussions 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/discussions', [@_], $options ); } =item issue_discussion my $discussion = $api->issue_discussion( $project_id, $issue_iid, $discussion_id, ); Sends a C request to C and returns the decoded response content. =cut sub issue_discussion { my $self = shift; croak 'issue_discussion must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to issue_discussion must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to issue_discussion must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to issue_discussion must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid/discussions/:discussion_id', [@_], $options ); } =item create_issue_discussion my $discussion = $api->create_issue_discussion( $project_id, $issue_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_issue_discussion { my $self = shift; croak 'create_issue_discussion must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_issue_discussion must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to create_issue_discussion must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_issue_discussion 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/discussions', [@_], $options ); } =item create_issue_discussion_note $api->create_issue_discussion_note( $project_id, $issue_iid, $discussion_id, \%params, ); Sends a C request to C. =cut sub create_issue_discussion_note { my $self = shift; croak 'create_issue_discussion_note must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to create_issue_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to create_issue_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to create_issue_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to create_issue_discussion_note must be a hash ref' if defined($_[3]) and ref($_[3]) ne 'HASH'; my $params = (@_ == 4) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes', [@_], $options ); return; } =item edit_issue_discussion_note $api->edit_issue_discussion_note( $project_id, $issue_iid, $discussion_id, $note_id, \%params, ); Sends a C request to C. =cut sub edit_issue_discussion_note { my $self = shift; croak 'edit_issue_discussion_note must be called with 4 to 5 arguments' if @_ < 4 or @_ > 5; croak 'The #1 argument ($project_id) to edit_issue_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to edit_issue_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to edit_issue_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The #4 argument ($note_id) to edit_issue_discussion_note must be a scalar' if ref($_[3]) or (!defined $_[3]); croak 'The last argument (\%params) to edit_issue_discussion_note must be a hash ref' if defined($_[4]) and ref($_[4]) ne 'HASH'; my $params = (@_ == 5) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id', [@_], $options ); return; } =item delete_issue_discussion_note $api->delete_issue_discussion_note( $project_id, $issue_iid, $discussion_id, $note_id, ); Sends a C request to C. =cut sub delete_issue_discussion_note { my $self = shift; croak 'delete_issue_discussion_note must be called with 4 arguments' if @_ != 4; croak 'The #1 argument ($project_id) to delete_issue_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to delete_issue_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to delete_issue_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The #4 argument ($note_id) to delete_issue_discussion_note must be a scalar' if ref($_[3]) or (!defined $_[3]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id', [@_], $options ); return; } =item project_snippet_discussions my $discussions = $api->project_snippet_discussions( $project_id, $snippet_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_snippet_discussions { my $self = shift; croak 'project_snippet_discussions must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to project_snippet_discussions must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to project_snippet_discussions must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to project_snippet_discussions 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/snippets/:snippet_id/discussions', [@_], $options ); } =item project_snippet_discussion my $discussion = $api->project_snippet_discussion( $project_id, $snippet_id, $discussion_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_snippet_discussion { my $self = shift; croak 'project_snippet_discussion must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to project_snippet_discussion must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to project_snippet_discussion must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to project_snippet_discussion must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/snippets/:snippet_id/discussions/:discussion_id', [@_], $options ); } =item create_project_snippet_discussion my $discussion = $api->create_project_snippet_discussion( $project_id, $snippet_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_project_snippet_discussion { my $self = shift; croak 'create_project_snippet_discussion must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_project_snippet_discussion must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to create_project_snippet_discussion must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_project_snippet_discussion 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/snippets/:snippet_id/discussions', [@_], $options ); } =item create_project_snippet_discussion_note $api->create_project_snippet_discussion_note( $project_id, $snippet_id, $discussion_id, \%params, ); Sends a C request to C. =cut sub create_project_snippet_discussion_note { my $self = shift; croak 'create_project_snippet_discussion_note must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to create_project_snippet_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to create_project_snippet_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to create_project_snippet_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to create_project_snippet_discussion_note must be a hash ref' if defined($_[3]) and ref($_[3]) ne 'HASH'; my $params = (@_ == 4) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes', [@_], $options ); return; } =item edit_project_snippet_discussion_note $api->edit_project_snippet_discussion_note( $project_id, $snippet_id, $discussion_id, $note_id, \%params, ); Sends a C request to C. =cut sub edit_project_snippet_discussion_note { my $self = shift; croak 'edit_project_snippet_discussion_note must be called with 4 to 5 arguments' if @_ < 4 or @_ > 5; croak 'The #1 argument ($project_id) to edit_project_snippet_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to edit_project_snippet_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to edit_project_snippet_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The #4 argument ($note_id) to edit_project_snippet_discussion_note must be a scalar' if ref($_[3]) or (!defined $_[3]); croak 'The last argument (\%params) to edit_project_snippet_discussion_note must be a hash ref' if defined($_[4]) and ref($_[4]) ne 'HASH'; my $params = (@_ == 5) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id', [@_], $options ); return; } =item delete_project_snippet_discussion_note $api->delete_project_snippet_discussion_note( $project_id, $snippet_id, $discussion_id, $note_id, ); Sends a C request to C. =cut sub delete_project_snippet_discussion_note { my $self = shift; croak 'delete_project_snippet_discussion_note must be called with 4 arguments' if @_ != 4; croak 'The #1 argument ($project_id) to delete_project_snippet_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to delete_project_snippet_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to delete_project_snippet_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The #4 argument ($note_id) to delete_project_snippet_discussion_note must be a scalar' if ref($_[3]) or (!defined $_[3]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id', [@_], $options ); return; } =item merge_request_discussions my $discussions = $api->merge_request_discussions( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_discussions { my $self = shift; croak 'merge_request_discussions must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to merge_request_discussions must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_discussions must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to merge_request_discussions 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/discussions', [@_], $options ); } =item merge_request_discussion my $discussion = $api->merge_request_discussion( $project_id, $merge_request_iid, $discussion_id, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_discussion { my $self = shift; croak 'merge_request_discussion must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to merge_request_discussion must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_discussion must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to merge_request_discussion 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/discussions/:discussion_id', [@_], $options ); } =item create_merge_request_discussion my $discussion = $api->create_merge_request_discussion( $project_id, $merge_request_iid, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_merge_request_discussion { my $self = shift; croak 'create_merge_request_discussion must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_merge_request_discussion must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to create_merge_request_discussion must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_merge_request_discussion 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/discussions', [@_], $options ); } =item resolve_merge_request_discussion $api->resolve_merge_request_discussion( $project_id, $merge_request_iid, $discussion_id, \%params, ); Sends a C request to C. =cut sub resolve_merge_request_discussion { my $self = shift; croak 'resolve_merge_request_discussion must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to resolve_merge_request_discussion must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to resolve_merge_request_discussion must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to resolve_merge_request_discussion must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to resolve_merge_request_discussion must be a hash ref' if defined($_[3]) and ref($_[3]) ne 'HASH'; my $params = (@_ == 4) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id', [@_], $options ); return; } =item create_merge_request_discussion_note $api->create_merge_request_discussion_note( $project_id, $merge_request_iid, $discussion_id, \%params, ); Sends a C request to C. =cut sub create_merge_request_discussion_note { my $self = shift; croak 'create_merge_request_discussion_note must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to create_merge_request_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to create_merge_request_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to create_merge_request_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to create_merge_request_discussion_note must be a hash ref' if defined($_[3]) and ref($_[3]) ne 'HASH'; my $params = (@_ == 4) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes', [@_], $options ); return; } =item edit_merge_request_discussion_note $api->edit_merge_request_discussion_note( $project_id, $merge_request_iid, $discussion_id, $note_id, \%params, ); Sends a C request to C. =cut sub edit_merge_request_discussion_note { my $self = shift; croak 'edit_merge_request_discussion_note must be called with 4 to 5 arguments' if @_ < 4 or @_ > 5; croak 'The #1 argument ($project_id) to edit_merge_request_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to edit_merge_request_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to edit_merge_request_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The #4 argument ($note_id) to edit_merge_request_discussion_note must be a scalar' if ref($_[3]) or (!defined $_[3]); croak 'The last argument (\%params) to edit_merge_request_discussion_note must be a hash ref' if defined($_[4]) and ref($_[4]) ne 'HASH'; my $params = (@_ == 5) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id', [@_], $options ); return; } =item delete_merge_request_discussion_note $api->delete_merge_request_discussion_note( $project_id, $merge_request_iid, $discussion_id, $note_id, ); Sends a C request to C. =cut sub delete_merge_request_discussion_note { my $self = shift; croak 'delete_merge_request_discussion_note must be called with 4 arguments' if @_ != 4; croak 'The #1 argument ($project_id) to delete_merge_request_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to delete_merge_request_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to delete_merge_request_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The #4 argument ($note_id) to delete_merge_request_discussion_note must be a scalar' if ref($_[3]) or (!defined $_[3]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id', [@_], $options ); return; } =item commit_discussions my $discussions = $api->commit_discussions( $project_id, $commit_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub commit_discussions { my $self = shift; croak 'commit_discussions must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to commit_discussions must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($commit_id) to commit_discussions must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to commit_discussions 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/commits/:commit_id/discussions', [@_], $options ); } =item commit_discussion my $discussion = $api->commit_discussion( $project_id, $commit_id, $discussion_id, ); Sends a C request to C and returns the decoded response content. =cut sub commit_discussion { my $self = shift; croak 'commit_discussion must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to commit_discussion must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($commit_id) to commit_discussion must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to commit_discussion must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/commits/:commit_id/discussions/:discussion_id', [@_], $options ); } =item create_commit_discussion my $discussion = $api->create_commit_discussion( $project_id, $commit_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_commit_discussion { my $self = shift; croak 'create_commit_discussion must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_commit_discussion must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($commit_id) to create_commit_discussion must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_commit_discussion 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/commits/:commit_id/discussions', [@_], $options ); } =item create_commit_discussion_note $api->create_commit_discussion_note( $project_id, $commit_id, $discussion_id, \%params, ); Sends a C request to C. =cut sub create_commit_discussion_note { my $self = shift; croak 'create_commit_discussion_note must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to create_commit_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($commit_id) to create_commit_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to create_commit_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to create_commit_discussion_note must be a hash ref' if defined($_[3]) and ref($_[3]) ne 'HASH'; my $params = (@_ == 4) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes', [@_], $options ); return; } =item edit_commit_discussion_note $api->edit_commit_discussion_note( $project_id, $commit_id, $discussion_id, $note_id, \%params, ); Sends a C request to C. =cut sub edit_commit_discussion_note { my $self = shift; croak 'edit_commit_discussion_note must be called with 4 to 5 arguments' if @_ < 4 or @_ > 5; croak 'The #1 argument ($project_id) to edit_commit_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($commit_id) to edit_commit_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to edit_commit_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The #4 argument ($note_id) to edit_commit_discussion_note must be a scalar' if ref($_[3]) or (!defined $_[3]); croak 'The last argument (\%params) to edit_commit_discussion_note must be a hash ref' if defined($_[4]) and ref($_[4]) ne 'HASH'; my $params = (@_ == 5) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes/:note_id', [@_], $options ); return; } =item delete_commit_discussion_note $api->delete_commit_discussion_note( $project_id, $commit_id, $discussion_id, $note_id, ); Sends a C request to C. =cut sub delete_commit_discussion_note { my $self = shift; croak 'delete_commit_discussion_note must be called with 4 arguments' if @_ != 4; croak 'The #1 argument ($project_id) to delete_commit_discussion_note must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($commit_id) to delete_commit_discussion_note must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($discussion_id) to delete_commit_discussion_note must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The #4 argument ($note_id) to delete_commit_discussion_note must be a scalar' if ref($_[3]) or (!defined $_[3]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/commits/:commit_id/discussions/:discussion_id/notes/:note_id', [@_], $options ); return; } =back =head2 Resource label events See L. =over =item issue_resource_label_events my $events = $api->issue_resource_label_events( $project_id, $issue_iid, ); Sends a C request to C and returns the decoded response content. =cut sub issue_resource_label_events { my $self = shift; croak 'issue_resource_label_events must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to issue_resource_label_events must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to issue_resource_label_events must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid/resource_label_events', [@_], $options ); } =item issue_resource_label_event my $event = $api->issue_resource_label_event( $project_id, $issue_iid, $resource_label_event_id, ); Sends a C request to C and returns the decoded response content. =cut sub issue_resource_label_event { my $self = shift; croak 'issue_resource_label_event must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to issue_resource_label_event must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($issue_iid) to issue_resource_label_event must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($resource_label_event_id) to issue_resource_label_event must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/issues/:issue_iid/resource_label_events/:resource_label_event_id', [@_], $options ); } =item merge_request_resource_label_events my $events = $api->merge_request_resource_label_events( $project_id, $merge_request_iid, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_resource_label_events { my $self = shift; croak 'merge_request_resource_label_events must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to merge_request_resource_label_events must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_resource_label_events must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/merge_requests/:merge_request_iid/resource_label_events', [@_], $options ); } =item merge_request_resource_label_event my $event = $api->merge_request_resource_label_event( $project_id, $merge_request_iid, $resource_label_event_id, ); Sends a C request to C and returns the decoded response content. =cut sub merge_request_resource_label_event { my $self = shift; croak 'merge_request_resource_label_event must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to merge_request_resource_label_event must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($merge_request_iid) to merge_request_resource_label_event must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($resource_label_event_id) to merge_request_resource_label_event 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/resource_label_events/:resource_label_event_id', [@_], $options ); } =back =head2 Notification settings See L. =over =item global_notification_settings my $settings = $api->global_notification_settings(); Sends a C request to C and returns the decoded response content. =cut sub global_notification_settings { my $self = shift; croak "The global_notification_settings method does not take any arguments" if @_; my $options = {}; return $self->_call_rest_client( 'GET', 'notification_settings', [@_], $options ); } =item set_global_notification_settings my $settings = $api->set_global_notification_settings( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub set_global_notification_settings { my $self = shift; croak 'set_global_notification_settings must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to set_global_notification_settings 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( 'PUT', 'notification_settings', [@_], $options ); } =item group_notification_settings my $settings = $api->group_notification_settings( $group_id, ); Sends a C request to C and returns the decoded response content. =cut sub group_notification_settings { my $self = shift; croak 'group_notification_settings must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($group_id) to group_notification_settings must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'groups/:group_id/notification_settings', [@_], $options ); } =item project_notification_settings my $settings = $api->project_notification_settings( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_notification_settings { my $self = shift; croak 'project_notification_settings must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to project_notification_settings must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/notification_settings', [@_], $options ); } =item set_group_notification_settings my $settings = $api->set_group_notification_settings( $group_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub set_group_notification_settings { my $self = shift; croak 'set_group_notification_settings must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($group_id) to set_group_notification_settings must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to set_group_notification_settings 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', 'groups/:group_id/notification_settings', [@_], $options ); } =item set_project_notification_settings my $settings = $api->set_project_notification_settings( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub set_project_notification_settings { my $self = shift; croak 'set_project_notification_settings must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to set_project_notification_settings must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to set_project_notification_settings 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', 'projects/:project_id/notification_settings', [@_], $options ); } =back =head2 Licenses See L. =over =item license_templates my $templates = $api->license_templates( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub license_templates { my $self = shift; croak 'license_templates must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to license_templates 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', 'templates/licenses', [@_], $options ); } =item license_template my $template = $api->license_template( $template_key, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub license_template { my $self = shift; croak 'license_template must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($template_key) to license_template must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to license_template 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', 'templates/licenses/:template_key', [@_], $options ); } =back =head2 Pages domains See L. =over =item global_pages_domains my $domains = $api->global_pages_domains( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub global_pages_domains { my $self = shift; croak 'global_pages_domains must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to global_pages_domains 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', 'pages/domains', [@_], $options ); } =item pages_domains my $domains = $api->pages_domains( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub pages_domains { my $self = shift; croak 'pages_domains must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to pages_domains must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to pages_domains 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/pages/domains', [@_], $options ); } =item pages_domain my $domain = $api->pages_domain( $project_id, $domain, ); Sends a C request to C and returns the decoded response content. =cut sub pages_domain { my $self = shift; croak 'pages_domain must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to pages_domain must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($domain) to pages_domain must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/pages/domains/:domain', [@_], $options ); } =item create_pages_domain my $domain = $api->create_pages_domain( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_pages_domain { my $self = shift; croak 'create_pages_domain must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_pages_domain must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_pages_domain 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/pages/domains', [@_], $options ); } =item edit_pages_domain my $domain = $api->edit_pages_domain( $project_id, $domain, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_pages_domain { my $self = shift; croak 'edit_pages_domain must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_pages_domain must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($domain) to edit_pages_domain must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_pages_domain 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/pages/domains/:domain', [@_], $options ); } =item delete_pages_domain $api->delete_pages_domain( $project_id, $domain, ); Sends a C request to C. =cut sub delete_pages_domain { my $self = shift; croak 'delete_pages_domain must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_pages_domain must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($domain) to delete_pages_domain must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/pages/domains/:domain', [@_], $options ); return; } =back =head2 Pipelines See L. =over =item pipelines my $pipelines = $api->pipelines( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub pipelines { my $self = shift; croak 'pipelines must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to pipelines must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to pipelines 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/pipelines', [@_], $options ); } =item pipeline my $pipeline = $api->pipeline( $project_id, $pipeline_id, ); Sends a C request to C and returns the decoded response content. =cut sub pipeline { my $self = shift; croak 'pipeline must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to pipeline must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_id) to pipeline must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/pipelines/:pipeline_id', [@_], $options ); } =item create_pipeline my $pipeline = $api->create_pipeline( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. 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' }, ], }, ); =cut sub create_pipeline { my $self = shift; croak 'create_pipeline must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_pipeline must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_pipeline 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/pipeline', [@_], $options ); } =item retry_pipeline_jobs my $pipeline = $api->retry_pipeline_jobs( $project_id, $pipeline_id, ); Sends a C request to C and returns the decoded response content. =cut sub retry_pipeline_jobs { my $self = shift; croak 'retry_pipeline_jobs must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to retry_pipeline_jobs must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_id) to retry_pipeline_jobs must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/pipelines/:pipeline_id/retry', [@_], $options ); } =item cancel_pipeline_jobs my $pipeline = $api->cancel_pipeline_jobs( $project_id, $pipeline_id, ); Sends a C request to C and returns the decoded response content. =cut sub cancel_pipeline_jobs { my $self = shift; croak 'cancel_pipeline_jobs must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to cancel_pipeline_jobs must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_id) to cancel_pipeline_jobs must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/pipelines/:pipeline_id/cancel', [@_], $options ); } =item delete_pipeline $api->delete_pipeline( $project_id, $pipeline_id, ); Sends a C request to C. =cut sub delete_pipeline { my $self = shift; croak 'delete_pipeline must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_pipeline must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_id) to delete_pipeline must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/pipelines/:pipeline_id', [@_], $options ); return; } =back =head2 Pipeline triggers See L. =over =item triggers my $triggers = $api->triggers( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub triggers { my $self = shift; croak 'triggers must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to triggers must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to triggers 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/triggers', [@_], $options ); } =item trigger my $trigger = $api->trigger( $project_id, $trigger_id, ); Sends a C request to C and returns the decoded response content. =cut sub trigger { my $self = shift; croak 'trigger must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to trigger must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($trigger_id) to trigger must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/triggers/:trigger_id', [@_], $options ); } =item create_trigger my $trigger = $api->create_trigger( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_trigger { my $self = shift; croak 'create_trigger must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_trigger must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_trigger 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/triggers', [@_], $options ); } =item edit_trigger my $trigger = $api->edit_trigger( $project_id, $trigger_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_trigger { my $self = shift; croak 'edit_trigger must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_trigger must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($trigger_id) to edit_trigger must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_trigger 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/triggers/:trigger_id', [@_], $options ); } =item take_ownership_of_trigger my $trigger = $api->take_ownership_of_trigger( $project_id, $trigger_id, ); Sends a C request to C and returns the decoded response content. =cut sub take_ownership_of_trigger { my $self = shift; croak 'take_ownership_of_trigger must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to take_ownership_of_trigger must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($trigger_id) to take_ownership_of_trigger must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/triggers/:trigger_id/take_ownership', [@_], $options ); } =item delete_trigger $api->delete_trigger( $project_id, $trigger_id, ); Sends a C request to C. =cut sub delete_trigger { my $self = shift; croak 'delete_trigger must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_trigger must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($trigger_id) to delete_trigger must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/triggers/:trigger_id', [@_], $options ); return; } =item trigger_pipeline my $pipeline = $api->trigger_pipeline( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. 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. =cut sub trigger_pipeline { my $self = shift; croak 'trigger_pipeline must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to trigger_pipeline must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to trigger_pipeline 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/trigger/pipeline', [@_], $options ); } =back =head2 Pipeline schedules See L. =over =item pipeline_schedules my $schedules = $api->pipeline_schedules( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub pipeline_schedules { my $self = shift; croak 'pipeline_schedules must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to pipeline_schedules must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to pipeline_schedules 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/pipeline_schedules', [@_], $options ); } =item pipeline_schedule my $schedule = $api->pipeline_schedule( $project_id, $pipeline_schedule_id, ); Sends a C request to C and returns the decoded response content. =cut sub pipeline_schedule { my $self = shift; croak 'pipeline_schedule must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to pipeline_schedule must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_schedule_id) to pipeline_schedule must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/pipeline_schedules/:pipeline_schedule_id', [@_], $options ); } =item create_pipeline_schedule my $schedule = $api->create_pipeline_schedule( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_pipeline_schedule { my $self = shift; croak 'create_pipeline_schedule must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_pipeline_schedule must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_pipeline_schedule 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/pipeline_schedules', [@_], $options ); } =item edit_pipeline_schedule my $schedule = $api->edit_pipeline_schedule( $project_id, $pipeline_schedule_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_pipeline_schedule { my $self = shift; croak 'edit_pipeline_schedule must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_pipeline_schedule must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_schedule_id) to edit_pipeline_schedule must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_pipeline_schedule 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/pipeline_schedules/:pipeline_schedule_id', [@_], $options ); } =item take_ownership_of_pipeline_schedule my $schedule = $api->take_ownership_of_pipeline_schedule( $project_id, $pipeline_schedule_id, ); Sends a C request to C and returns the decoded response content. =cut sub take_ownership_of_pipeline_schedule { my $self = shift; croak 'take_ownership_of_pipeline_schedule must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to take_ownership_of_pipeline_schedule must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_schedule_id) to take_ownership_of_pipeline_schedule must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/pipeline_schedules/:pipeline_schedule_id/take_ownership', [@_], $options ); } =item run_pipeline_schedule my $variable = $api->run_pipeline_schedule( $project_id, $pipeline_schedule_id, ); Sends a C request to C and returns the decoded response content. =cut sub run_pipeline_schedule { my $self = shift; croak 'run_pipeline_schedule must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to run_pipeline_schedule must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_schedule_id) to run_pipeline_schedule must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/pipeline_schedules/:pipeline_schedule_id/play', [@_], $options ); } =item delete_pipeline_schedule my $schedule = $api->delete_pipeline_schedule( $project_id, $pipeline_schedule_id, ); Sends a C request to C and returns the decoded response content. =cut sub delete_pipeline_schedule { my $self = shift; croak 'delete_pipeline_schedule must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_pipeline_schedule must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_schedule_id) to delete_pipeline_schedule must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'DELETE', 'projects/:project_id/pipeline_schedules/:pipeline_schedule_id', [@_], $options ); } =item create_pipeline_schedule_variable my $variable = $api->create_pipeline_schedule_variable( $project_id, $pipeline_schedule_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_pipeline_schedule_variable { my $self = shift; croak 'create_pipeline_schedule_variable must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_pipeline_schedule_variable must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_schedule_id) to create_pipeline_schedule_variable must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_pipeline_schedule_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( 'POST', 'projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables', [@_], $options ); } =item edit_pipeline_schedule_variable my $variable = $api->edit_pipeline_schedule_variable( $project_id, $pipeline_schedule_id, $variable_key, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_pipeline_schedule_variable { my $self = shift; croak 'edit_pipeline_schedule_variable must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to edit_pipeline_schedule_variable must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_schedule_id) to edit_pipeline_schedule_variable must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($variable_key) to edit_pipeline_schedule_variable must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to edit_pipeline_schedule_variable 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( 'PUT', 'projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables/:variable_key', [@_], $options ); } =item delete_pipeline_schedule_variable my $variable = $api->delete_pipeline_schedule_variable( $project_id, $pipeline_schedule_id, $variable_key, ); Sends a C request to C and returns the decoded response content. =cut sub delete_pipeline_schedule_variable { my $self = shift; croak 'delete_pipeline_schedule_variable must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to delete_pipeline_schedule_variable must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($pipeline_schedule_id) to delete_pipeline_schedule_variable must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($variable_key) to delete_pipeline_schedule_variable must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'DELETE', 'projects/:project_id/pipeline_schedules/:pipeline_schedule_id/variables/:variable_key', [@_], $options ); } =back =head2 Projects See L. =over =item projects my $projects = $api->projects( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub projects { my $self = shift; croak 'projects must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to projects 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', 'projects', [@_], $options ); } =item user_projects my $projects = $api->user_projects( $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub user_projects { my $self = shift; croak 'user_projects must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to user_projects must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to user_projects 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', 'users/:user_id/projects', [@_], $options ); } =item project my $project = $api->project( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project { my $self = shift; croak 'project must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to project must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to 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', [@_], $options ); } =item project_users my $users = $api->project_users( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_users { my $self = shift; croak 'project_users must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to project_users must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to project_users 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/users', [@_], $options ); } =item create_project my $project = $api->create_project( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_project { my $self = shift; croak 'create_project must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to create_project 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', 'projects', [@_], $options ); } =item create_project_for_user $api->create_project_for_user( $user_id, \%params, ); Sends a C request to C. =cut sub create_project_for_user { my $self = shift; croak 'create_project_for_user must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to create_project_for_user must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_project_for_user must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'projects/user/:user_id', [@_], $options ); return; } =item edit_project $api->edit_project( $project_id, \%params, ); Sends a C request to C. =cut sub edit_project { my $self = shift; croak 'edit_project must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to edit_project must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to edit_project must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'projects/:project_id', [@_], $options ); return; } =item fork_project $api->fork_project( $project_id, \%params, ); Sends a C request to C. =cut sub fork_project { my $self = shift; croak 'fork_project must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to fork_project must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to fork_project must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'projects/:project_id/fork', [@_], $options ); return; } =item project_forks my $forks = $api->project_forks( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_forks { my $self = shift; croak 'project_forks must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to project_forks must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to project_forks 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/forks', [@_], $options ); } =item start_project my $project = $api->start_project( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub start_project { my $self = shift; croak 'start_project must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to start_project must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/star', [@_], $options ); } =item unstar_project my $project = $api->unstar_project( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub unstar_project { my $self = shift; croak 'unstar_project must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to unstar_project must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/unstar', [@_], $options ); } =item project_languages my $languages = $api->project_languages( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_languages { my $self = shift; croak 'project_languages must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to project_languages must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/languages', [@_], $options ); } =item archive_project my $project = $api->archive_project( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub archive_project { my $self = shift; croak 'archive_project must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to archive_project must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/archive', [@_], $options ); } =item unarchive_project my $project = $api->unarchive_project( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub unarchive_project { my $self = shift; croak 'unarchive_project must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to unarchive_project must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/unarchive', [@_], $options ); } =item delete_project $api->delete_project( $project_id, ); Sends a C request to C. =cut sub delete_project { my $self = shift; croak 'delete_project must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to delete_project must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id', [@_], $options ); return; } =item upload_file_to_project my $upload = $api->upload_file_to_project( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. The C parameter must point to a readable file on the local filesystem. =cut sub upload_file_to_project { my $self = shift; croak 'upload_file_to_project must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to upload_file_to_project must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to upload_file_to_project 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/uploads', [@_], $options ); } =item share_project_with_group $api->share_project_with_group( $project_id, \%params, ); Sends a C request to C. =cut sub share_project_with_group { my $self = shift; croak 'share_project_with_group must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to share_project_with_group must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to share_project_with_group must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'projects/:project_id/share', [@_], $options ); return; } =item unshare_project_with_group $api->unshare_project_with_group( $project_id, $group_id, ); Sends a C request to C. =cut sub unshare_project_with_group { my $self = shift; croak 'unshare_project_with_group must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to unshare_project_with_group must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($group_id) to unshare_project_with_group must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/share/:group_id', [@_], $options ); return; } =item project_hooks my $hooks = $api->project_hooks( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_hooks { my $self = shift; croak 'project_hooks must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to project_hooks must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/hooks', [@_], $options ); } =item project_hook my $hook = $api->project_hook( $project_id, $hook_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_hook { my $self = shift; croak 'project_hook must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to project_hook must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($hook_id) to project_hook must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/hooks/:hook_id', [@_], $options ); } =item create_project_hook my $hook = $api->create_project_hook( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_project_hook { my $self = shift; croak 'create_project_hook must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_project_hook must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_project_hook 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/hooks', [@_], $options ); } =item edit_project_hook my $hook = $api->edit_project_hook( $project_id, $hook_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_project_hook { my $self = shift; croak 'edit_project_hook must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_project_hook must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($hook_id) to edit_project_hook must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_project_hook 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/hooks/:hook_id', [@_], $options ); } =item delete_project_hook $api->delete_project_hook( $project_id, $hook_id, ); Sends a C request to C. =cut sub delete_project_hook { my $self = shift; croak 'delete_project_hook must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_project_hook must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($hook_id) to delete_project_hook must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/hooks/:hook_id', [@_], $options ); return; } =item set_project_fork $api->set_project_fork( $project_id, $from_project_id, ); Sends a C request to C. =cut sub set_project_fork { my $self = shift; croak 'set_project_fork must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to set_project_fork must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($from_project_id) to set_project_fork must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'projects/:project_id/fork/:from_project_id', [@_], $options ); return; } =item clear_project_fork $api->clear_project_fork( $project_id, ); Sends a C request to C. =cut sub clear_project_fork { my $self = shift; croak 'clear_project_fork must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to clear_project_fork must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/fork', [@_], $options ); return; } =item start_housekeeping $api->start_housekeeping( $project_id, ); Sends a C request to C. =cut sub start_housekeeping { my $self = shift; croak 'start_housekeeping must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to start_housekeeping must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'projects/:project_id/housekeeping', [@_], $options ); return; } =item transfer_project_to_namespace $api->transfer_project_to_namespace( $project_id, \%params, ); Sends a C request to C. =cut sub transfer_project_to_namespace { my $self = shift; croak 'transfer_project_to_namespace must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to transfer_project_to_namespace must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to transfer_project_to_namespace must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'projects/:project_id/transfer', [@_], $options ); return; } =back =head2 Project access requests See L. =over =item project_access_requests my $requests = $api->project_access_requests( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_access_requests { my $self = shift; croak 'project_access_requests must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to project_access_requests must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to project_access_requests 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/access_requests', [@_], $options ); } =item request_project_access my $request = $api->request_project_access( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub request_project_access { my $self = shift; croak 'request_project_access must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to request_project_access must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'POST', 'projects/:project_id/access_requests', [@_], $options ); } =item approve_project_access my $request = $api->approve_project_access( $project_id, $user_id, ); Sends a C request to C and returns the decoded response content. =cut sub approve_project_access { my $self = shift; croak 'approve_project_access must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to approve_project_access must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($user_id) to approve_project_access must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'PUT', 'projects/:project_id/access_requests/:user_id/approve', [@_], $options ); } =item deny_project_access $api->deny_project_access( $project_id, $user_id, ); Sends a C request to C. =cut sub deny_project_access { my $self = shift; croak 'deny_project_access must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to deny_project_access must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($user_id) to deny_project_access must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/access_requests/:user_id', [@_], $options ); return; } =back =head2 Project badges See L. =over =item project_badges my $badges = $api->project_badges( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_badges { my $self = shift; croak 'project_badges must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to project_badges must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/badges', [@_], $options ); } =item project_badge my $badge = $api->project_badge( $project_id, $badge_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_badge { my $self = shift; croak 'project_badge must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to project_badge must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($badge_id) to project_badge must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/badges/:badge_id', [@_], $options ); } =item create_project_badge my $badge = $api->create_project_badge( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_project_badge { my $self = shift; croak 'create_project_badge must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_project_badge must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_project_badge 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/badges', [@_], $options ); } =item edit_project_badge my $badge = $api->edit_project_badge( $project_id, $badge_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_project_badge { my $self = shift; croak 'edit_project_badge must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_project_badge must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($badge_id) to edit_project_badge must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_project_badge 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/badges/:badge_id', [@_], $options ); } =item delete_project_badge $api->delete_project_badge( $project_id, $badge_id, ); Sends a C request to C. =cut sub delete_project_badge { my $self = shift; croak 'delete_project_badge must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_project_badge must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($badge_id) to delete_project_badge must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/badges/:badge_id', [@_], $options ); return; } =item preview_project_badge my $preview = $api->preview_project_badge( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub preview_project_badge { my $self = shift; croak 'preview_project_badge must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to preview_project_badge must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to preview_project_badge 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/badges/render', [@_], $options ); } =back =head2 Project import/export See L. =over =item schedule_project_export $api->schedule_project_export( $project_id, \%params, ); Sends a C request to C. =cut sub schedule_project_export { my $self = shift; croak 'schedule_project_export must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to schedule_project_export must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to schedule_project_export must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'projects/:project_id/export', [@_], $options ); return; } =item project_export_status my $status = $api->project_export_status( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_export_status { my $self = shift; croak 'project_export_status must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to project_export_status must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/export', [@_], $options ); } =item download_project_export my $download = $api->download_project_export( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub download_project_export { my $self = shift; croak 'download_project_export must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to download_project_export must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/export/download', [@_], $options ); } =item schedule_project_import $api->schedule_project_import( \%params, ); Sends a C request to C. =cut sub schedule_project_import { my $self = shift; croak 'schedule_project_import must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to schedule_project_import must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH'; my $params = (@_ == 1) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'projects/import', [@_], $options ); return; } =item project_import_status my $status = $api->project_import_status( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_import_status { my $self = shift; croak 'project_import_status must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to project_import_status must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/import', [@_], $options ); } =back =head2 Project members See L. =over =item project_members my $members = $api->project_members( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_members { my $self = shift; croak 'project_members must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to project_members must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to project_members 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/members', [@_], $options ); } =item all_project_members my $members = $api->all_project_members( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub all_project_members { my $self = shift; croak 'all_project_members must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to all_project_members must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to all_project_members 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/members/all', [@_], $options ); } =item project_member my $member = $api->project_member( $project_id, $user_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_member { my $self = shift; croak 'project_member must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to project_member must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($user_id) to project_member must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/members/:user_id', [@_], $options ); } =item add_project_member my $member = $api->add_project_member( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub add_project_member { my $self = shift; croak 'add_project_member must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to add_project_member must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to add_project_member 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/members', [@_], $options ); } =item update_project_member my $member = $api->update_project_member( $project_id, $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub update_project_member { my $self = shift; croak 'update_project_member must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to update_project_member must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($user_id) to update_project_member must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to update_project_member 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/members/:user_id', [@_], $options ); } =item remove_project_member $api->remove_project_member( $project_id, $user_id, ); Sends a C request to C. =cut sub remove_project_member { my $self = shift; croak 'remove_project_member must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to remove_project_member must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($user_id) to remove_project_member must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/members/:user_id', [@_], $options ); return; } =back =head2 Project snippets See L. =over =item project_snippets my $snippets = $api->project_snippets( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_snippets { my $self = shift; croak 'project_snippets must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to project_snippets must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to project_snippets 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/snippets', [@_], $options ); } =item project_snippet my $snippet = $api->project_snippet( $project_id, $snippet_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_snippet { my $self = shift; croak 'project_snippet must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to project_snippet must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to project_snippet must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/snippets/:snippet_id', [@_], $options ); } =item create_project_snippet $api->create_project_snippet( $project_id, \%params, ); Sends a C request to C. =cut sub create_project_snippet { my $self = shift; croak 'create_project_snippet must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_project_snippet must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_project_snippet must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'projects/:project_id/snippets', [@_], $options ); return; } =item edit_project_snippet $api->edit_project_snippet( $project_id, $snippet_id, \%params, ); Sends a C request to C. =cut sub edit_project_snippet { my $self = shift; croak 'edit_project_snippet must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_project_snippet must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to edit_project_snippet must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_project_snippet 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( 'PUT', 'projects/:project_id/snippets/:snippet_id', [@_], $options ); return; } =item delete_project_snippet $api->delete_project_snippet( $project_id, $snippet_id, ); Sends a C request to C. =cut sub delete_project_snippet { my $self = shift; croak 'delete_project_snippet must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_project_snippet must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to delete_project_snippet must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/snippets/:snippet_id', [@_], $options ); return; } =item project_snippet_content my $content = $api->project_snippet_content( $project_id, $snippet_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_snippet_content { my $self = shift; croak 'project_snippet_content must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to project_snippet_content must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to project_snippet_content must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/snippets/:snippet_id/raw', [@_], $options ); } =item project_snippet_user_agent_detail my $user_agent = $api->project_snippet_user_agent_detail( $project_id, $snippet_id, ); Sends a C request to C and returns the decoded response content. =cut sub project_snippet_user_agent_detail { my $self = shift; croak 'project_snippet_user_agent_detail must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to project_snippet_user_agent_detail must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($snippet_id) to project_snippet_user_agent_detail must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/snippets/:snippet_id/user_agent_detail', [@_], $options ); } =back =head2 Protected branches See L. =over =item protected_branches my $branches = $api->protected_branches( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub protected_branches { my $self = shift; croak 'protected_branches must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to protected_branches must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to protected_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/protected_branches', [@_], $options ); } =item protected_branch my $branch = $api->protected_branch( $project_id, $branch_name, ); Sends a C request to C and returns the decoded response content. =cut sub protected_branch { my $self = shift; croak 'protected_branch must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to protected_branch must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($branch_name) to protected_branch must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/protected_branches/:branch_name', [@_], $options ); } =item protect_branch my $branch = $api->protect_branch( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub protect_branch { my $self = shift; croak 'protect_branch must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to protect_branch must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to protect_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/protected_branches', [@_], $options ); } =item unprotect_branch $api->unprotect_branch( $project_id, $branch_name, ); Sends a C request to C. =cut sub unprotect_branch { my $self = shift; croak 'unprotect_branch must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to unprotect_branch must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($branch_name) to unprotect_branch must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/protected_branches/:branch_name', [@_], $options ); return; } =back =head2 Protected tags See L. =over =item protected_tags my $tags = $api->protected_tags( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub protected_tags { my $self = shift; croak 'protected_tags must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to protected_tags must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to protected_tags 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/protected_tags', [@_], $options ); } =item protected_tag my $tag = $api->protected_tag( $project_id, $tag_name, ); Sends a C request to C and returns the decoded response content. =cut sub protected_tag { my $self = shift; croak 'protected_tag must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to protected_tag must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to protected_tag must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/protected_tags/:tag_name', [@_], $options ); } =item protect_tag my $tag = $api->protect_tag( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub protect_tag { my $self = shift; croak 'protect_tag must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to protect_tag must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to protect_tag 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/protected_tags', [@_], $options ); } =item unprotect_tag $api->unprotect_tag( $project_id, $tag_name, ); Sends a C request to C. =cut sub unprotect_tag { my $self = shift; croak 'unprotect_tag must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to unprotect_tag must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to unprotect_tag must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/protected_tags/:tag_name', [@_], $options ); return; } =back =head2 Releases See L. =over =item releases my $releases = $api->releases( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub releases { my $self = shift; croak 'releases must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to releases must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to releases 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/releases', [@_], $options ); } =item release my $release = $api->release( $project_id, $tag_name, ); Sends a C request to C and returns the decoded response content. =cut sub release { my $self = shift; croak 'release must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to release must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to release must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/releases/:tag_name', [@_], $options ); } =item create_release my $release = $api->create_release( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_release { my $self = shift; croak 'create_release must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_release must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_release 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/releases', [@_], $options ); } =item update_release my $release = $api->update_release( $project_id, $tag_name, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub update_release { my $self = shift; croak 'update_release must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to update_release must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to update_release must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to update_release must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH'; my $params = (@_ == 3) ? pop() : undef; my $options = {}; $options->{content} = $params if defined $params; return $self->_call_rest_client( 'PUT', 'projects/:project_id/releases/:tag_name', [@_], $options ); } =item delete_release my $release = $api->delete_release( $project_id, $tag_name, ); Sends a C request to C and returns the decoded response content. =cut sub delete_release { my $self = shift; croak 'delete_release must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_release must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to delete_release must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'DELETE', 'projects/:project_id/releases/:tag_name', [@_], $options ); } =back =head2 Release Links See L. =over =item release_links my $links = $api->release_links( $project_id, $tag_name, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub release_links { my $self = shift; croak 'release_links must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to release_links must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to release_links must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to release_links 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/releases/:tag_name/assets/links', [@_], $options ); } =item release_link my $link = $api->release_link( $project_id, $tag_name, $link_id, ); Sends a C request to C and returns the decoded response content. =cut sub release_link { my $self = shift; croak 'release_link must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to release_link must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to release_link must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($link_id) to release_link must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/releases/:tag_name/assets/links/:link_id', [@_], $options ); } =item create_release_link my $link = $api->create_release_link( $project_id, $tag_name, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_release_link { my $self = shift; croak 'create_release_link must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_release_link must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to create_release_link must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_release_link 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/releases/:tag_name/assets/links', [@_], $options ); } =item update_release_link my $link = $api->update_release_link( $project_id, $tag_name, $link_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub update_release_link { my $self = shift; croak 'update_release_link must be called with 3 to 4 arguments' if @_ < 3 or @_ > 4; croak 'The #1 argument ($project_id) to update_release_link must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to update_release_link must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($link_id) to update_release_link must be a scalar' if ref($_[2]) or (!defined $_[2]); croak 'The last argument (\%params) to update_release_link 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( 'PUT', 'projects/:project_id/releases/:tag_name/assets/links/:link_id', [@_], $options ); } =item delete_release_link my $link = $api->delete_release_link( $project_id, $tag_name, $link_id, ); Sends a C request to C and returns the decoded response content. =cut sub delete_release_link { my $self = shift; croak 'delete_release_link must be called with 3 arguments' if @_ != 3; croak 'The #1 argument ($project_id) to delete_release_link must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to delete_release_link must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The #3 argument ($link_id) to delete_release_link must be a scalar' if ref($_[2]) or (!defined $_[2]); my $options = {}; return $self->_call_rest_client( 'DELETE', 'projects/:project_id/releases/:tag_name/assets/links/:link_id', [@_], $options ); } =back =head2 Remote Mirrors See L. =over =item remote_mirrors my $mirrors = $api->remote_mirrors( $project_id, ); Sends a C request to C and returns the decoded response content. =cut sub remote_mirrors { my $self = shift; croak 'remote_mirrors must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($project_id) to remote_mirrors must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/remote_mirrors', [@_], $options ); } =item create_remote_mirror my $mirror = $api->create_remote_mirror( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_remote_mirror { my $self = shift; croak 'create_remote_mirror must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_remote_mirror must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_remote_mirror 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/remote_mirrors', [@_], $options ); } =item edit_remote_mirror my $mirror = $api->edit_remote_mirror( $project_id, $mirror_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_remote_mirror { my $self = shift; croak 'edit_remote_mirror must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_remote_mirror must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($mirror_id) to edit_remote_mirror must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_remote_mirror 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/remote_mirrors/:mirror_id', [@_], $options ); } =back =head2 Repositories See L. =over =item tree my $tree = $api->tree( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub tree { my $self = shift; croak 'tree must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to tree must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to tree 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/tree', [@_], $options ); } =item blob my $blob = $api->blob( $project_id, $sha, ); Sends a C request to C and returns the decoded response content. =cut sub blob { my $self = shift; croak 'blob must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to blob must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($sha) to blob must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/blobs/:sha', [@_], $options ); } =item raw_blob my $raw_blob = $api->raw_blob( $project_id, $sha, ); Sends a C request to C and returns the decoded response content. =cut sub raw_blob { my $self = shift; croak 'raw_blob must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to raw_blob must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($sha) to raw_blob must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/blobs/:sha/raw', [@_], $options ); } =item archive my $archive = $api->archive( $project_id, \%params, ); Sends a C request to C and returns the raw response content. =cut sub archive { my $self = shift; croak 'archive must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to archive must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to archive must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{query} = $params if defined $params; return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/archive', [@_], $options ); } =item compare my $comparison = $api->compare( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub compare { my $self = shift; croak 'compare must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to compare must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to compare 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/compare', [@_], $options ); } =item contributors my $contributors = $api->contributors( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub contributors { my $self = shift; croak 'contributors must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to contributors must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to contributors 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/contributors', [@_], $options ); } =back =head2 Repository files See L. =over =item file my $file = $api->file( $project_id, $file_path, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub file { my $self = shift; croak 'file must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to file must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($file_path) to file must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to file 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/files/:file_path', [@_], $options ); } =item raw_file my $content = $api->raw_file( $project_id, $file_path, \%params, ); Sends a C request to C and returns the raw response content. =cut sub raw_file { my $self = shift; croak 'raw_file must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to raw_file must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($file_path) to raw_file must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to raw_file must be a hash ref' if defined($_[2]) and ref($_[2]) ne 'HASH'; my $params = (@_ == 3) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{query} = $params if defined $params; return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/files/:file_path/raw', [@_], $options ); } =item create_file $api->create_file( $project_id, $file_path, \%params, ); Sends a C request to C. =cut sub create_file { my $self = shift; croak 'create_file must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_file must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($file_path) to create_file must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_file 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/files/:file_path', [@_], $options ); return; } =item edit_file $api->edit_file( $project_id, $file_path, \%params, ); Sends a C request to C. =cut sub edit_file { my $self = shift; croak 'edit_file must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_file must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($file_path) to edit_file must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_file 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( 'PUT', 'projects/:project_id/repository/files/:file_path', [@_], $options ); return; } =item delete_file $api->delete_file( $project_id, $file_path, \%params, ); Sends a C request to C. =cut sub delete_file { my $self = shift; croak 'delete_file must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to delete_file must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($file_path) to delete_file must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to delete_file 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/repository/files/:file_path', [@_], $options ); return; } =back =head2 Runners See L. =over =item runners my $runners = $api->runners( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub runners { my $self = shift; croak 'runners must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to runners 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', 'runners', [@_], $options ); } =item all_runners my $runners = $api->all_runners( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub all_runners { my $self = shift; croak 'all_runners must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to all_runners 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', 'runners/all', [@_], $options ); } =item runner my $runner = $api->runner( $runner_id, ); Sends a C request to C and returns the decoded response content. =cut sub runner { my $self = shift; croak 'runner must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($runner_id) to runner must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'runners/:runner_id', [@_], $options ); } =item update_runner my $runner = $api->update_runner( $runner_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub update_runner { my $self = shift; croak 'update_runner must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($runner_id) to update_runner must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to update_runner must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{content} = $params if defined $params; return $self->_call_rest_client( 'PUT', 'runners/:runner_id', [@_], $options ); } =item delete_runner $api->delete_runner( $runner_id, ); Sends a C request to C. =cut sub delete_runner { my $self = shift; croak 'delete_runner must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($runner_id) to delete_runner must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'runners/:runner_id', [@_], $options ); return; } =item runner_jobs my $jobs = $api->runner_jobs( $runner_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub runner_jobs { my $self = shift; croak 'runner_jobs must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($runner_id) to runner_jobs must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to runner_jobs 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', 'runners/:runner_id/jobs', [@_], $options ); } =item project_runners my $runners = $api->project_runners( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub project_runners { my $self = shift; croak 'project_runners must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to project_runners must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to project_runners 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/runners', [@_], $options ); } =item enable_project_runner my $runner = $api->enable_project_runner( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub enable_project_runner { my $self = shift; croak 'enable_project_runner must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to enable_project_runner must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to enable_project_runner 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/runners', [@_], $options ); } =item disable_project_runner my $runner = $api->disable_project_runner( $project_id, $runner_id, ); Sends a C request to C and returns the decoded response content. =cut sub disable_project_runner { my $self = shift; croak 'disable_project_runner must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to disable_project_runner must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($runner_id) to disable_project_runner must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'DELETE', 'projects/:project_id/runners/:runner_id', [@_], $options ); } =back =head2 Search See L. =over =item search my $results = $api->search( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub search { my $self = shift; croak 'search must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to search 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', 'search', [@_], $options ); } =back =head2 Services See L. =over =item project_service my $service = $api->project_service( $project_id, $service_name, ); Sends a C request to C and returns the decoded response content. =cut sub project_service { my $self = shift; croak 'project_service must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to project_service must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($service_name) to project_service must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/services/:service_name', [@_], $options ); } =item edit_project_service $api->edit_project_service( $project_id, $service_name, \%params, ); Sends a C request to C. =cut sub edit_project_service { my $self = shift; croak 'edit_project_service must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_project_service must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($service_name) to edit_project_service must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_project_service 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( 'PUT', 'projects/:project_id/services/:service_name', [@_], $options ); return; } =item delete_project_service $api->delete_project_service( $project_id, $service_name, ); Sends a C request to C. =cut sub delete_project_service { my $self = shift; croak 'delete_project_service must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_project_service must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($service_name) to delete_project_service must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/services/:service_name', [@_], $options ); return; } =back =head2 Application settings See L. =over =item settings my $settings = $api->settings(); Sends a C request to C and returns the decoded response content. =cut sub settings { my $self = shift; croak "The settings method does not take any arguments" if @_; my $options = {}; return $self->_call_rest_client( 'GET', 'application/settings', [@_], $options ); } =item update_settings my $settings = $api->update_settings( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub update_settings { my $self = shift; croak 'update_settings must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to update_settings must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH'; my $params = (@_ == 1) ? pop() : undef; my $options = {}; $options->{content} = $params if defined $params; return $self->_call_rest_client( 'PUT', 'application/settings', [@_], $options ); } =back =head2 Application statistics See L. =over =item statistics my $statistics = $api->statistics(); Sends a C request to C and returns the decoded response content. =cut sub statistics { my $self = shift; croak "The statistics method does not take any arguments" if @_; my $options = {}; return $self->_call_rest_client( 'GET', 'application/statistics', [@_], $options ); } =back =head2 Sidekiq Metrics See L. =over =item queue_metrics my $metrics = $api->queue_metrics(); Sends a C request to C and returns the decoded response content. =cut sub queue_metrics { my $self = shift; croak "The queue_metrics method does not take any arguments" if @_; my $options = {}; return $self->_call_rest_client( 'GET', 'sidekiq/queue_metrics', [@_], $options ); } =item process_metrics my $metrics = $api->process_metrics(); Sends a C request to C and returns the decoded response content. =cut sub process_metrics { my $self = shift; croak "The process_metrics method does not take any arguments" if @_; my $options = {}; return $self->_call_rest_client( 'GET', 'sidekiq/process_metrics', [@_], $options ); } =item job_stats my $stats = $api->job_stats(); Sends a C request to C and returns the decoded response content. =cut sub job_stats { my $self = shift; croak "The job_stats method does not take any arguments" if @_; my $options = {}; return $self->_call_rest_client( 'GET', 'sidekiq/job_stats', [@_], $options ); } =item compound_metrics my $metrics = $api->compound_metrics(); Sends a C request to C and returns the decoded response content. =cut sub compound_metrics { my $self = shift; croak "The compound_metrics method does not take any arguments" if @_; my $options = {}; return $self->_call_rest_client( 'GET', 'sidekiq/compound_metrics', [@_], $options ); } =back =head2 System hooks See L. =over =item hooks my $hooks = $api->hooks( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub hooks { my $self = shift; croak 'hooks must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to hooks 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', 'hooks', [@_], $options ); } =item create_hook $api->create_hook( \%params, ); Sends a C request to C. =cut sub create_hook { my $self = shift; croak 'create_hook must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to create_hook must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH'; my $params = (@_ == 1) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'hooks', [@_], $options ); return; } =item test_hook my $hook = $api->test_hook( $hook_id, ); Sends a C request to C and returns the decoded response content. =cut sub test_hook { my $self = shift; croak 'test_hook must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($hook_id) to test_hook must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'hooks/:hook_id', [@_], $options ); } =item delete_hook $api->delete_hook( $hook_id, ); Sends a C request to C. =cut sub delete_hook { my $self = shift; croak 'delete_hook must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($hook_id) to delete_hook must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'hooks/:hook_id', [@_], $options ); return; } =back =head2 Tags See L. =over =item tags my $tags = $api->tags( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub tags { my $self = shift; croak 'tags must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to tags must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to tags 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/tags', [@_], $options ); } =item tag my $tag = $api->tag( $project_id, $tag_name, ); Sends a C request to C and returns the decoded response content. =cut sub tag { my $self = shift; croak 'tag must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to tag must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to tag must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/repository/tags/:tag_name', [@_], $options ); } =item create_tag my $tag = $api->create_tag( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_tag { my $self = shift; croak 'create_tag must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_tag must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_tag 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/tags', [@_], $options ); } =item delete_tag $api->delete_tag( $project_id, $tag_name, ); Sends a C request to C. =cut sub delete_tag { my $self = shift; croak 'delete_tag must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_tag must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to delete_tag must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/repository/tags/:tag_name', [@_], $options ); return; } =item create_tag_release my $release = $api->create_tag_release( $project_id, $tag_name, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_tag_release { my $self = shift; croak 'create_tag_release must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to create_tag_release must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to create_tag_release must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to create_tag_release 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/tags/:tag_name/release', [@_], $options ); } =item update_tag_release my $release = $api->update_tag_release( $project_id, $tag_name, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub update_tag_release { my $self = shift; croak 'update_tag_release must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to update_tag_release must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($tag_name) to update_tag_release must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to update_tag_release 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/repository/tags/:tag_name/release', [@_], $options ); } =back =head2 Todos See L. =over =item todos my $todos = $api->todos( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub todos { my $self = shift; croak 'todos must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to todos 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', 'todos', [@_], $options ); } =item mark_todo_done my $todo = $api->mark_todo_done( $todo_id, ); Sends a C request to C and returns the decoded response content. =cut sub mark_todo_done { my $self = shift; croak 'mark_todo_done must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($todo_id) to mark_todo_done must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'POST', 'todos/:todo_id/mark_as_done', [@_], $options ); } =item mark_all_todos_done $api->mark_all_todos_done(); Sends a C request to C. =cut sub mark_all_todos_done { my $self = shift; croak "The mark_all_todos_done method does not take any arguments" if @_; my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'todos/mark_as_done', [@_], $options ); return; } =back =head2 Users See L. =over =item users my $users = $api->users( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub users { my $self = shift; croak 'users must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to users 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', 'users', [@_], $options ); } =item user my $user = $api->user( $user_id, ); Sends a C request to C and returns the decoded response content. =cut sub user { my $self = shift; croak 'user must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($user_id) to user must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'users/:user_id', [@_], $options ); } =item create_user $api->create_user( \%params, ); Sends a C request to C. =cut sub create_user { my $self = shift; croak 'create_user must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to create_user must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH'; my $params = (@_ == 1) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'users', [@_], $options ); return; } =item edit_user $api->edit_user( $user_id, \%params, ); Sends a C request to C. =cut sub edit_user { my $self = shift; croak 'edit_user must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to edit_user must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to edit_user must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'PUT', 'users/:user_id', [@_], $options ); return; } =item delete_user $api->delete_user( $user_id, \%params, ); Sends a C request to C. =cut sub delete_user { my $self = shift; croak 'delete_user must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to delete_user must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to delete_user must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'DELETE', 'users/:user_id', [@_], $options ); return; } =item current_user my $user = $api->current_user(); Sends a C request to C and returns the decoded response content. =cut sub current_user { my $self = shift; croak "The current_user method does not take any arguments" if @_; my $options = {}; return $self->_call_rest_client( 'GET', 'user', [@_], $options ); } =item current_user_ssh_keys my $keys = $api->current_user_ssh_keys( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub current_user_ssh_keys { my $self = shift; croak 'current_user_ssh_keys must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to current_user_ssh_keys 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', 'user/keys', [@_], $options ); } =item user_ssh_keys my $keys = $api->user_ssh_keys( $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub user_ssh_keys { my $self = shift; croak 'user_ssh_keys must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to user_ssh_keys must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to user_ssh_keys 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', 'users/:user_id/keys', [@_], $options ); } =item user_ssh_key my $key = $api->user_ssh_key( $key_id, ); Sends a C request to C and returns the decoded response content. =cut sub user_ssh_key { my $self = shift; croak 'user_ssh_key must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($key_id) to user_ssh_key must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'user/keys/:key_id', [@_], $options ); } =item create_current_user_ssh_key $api->create_current_user_ssh_key( \%params, ); Sends a C request to C. =cut sub create_current_user_ssh_key { my $self = shift; croak 'create_current_user_ssh_key must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to create_current_user_ssh_key must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH'; my $params = (@_ == 1) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'user/keys', [@_], $options ); return; } =item create_user_ssh_key $api->create_user_ssh_key( $user_id, \%params, ); Sends a C request to C. =cut sub create_user_ssh_key { my $self = shift; croak 'create_user_ssh_key must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to create_user_ssh_key must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_user_ssh_key must be a hash ref' if defined($_[1]) and ref($_[1]) ne 'HASH'; my $params = (@_ == 2) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'users/:user_id/keys', [@_], $options ); return; } =item delete_current_user_ssh_key $api->delete_current_user_ssh_key( $key_id, ); Sends a C request to C. =cut sub delete_current_user_ssh_key { my $self = shift; croak 'delete_current_user_ssh_key must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($key_id) to delete_current_user_ssh_key must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'user/keys/:key_id', [@_], $options ); return; } =item delete_user_ssh_key $api->delete_user_ssh_key( $user_id, $key_id, ); Sends a C request to C. =cut sub delete_user_ssh_key { my $self = shift; croak 'delete_user_ssh_key must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($user_id) to delete_user_ssh_key must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($key_id) to delete_user_ssh_key must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'users/:user_id/keys/:key_id', [@_], $options ); return; } =item current_user_gpg_keys my $keys = $api->current_user_gpg_keys( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub current_user_gpg_keys { my $self = shift; croak 'current_user_gpg_keys must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to current_user_gpg_keys 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', 'user/gpg_keys', [@_], $options ); } =item current_user_gpg_key my $key = $api->current_user_gpg_key( $key_id, ); Sends a C request to C and returns the decoded response content. =cut sub current_user_gpg_key { my $self = shift; croak 'current_user_gpg_key must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($key_id) to current_user_gpg_key must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'user/gpg_keys/:key_id', [@_], $options ); } =item create_current_user_gpg_key $api->create_current_user_gpg_key( \%params, ); Sends a C request to C. =cut sub create_current_user_gpg_key { my $self = shift; croak 'create_current_user_gpg_key must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to create_current_user_gpg_key must be a hash ref' if defined($_[0]) and ref($_[0]) ne 'HASH'; my $params = (@_ == 1) ? pop() : undef; my $options = {}; $options->{decode} = 0; $options->{content} = $params if defined $params; $self->_call_rest_client( 'POST', 'user/gpg_keys', [@_], $options ); return; } =item delete_current_user_gpg_key $api->delete_current_user_gpg_key( $key_id, ); Sends a C request to C. =cut sub delete_current_user_gpg_key { my $self = shift; croak 'delete_current_user_gpg_key must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($key_id) to delete_current_user_gpg_key must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'user/gpg_keys/:key_id', [@_], $options ); return; } =item user_gpg_keys my $keys = $api->user_gpg_keys( $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub user_gpg_keys { my $self = shift; croak 'user_gpg_keys must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to user_gpg_keys must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to user_gpg_keys 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', 'users/:user_id/gpg_keys', [@_], $options ); } =item user_gpg_key my $key = $api->user_gpg_key( $user_id, $key_id, ); Sends a C request to C and returns the decoded response content. =cut sub user_gpg_key { my $self = shift; croak 'user_gpg_key must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($user_id) to user_gpg_key must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($key_id) to user_gpg_key must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'users/:user_id/gpg_keys/:key_id', [@_], $options ); } =item create_user_gpg_key my $keys = $api->create_user_gpg_key( $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_user_gpg_key { my $self = shift; croak 'create_user_gpg_key must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to create_user_gpg_key must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_user_gpg_key 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', 'users/:user_id/gpg_keys', [@_], $options ); } =item delete_user_gpg_key $api->delete_user_gpg_key( $user_id, $key_id, ); Sends a C request to C. =cut sub delete_user_gpg_key { my $self = shift; croak 'delete_user_gpg_key must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($user_id) to delete_user_gpg_key must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($key_id) to delete_user_gpg_key must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'users/:user_id/gpg_keys/:key_id', [@_], $options ); return; } =item current_user_emails my $emails = $api->current_user_emails( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub current_user_emails { my $self = shift; croak 'current_user_emails must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to current_user_emails 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', 'user/emails', [@_], $options ); } =item user_emails my $emails = $api->user_emails( $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub user_emails { my $self = shift; croak 'user_emails must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to user_emails must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to user_emails 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', 'users/:user_id/emails', [@_], $options ); } =item current_user_email my $email = $api->current_user_email( $email_id, ); Sends a C request to C and returns the decoded response content. =cut sub current_user_email { my $self = shift; croak 'current_user_email must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($email_id) to current_user_email must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'GET', 'user/emails/:email_id', [@_], $options ); } =item create_current_user_email my $email = $api->create_current_user_email( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_current_user_email { my $self = shift; croak 'create_current_user_email must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to create_current_user_email 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', 'user/emails', [@_], $options ); } =item create_user_email my $email = $api->create_user_email( $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_user_email { my $self = shift; croak 'create_user_email must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to create_user_email must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_user_email 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', 'users/:user_id/emails', [@_], $options ); } =item delete_current_user_email $api->delete_current_user_email( $email_id, ); Sends a C request to C. =cut sub delete_current_user_email { my $self = shift; croak 'delete_current_user_email must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($email_id) to delete_current_user_email must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'user/emails/:email_id', [@_], $options ); return; } =item delete_user_email $api->delete_user_email( $user_id, $email_id, ); Sends a C request to C. =cut sub delete_user_email { my $self = shift; croak 'delete_user_email must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($user_id) to delete_user_email must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($email_id) to delete_user_email must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'users/:user_id/emails/:email_id', [@_], $options ); return; } =item block_user my $success = $api->block_user( $user_id, ); Sends a C request to C and returns the decoded response content. =cut sub block_user { my $self = shift; croak 'block_user must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($user_id) to block_user must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'POST', 'users/:user_id/block', [@_], $options ); } =item unblock_user my $success = $api->unblock_user( $user_id, ); Sends a C request to C and returns the decoded response content. =cut sub unblock_user { my $self = shift; croak 'unblock_user must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($user_id) to unblock_user must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; return $self->_call_rest_client( 'POST', 'users/:user_id/unblock', [@_], $options ); } =item approve_user $api->approve_user( $user_id, ); Sends a C request to C. =cut sub approve_user { my $self = shift; croak 'approve_user must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($user_id) to approve_user must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'users/:user_id/approve', [@_], $options ); return; } =item reject_user $api->reject_user( $user_id, ); Sends a C request to C. =cut sub reject_user { my $self = shift; croak 'reject_user must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($user_id) to reject_user must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'users/:user_id/reject', [@_], $options ); return; } =item activate_user $api->activate_user( $user_id, ); Sends a C request to C. =cut sub activate_user { my $self = shift; croak 'activate_user must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($user_id) to activate_user must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'users/:user_id/activate', [@_], $options ); return; } =item deactivate_user $api->deactivate_user( $user_id, ); Sends a C request to C. =cut sub deactivate_user { my $self = shift; croak 'deactivate_user must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($user_id) to deactivate_user must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'users/:user_id/deactivate', [@_], $options ); return; } =item ban_user $api->ban_user( $user_id, ); Sends a C request to C. =cut sub ban_user { my $self = shift; croak 'ban_user must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($user_id) to ban_user must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'users/:user_id/ban', [@_], $options ); return; } =item unban_user $api->unban_user( $user_id, ); Sends a C request to C. =cut sub unban_user { my $self = shift; croak 'unban_user must be called with 1 arguments' if @_ != 1; croak 'The #1 argument ($user_id) to unban_user must be a scalar' if ref($_[0]) or (!defined $_[0]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'POST', 'users/:user_id/unban', [@_], $options ); return; } =item user_impersonation_tokens my $tokens = $api->user_impersonation_tokens( $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub user_impersonation_tokens { my $self = shift; croak 'user_impersonation_tokens must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to user_impersonation_tokens must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to user_impersonation_tokens 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', 'users/:user_id/impersonation_tokens', [@_], $options ); } =item user_impersonation_token my $token = $api->user_impersonation_token( $user_id, $impersonation_token_id, ); Sends a C request to C and returns the decoded response content. =cut sub user_impersonation_token { my $self = shift; croak 'user_impersonation_token must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($user_id) to user_impersonation_token must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($impersonation_token_id) to user_impersonation_token must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'users/:user_id/impersonation_tokens/:impersonation_token_id', [@_], $options ); } =item create_user_impersonation_token my $token = $api->create_user_impersonation_token( $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_user_impersonation_token { my $self = shift; croak 'create_user_impersonation_token must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to create_user_impersonation_token must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_user_impersonation_token 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', 'users/:user_id/impersonation_tokens', [@_], $options ); } =item delete_user_impersonation_token $api->delete_user_impersonation_token( $user_id, $impersonation_token_id, ); Sends a C request to C. =cut sub delete_user_impersonation_token { my $self = shift; croak 'delete_user_impersonation_token must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($user_id) to delete_user_impersonation_token must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($impersonation_token_id) to delete_user_impersonation_token must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'users/:user_id/impersonation_tokens/:impersonation_token_id', [@_], $options ); return; } =item all_user_activities my $activities = $api->all_user_activities( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub all_user_activities { my $self = shift; croak 'all_user_activities must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to all_user_activities 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', 'user/activities', [@_], $options ); } =item user_memberships my $memberships = $api->user_memberships( $user_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub user_memberships { my $self = shift; croak 'user_memberships must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($user_id) to user_memberships must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to user_memberships 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', 'users/:user_id/memberships', [@_], $options ); } =back =head2 Validate the .gitlab-ci.yml See L. =over =item lint my $result = $api->lint( \%params, ); Sends a C request to C and returns the decoded response content. =cut sub lint { my $self = shift; croak 'lint must be called with 0 to 1 arguments' if @_ < 0 or @_ > 1; croak 'The last argument (\%params) to lint 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', 'lint', [@_], $options ); } =back =head2 Version See L. =over =item version my $version = $api->version(); Sends a C request to C and returns the decoded response content. =cut sub version { my $self = shift; croak "The version method does not take any arguments" if @_; my $options = {}; return $self->_call_rest_client( 'GET', 'version', [@_], $options ); } =back =head2 Wikis See L. =over =item wiki_pages my $pages = $api->wiki_pages( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub wiki_pages { my $self = shift; croak 'wiki_pages must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to wiki_pages must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to wiki_pages 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/wikis', [@_], $options ); } =item wiki_page my $pages = $api->wiki_page( $project_id, $slug, ); Sends a C request to C and returns the decoded response content. =cut sub wiki_page { my $self = shift; croak 'wiki_page must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to wiki_page must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($slug) to wiki_page must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; return $self->_call_rest_client( 'GET', 'projects/:project_id/wikis/:slug', [@_], $options ); } =item create_wiki_page my $page = $api->create_wiki_page( $project_id, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub create_wiki_page { my $self = shift; croak 'create_wiki_page must be called with 1 to 2 arguments' if @_ < 1 or @_ > 2; croak 'The #1 argument ($project_id) to create_wiki_page must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The last argument (\%params) to create_wiki_page 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/wikis', [@_], $options ); } =item edit_wiki_page my $page = $api->edit_wiki_page( $project_id, $slug, \%params, ); Sends a C request to C and returns the decoded response content. =cut sub edit_wiki_page { my $self = shift; croak 'edit_wiki_page must be called with 2 to 3 arguments' if @_ < 2 or @_ > 3; croak 'The #1 argument ($project_id) to edit_wiki_page must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($slug) to edit_wiki_page must be a scalar' if ref($_[1]) or (!defined $_[1]); croak 'The last argument (\%params) to edit_wiki_page 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/wikis/:slug', [@_], $options ); } =item delete_wiki_page $api->delete_wiki_page( $project_id, $slug, ); Sends a C request to C. =cut sub delete_wiki_page { my $self = shift; croak 'delete_wiki_page must be called with 2 arguments' if @_ != 2; croak 'The #1 argument ($project_id) to delete_wiki_page must be a scalar' if ref($_[0]) or (!defined $_[0]); croak 'The #2 argument ($slug) to delete_wiki_page must be a scalar' if ref($_[1]) or (!defined $_[1]); my $options = {}; $options->{decode} = 0; $self->_call_rest_client( 'DELETE', 'projects/:project_id/wikis/:slug', [@_], $options ); return; } =back =cut 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 AUTHOR Aran Clary Deltac =head1 CONTRIBUTORS 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 Graham Knop Stig Palmquist Dan Book James Wright Jonathan Taylor g0t mi1k =head1 LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Config.pm100644000765000024 1314214440166670 17476 0ustar00aranstaff000000000000GitLab-API-v4-0.27/lib/GitLab/API/v4package GitLab::API::v4::Config; our $VERSION = '0.27'; =encoding utf8 =head1 NAME GitLab::API::v4::Config - Load configuration from a file, environment, and/or CLI options. =head1 SYNOPSIS use GitLab::API::v4; use GitLab::API::v4::Config; my $config = GitLab::API::v4::Config->new(); my $api = GitLab::API::v4->new( $config->args() ); =head1 DESCRIPTION This module is used by L to load configuration. If you are using L directly then this module will not be automatically used, but you are welcome to explicitly use it as shown in the L. =cut use Getopt::Long; use IO::Prompter; use JSON::MaybeXS; use Log::Any qw( $log ); use Path::Tiny; use Types::Common::String -types; use Types::Standard -types; use Moo; use strictures 2; use namespace::clean; sub _filter_args { my ($self, $args) = @_; return { map { $_ => $args->{$_} } grep { $args->{$_} } keys %$args }; } =head1 ARGUMENTS =head2 file The file to load configuration from. The file should hold valid JSON. By default this will be set to C<.gitlab-api-v4-config> in the current user's home directory. This can be overridden with the C environment variable or the C<--config-file=...> command line argument. =cut has file => ( is => 'lazy', isa => NonEmptySimpleStr, ); sub _build_file { my ($self) = @_; my $file = $self->opt_args->{config_file} || $self->env_args->{config_file}; return $file if $file; my ($home) = ( getpwuid($<) )[7]; return '' . path( $home )->child('.gitlab-api-v4-config'); } =head1 ATTRIBUTES =head2 opt_args Returns a hashref of arguments derived from command line options. Supported options are: --config_file=... --url=... --private-token=... --access-token=... --retries=... Note that the options are read from, and removed from, C<@ARGV>. Due to this the arguments are saved internally and re-used for all instances of this class so that there are no weird race conditions. =cut has opt_args => ( is => 'rwp', isa => HashRef, default => sub{ {} }, ); =head2 env_args Returns a hashref of arguments derived from environment variables. Supported environment variables are: GITLAB_API_V4_CONFIG_FILE GITLAB_API_V4_URL GITLAB_API_V4_PRIVATE_TOKEN GITLAB_API_V4_ACCESS_TOKEN GITLAB_API_V4_RETRIES =cut has env_args => ( is => 'lazy', isa => HashRef, ); sub _build_env_args { my ($self) = @_; return $self->_filter_args({ config_file => $ENV{GITLAB_API_V4_CONFIG_FILE}, url => $ENV{GITLAB_API_V4_URL}, private_token => $ENV{GITLAB_API_V4_PRIVATE_TOKEN}, access_token => $ENV{GITLAB_API_V4_ACCESS_TOKEN}, retries => $ENV{GITLAB_API_V4_RETRIES}, }); } =head2 file_args Returns a hashref of arguments gotten by decoding the JSON in the L. =cut has file_args => ( is => 'lazy', isa => HashRef, ); sub _build_file_args { my ($self) = @_; my $file = $self->file(); return {} if !-r $file; $file = path( $file ); $log->debugf( 'Loading configuration for GitLab::API::v4 from: %s', $file->absolute() ); my $json = $file->slurp(); my $data = decode_json( $json ); return $self->_filter_args( $data ); } =head2 args Returns a final, combined, hashref of arguments containing everything in L, L, and L. If there are any duplicate arguments then L has highest precedence, L is next, and at the bottom is L. =cut sub args { my ($self) = @_; return { %{ $self->file_args() }, %{ $self->env_args() }, %{ $self->opt_args() }, }; } =head1 METHODS =head2 get_options =cut sub get_options { my ($self, @extra) = @_; Getopt::Long::Configure(qw( gnu_getopt no_ignore_case )); my $opt_args = {}; GetOptions( 'config-file=s' => \$opt_args->{config_file}, 'url=s' => \$opt_args->{url}, 'private-token=s' => \$opt_args->{private_token}, 'access-token=s' => \$opt_args->{access_token}, 'retries=i' => \$opt_args->{retries}, @extra, ) or die('Unable to process options!'); $opt_args = $self->_filter_args( $opt_args ); $self->_set_opt_args( $opt_args ); return; } =head2 configure When called this method interactively prompts the user for argument values and then encodes them as JSON and stores them in L. The file will be chmod'ed C<0600> so that only the current user may read or write to the file. =cut sub configure { my ($self) = @_; my $url = prompt( 'Full URL to a v4 GitLab API:', '-stdio', '-verbatim', ); my $private_token = prompt( 'Private Token:', -echo=>'', '-stdio', '-verbatim', ); my $access_token = prompt( 'Access Token:', -echo=>'', '-stdio', '-verbatim', ); my $json = JSON::MaybeXS->new(pretty => 1, canonical => 1) ->encode({ $url ? (url=>$url) : (), $private_token ? (private_token=>$private_token) : (), $access_token ? (access_token=>$access_token) : (), }); my $file = path( $self->file() ); $file->touch(); $file->chmod( 0600 ); $file->append( {truncate=>1}, $json ); $log->infof( 'Configuration for GitLab::API::v4 saved to: %s', $file->absolute() ); return; } 1; __END__ =head1 SUPPORT See L. =head1 AUTHORS See L. =head1 LICENSE See L. =cut Constants.pm100644000765000024 601614440166670 20227 0ustar00aranstaff000000000000GitLab-API-v4-0.27/lib/GitLab/API/v4package GitLab::API::v4::Constants; our $VERSION = '0.27'; =encoding utf8 =head1 NAME GitLab::API::v4::Constants - GitLab API v4 constants. =head1 SYNOPSIS use GitLab::API::v4::Constants qw( :all ); print $GITLAB_ACCESS_LEVEL_GUEST; # 10 =cut use Const::Fast; use strictures 2; use namespace::clean; use Exporter qw( import ); our @EXPORT_OK; our %EXPORT_TAGS = ( all => \@EXPORT_OK ); =head1 CONSTANTS =head2 $GITLAB_ACCESS_LEVEL_NO_ACCESS C<0> =cut const our $GITLAB_ACCESS_LEVEL_NO_ACCESS => 0; push @EXPORT_OK, '$GITLAB_ACCESS_LEVEL_NO_ACCESS'; =head2 $GITLAB_ACCESS_LEVEL_GUEST C<10> =cut const our $GITLAB_ACCESS_LEVEL_GUEST => 10; push @EXPORT_OK, '$GITLAB_ACCESS_LEVEL_GUEST'; =head2 $GITLAB_ACCESS_LEVEL_REPORTER C<20> =cut const our $GITLAB_ACCESS_LEVEL_REPORTER => 20; push @EXPORT_OK, '$GITLAB_ACCESS_LEVEL_REPORTER'; =head2 $GITLAB_ACCESS_LEVEL_DEVELOPER C<30> =cut const our $GITLAB_ACCESS_LEVEL_DEVELOPER => 30; push @EXPORT_OK, '$GITLAB_ACCESS_LEVEL_DEVELOPER'; =head2 $GITLAB_ACCESS_LEVEL_MASTER C<40> =cut const our $GITLAB_ACCESS_LEVEL_MASTER => 40; push @EXPORT_OK, '$GITLAB_ACCESS_LEVEL_MASTER'; =head2 $GITLAB_ACCESS_LEVEL_OWNER C<50> =cut const our $GITLAB_ACCESS_LEVEL_OWNER => 50; push @EXPORT_OK, '$GITLAB_ACCESS_LEVEL_OWNER'; =head2 @GITLAB_ACCESS_LEVELS An array containing the values for L, L, L, L, L, and L. =cut const our @GITLAB_ACCESS_LEVELS => ( $GITLAB_ACCESS_LEVEL_NO_ACCESS, $GITLAB_ACCESS_LEVEL_GUEST, $GITLAB_ACCESS_LEVEL_REPORTER, $GITLAB_ACCESS_LEVEL_DEVELOPER, $GITLAB_ACCESS_LEVEL_MASTER, $GITLAB_ACCESS_LEVEL_OWNER, ); push @EXPORT_OK, '@GITLAB_ACCESS_LEVELS'; =head2 $GITLAB_SNIPPET_VISIBILITY_LEVEL_PRIVATE C =cut const our $GITLAB_SNIPPET_VISIBILITY_LEVEL_PRIVATE => 'private'; push @EXPORT_OK, '$GITLAB_SNIPPET_VISIBILITY_LEVEL_PRIVATE'; =head2 $GITLAB_SNIPPET_VISIBILITY_LEVEL_INTERNAL C =cut const our $GITLAB_SNIPPET_VISIBILITY_LEVEL_INTERNAL => 'internal'; push @EXPORT_OK, '$GITLAB_SNIPPET_VISIBILITY_LEVEL_INTERNAL'; =head2 $GITLAB_SNIPPET_VISIBILITY_LEVEL_PUBLIC C =cut const our $GITLAB_SNIPPET_VISIBILITY_LEVEL_PUBLIC => 'public'; push @EXPORT_OK, '$GITLAB_SNIPPET_VISIBILITY_LEVEL_PUBLIC'; =head2 @GITLAB_SNIPPET_VISIBILITY_LEVELS An array containing the values for L, L, and L. =cut const our @GITLAB_SNIPPET_VISIBILITY_LEVELS => ( $GITLAB_SNIPPET_VISIBILITY_LEVEL_PRIVATE, $GITLAB_SNIPPET_VISIBILITY_LEVEL_INTERNAL, $GITLAB_SNIPPET_VISIBILITY_LEVEL_PUBLIC, ); push @EXPORT_OK, '@GITLAB_SNIPPET_VISIBILITY_LEVELS'; 1; __END__ =head1 SUPPORT See L. =head1 AUTHORS See L. =head1 LICENSE See L. =cut Mock.pm100755000765000024 227614440166670 17153 0ustar00aranstaff000000000000GitLab-API-v4-0.27/lib/GitLab/API/v4package GitLab::API::v4::Mock; our $VERSION = '0.27'; =encoding utf8 =head1 NAME GitLab::API::v4::Mock - Mock API object for testing. =head1 SYNOPSIS use GitLab::API::v4::Mock; my $api = GitLab::API::v4::Mock->new(); =head1 DESCRIPTION This module is a subclass of L. It modifies it to mock the REST client via L. This module is meant to be used for writing unit tests. =cut use GitLab::API::v4::Mock::RESTClient; use Moo; use strictures 2; use namespace::clean; extends 'GitLab::API::v4'; =head1 ATTRIBUTES =head2 url This attribute is altered from L to default to C and to not be required. =cut has '+url' => ( required => 0, default => 'https://example.com/api/v4', ); =head2 rest_client_class This attribute is altered from L to default to L. =cut sub _build_rest_client_class { return 'GitLab::API::v4::Mock::RESTClient'; } 1; __END__ =head1 SUPPORT See L. =head1 AUTHORS See L. =head1 LICENSE See L. =cut Engine.pm100755000765000024 700614440166670 20354 0ustar00aranstaff000000000000GitLab-API-v4-0.27/lib/GitLab/API/v4/Mockpackage GitLab::API::v4::Mock::Engine; our $VERSION = '0.27'; =encoding utf8 =head1 NAME GitLab::API::v4::Mock::Engine - Mocking the internals of a GitLab server. =head1 SYNOPSIS use GitLab::API::v4::Mock::Engine; my $engine = GitLab::API::v4::Mock::Engine->new(); my $user = $engine->create_user({ email => $email, username => $username, name => $name, ..., }); print "User created with ID: $user->{id}\n"; =head1 DESCRIPTION This module provides the tooling to run a mock of the internal state of a GitLab server. At this time very little is validated. For example, when you create a user with L there is no logic which double checks that you specify the required C field or that you don't put in fields that are unexpected. =cut use Moo; use strictures 2; use namespace::clean; =head1 ATTRIBUTES =head2 next_ids my $ids = $engine->next_ids(); A hash reference containing object types to the next ID. Used by L. =cut has next_ids => ( is => 'ro', init_arg => undef, default => sub{ {} }, ); =head2 users my $users = $engine->users(); foreach my $user (@$users) { ... } Returns the full array reference of all users hash references. =cut has users => ( is => 'ro', init_arg => undef, default => sub{ [] }, ); =head1 METHODS =head2 next_id_for my $id = $engine->next_id_for( 'user' ); Given an object type this will return the next unused ID. =cut sub next_id_for { my ($self, $for) = @_; my $next_id = $self->next_ids->{$for} || 1; $self->next_ids->{$for} = $next_id + 1; return $next_id; } =head1 USER METHODS =head2 user my $user = $engine->user( $id ); Returns a user hash reference for the given ID. If no user is found with the ID then C is returned. =cut sub user { my ($self, $id) = @_; foreach my $user (@{ $self->users() }) { return $user if $user->{id} == $id; } return undef; } =head2 create_user my $user = $engine->create_user( $user ); my $id = $user->{id}; Takes a user hash reference, sets the C field, and stores it in L. Returns the updated user hash reference. =cut sub create_user { my ($self, $user) = @_; $user->{id} = $self->next_id_for( 'user' ); push @{ $self->users() }, $user; return $user; } =head2 update_user my $user = $engine->update_user( $id, $new_user_data ); Takes the ID of the user to update and a hash reference of fields to update. Returns the updated user hash reference. =cut sub update_user { my ($self, $id, $data) = @_; my $user = $self->user( $id ); return undef if !$user; %$user = ( %$user, %$data, ); return $user; } =head2 delete_user my $user = $engine->delete_user( $id ); Deletes the user with the specified ID from L. If no user is found with the ID then C is returned. Otherwise the user hash reference is returned. =cut sub delete_user { my ($self, $id) = @_; my $users = $self->users(); my @new; my $found_user; foreach my $user (@$users) { if ($user->{id} == $id and !$found_user) { $found_user = $user; next; } push @new, $user; } return undef if !$found_user; @$users = @new; return $found_user; } 1; __END__ =head1 SUPPORT See L. =head1 AUTHORS See L. =head1 LICENSE See L. =cut RESTClient.pm100755000765000024 640214440166670 21062 0ustar00aranstaff000000000000GitLab-API-v4-0.27/lib/GitLab/API/v4/Mockpackage GitLab::API::v4::Mock::RESTClient; our $VERSION = '0.27'; =encoding utf8 =head1 NAME GitLab::API::v4::Mock::RESTClient - Mocked REST client that doesn't actually make HTTP requests. =head1 DESCRIPTION This module is a subclass of L. It modifies it to divert HTTP requests to L rather than making live requests. This module is used by L. =cut use GitLab::API::v4::Mock::Engine; use JSON::MaybeXS; use URI; use Moo; use strictures 2; use namespace::clean; extends 'GitLab::API::v4::RESTClient'; my @ENDPOINTS; sub has_endpoint { my ($method, $path_re, $sub) = @_; push @ENDPOINTS, [ $method, $path_re, $sub, ]; return; } sub _http_tiny_request { my ($self, $req_method, $req) = @_; die "req_method may only be 'request' at this time" if $req_method ne 'request'; my ($http_method, $url, $options) = @$req; my $path = URI->new( $url )->path(); $path =~ s{^.*api/v4/}{}; foreach my $endpoint (@ENDPOINTS) { my ($endpoint_method, $path_re, $sub) = @$endpoint; next if $endpoint_method ne $http_method; next if $path !~ $path_re; my @captures = ($path =~ $path_re); my ($status, $content) = $sub->( $self, [$http_method, $url, $options], @captures, ); $content = encode_json( $content ) if ref $content; return { status => $status, success => ($status =~ m{^2\d\d$}) ? 1 : 0, defined( $content ) ? (content=>$content) : (), }; } die "No endpoint matched the $http_method '$path' endpoint"; } =head1 ATTRIBUTES =head2 engine The L used behind the hood. =cut has engine => ( is => 'lazy', init_arg => undef, ); sub _build_engine { return GitLab::API::v4::Mock::Engine->new(); } =head1 USER ENDPOINTS =head2 GET users Handles L. =cut has_endpoint GET => qr{^users$}, sub{ my ($self) = @_; return 200, $self->engine->users(); }; =head2 GET user/:id Handles L. =cut has_endpoint GET => qr{^users/(\d+)$}, sub{ my ($self, $req, $id) = @_; my $user = $self->engine->user( $id ); return 404 if !$user; return 200, $user; }; =head2 POST users Handles L. =cut has_endpoint POST => qr{^users$}, sub{ my ($self, $req) = @_; my $user = decode_json( $req->[2]->{content} ); $self->engine->create_user( $user ); return 204; }; =head2 PUT user/:id Handles L. =cut has_endpoint PUT => qr{^users/(\d+)$}, sub{ my ($self, $req, $id) = @_; my $data = decode_json( $req->[2]->{content} ); my $user = $self->engine->update_user( $id, $data ); return 404 if !$user; return 204; }; =head2 DELETE user/:id Handles L. =cut has_endpoint DELETE => qr{^users/(\d+)$}, sub{ my ($self, $req, $id) = @_; my $user = $self->engine->delete_user( $id ); return 404 if !$user; return 204; }; 1; __END__ =head1 SUPPORT See L. =head1 AUTHORS See L. =head1 LICENSE See L. =cut Paginator.pm100644000765000024 754114440166670 20203 0ustar00aranstaff000000000000GitLab-API-v4-0.27/lib/GitLab/API/v4package GitLab::API::v4::Paginator; our $VERSION = '0.27'; =encoding utf8 =head1 NAME GitLab::API::v4::Paginator - Iterate through paginated GitLab v4 API records. =head1 DESCRIPTION There should be no need to create objects of this type directly, instead use L which simplifies things a bit. =cut use Carp qw( croak ); use Types::Common::String -types; use Types::Standard -types; use Moo; use strictures 2; use namespace::clean; =head1 REQUIRED ARGUMENTS =head2 method The name of the method subroutine to call on the L object to get records from. This method must accept a hash ref of parameters as the last argument, adhere to the C and C parameters, and return an array ref. =cut has method => ( is => 'ro', isa => NonEmptySimpleStr, required => 1, ); =head2 api The L object. =cut has api => ( is => 'ro', isa => InstanceOf[ 'GitLab::API::v4' ], required => 1, ); =head1 OPTIONAL ARGUMENTS =head2 args The arguments to use when calling the L, the same arguments you would use when you call the method yourself on the L object, minus the C<\%params> hash ref. =cut has args => ( is => 'ro', isa => ArrayRef, default => sub{ [] }, ); =head2 params The C<\%params> hash ref argument. =cut has params => ( is => 'ro', isa => HashRef, default => sub{ {} }, ); =head1 METHODS =cut has _records => ( is => 'rw', init_arg => undef, default => sub{ [] }, ); has _page => ( is => 'rw', init_arg => undef, default => 0, ); has _last_page => ( is => 'rw', init_arg => undef, default => 0, ); =head2 next_page while (my $records = $paginator->next_page()) { ... } Returns an array ref of records for the next page. =cut sub next_page { my ($self) = @_; return if $self->_last_page(); my $page = $self->_page() + 1; my $params = $self->params(); my $per_page = $params->{per_page} || 20; $params = { %$params, page => $page, per_page => $per_page, }; my $method = $self->method(); my $records = $self->api->$method( @{ $self->args() }, $params, ); croak("The $method method returned a non array ref value") if ref($records) ne 'ARRAY'; $self->_page( $page ); $self->_last_page( 1 ) if @$records < $per_page; $self->_records( [ @$records ] ); return if !@$records; return $records; } =head2 next while (my $record = $paginator->next()) { ... } Returns the next record in the current page. If all records have been exhausted then L will automatically be called. This way if you want to ignore pagination you can just call C over and over again to walk through all the records. =cut sub next { my ($self) = @_; my $records = $self->_records(); return shift(@$records) if @$records; return if $self->_last_page(); $self->next_page(); $records = $self->_records(); return shift(@$records) if @$records; return; } =head2 all my $records = $paginator->all(); This is just an alias for calling L over and over again to build an array ref of all records. =cut sub all { my ($self) = @_; $self->reset(); my @records; while (my $page = $self->next_page()) { push @records, @$page; } return \@records; } =head2 reset $paginator->reset(); Reset the paginator back to its original state on the first page with no records retrieved yet. =cut sub reset { my ($self) = @_; $self->_records( [] ); $self->_page( 0 ); $self->_last_page( 0 ); return; } 1; __END__ =head1 SUPPORT See L. =head1 AUTHORS See L. =head1 LICENSE See L. =cut RESTClient.pm100644000765000024 1573114440166670 20213 0ustar00aranstaff000000000000GitLab-API-v4-0.27/lib/GitLab/API/v4package GitLab::API::v4::RESTClient; our $VERSION = '0.27'; =encoding utf8 =head1 NAME GitLab::API::v4::RESTClient - The HTTP client that does the heavy lifting. =head1 DESCRIPTION Currently this class uses L and L to do its job. This may change, and the interface may change, so documentation is lacking in order to not mislead people. If you do want to customize how this class works then take a look at the source. =head1 ATTRIBUTES =head1 http_tiny_request my $req = $api->rest_client->http_tiny_request(); The most recent request arrayref as passed to L. If this is C then no request has been made. =head1 http_tiny_response my $res = $api->rest_client->http_tiny_response(); The most recent response hashref as passed back from L. If this is C and L is defined then no response was received and you will have encountered an error when making the request =cut use Carp qw(); use HTTP::Tiny::Multipart; use HTTP::Tiny; use JSON::MaybeXS; use Log::Any qw( $log ); use Path::Tiny; use Try::Tiny; use Types::Common::Numeric -types; use Types::Common::String -types; use Types::Standard -types; use URI::Escape; use URI; use Moo; use strictures 2; use namespace::clean; sub croak { local $Carp::Internal{ 'GitLab::API::v4' } = 1; local $Carp::Internal{ 'GitLab::API::v4::RESTClient' } = 1; return Carp::croak( @_ ); } sub croakf { my $msg = shift; $msg = sprintf( $msg, @_ ); return croak( $msg ); } has _clean_base_url => ( is => 'lazy', init_arg => undef, builder => '_build_clean_base_url', ); sub _build_clean_base_url { my ($self) = @_; my $url = $self->base_url(); # Remove any leading slash so that request() does not build URLs # with double slashes when joining the base_url with the path. # If double slashes were allowed then extra unecessary redirects # could happen. $url =~ s{/+$}{}; return URI->new( $url )->canonical(); } has base_url => ( is => 'ro', isa => NonEmptySimpleStr, required => 1, ); has retries => ( is => 'ro', isa => PositiveOrZeroInt, default => 0, ); has http_tiny => ( is => 'lazy', isa => InstanceOf[ 'HTTP::Tiny' ], ); sub _build_http_tiny { return HTTP::Tiny->new( verify_SSL => 1 ); } has json => ( is => 'lazy', isa => HasMethods[ 'encode', 'decode' ], ); sub _build_json { return JSON::MaybeXS->new(utf8 => 1, allow_nonref => 1); } has http_tiny_request => ( is => 'ro', writer => '_set_request', clearer => '_clear_request', init_arg => undef, ); has http_tiny_response => ( is => 'ro', writer => '_set_response', clearer => '_clear_response', init_arg => undef, ); # The purpose of this method is for tests to have a place to inject themselves. sub _http_tiny_request { my ($self, $req_method, $req) = @_; return $self->http_tiny->$req_method( @$req ); } sub request { my ($self, $verb, $raw_path, $path_vars, $options) = @_; $self->_clear_request(); $self->_clear_response(); $options = { %{ $options || {} } }; my $query = delete $options->{query}; my $content = delete $options->{content}; my $headers = $options->{headers} = { %{ $options->{headers} || {} } }; # Convert foo/:bar/baz into foo/%s/baz. my $path = $raw_path; $path =~ s{:[^/]+}{%s}g; # sprintf will throw if the number of %s doesn't match the size of @$path_vars. # Might be nice to catch that and provide a better error message, but that should # never happen as the API methods verify the argument size before we get here. $path = sprintf($path, (map { uri_escape($_) } @$path_vars)) if @$path_vars; $log->tracef( 'Making %s request against %s', $verb, $path ); my $url = $self->_clean_base_url->clone(); $url->path( $url->path() . '/' . $path ); $url->query_form( $query ) if defined $query; $url = "$url"; # No more changes to the url from this point forward. my $req_method = 'request'; my $req = [ $verb, $url, $options ]; if ($verb eq 'POST' and ref($content) eq 'HASH' and $content->{file}) { $content = { %$content }; my $file = path( delete $content->{file} ); unless (-f $file and -r $file) { local $Carp::Internal{ 'GitLab::API::v4' } = 1; local $Carp::Internal{ 'GitLab::API::v4::RESTClient' } = 1; croak "File $file is not readable"; } # Might as well mask the filename, but leave the extension. my $filename = $file->basename(); # foo/bar.txt => bar.txt my $data = { file => { filename => $filename, content => $file->slurp(), }, }; $req->[0] = $req->[1]; # Replace method with url. $req->[1] = $data; # Put data where url was. # So, req went from [$verb,$url,$options] to [$url,$data,$options], # per the post_multipart interface. $req_method = 'post_multipart'; $content = undef if ! %$content; } if (ref $content) { $content = $self->json->encode( $content ); $headers->{'content-type'} = 'application/json'; $headers->{'content-length'} = length( $content ); } $options->{content} = $content if defined $content; $self->_set_request( $req ); my $res; my $tries_left = $self->retries(); do { $res = $self->_http_tiny_request( $req_method, $req ); if ($res->{status} =~ m{^5}) { $tries_left--; $log->warn('Request failed; retrying...') if $tries_left > 0; } else { $tries_left = 0 } } while $tries_left > 0; $self->_set_response( $res ); if ($res->{status} eq '404' and $verb eq 'GET') { return undef; } # Special case for: # https://github.com/bluefeet/GitLab-API-v4/issues/35#issuecomment-515533017 if ($res->{status} eq '403' and $verb eq 'GET' and $raw_path eq 'projects/:project_id/releases/:tag_name') { return undef; } if ($res->{success}) { return undef if $res->{status} eq '204'; my $decode = $options->{decode}; $decode = 1 if !defined $decode; return $res->{content} if !$decode; return try{ $self->json->decode( $res->{content} ); } catch { croakf( 'Error decoding JSON (%s %s %s): ', $verb, $url, $res->{status}, $_, ); }; } my $glimpse = $res->{content} || ''; $glimpse =~ s{\s+}{ }g; if ( length($glimpse) > 50 ) { $glimpse = substr( $glimpse, 0, 50 ); $glimpse .= '...'; } croakf( 'Error %sing %s (HTTP %s): %s %s', $verb, $url, $res->{status}, ($res->{reason} || 'Unknown'), $glimpse, ); } 1; __END__ =head1 SUPPORT See L. =head1 AUTHORS See L. =head1 LICENSE See L. =cut WWWClient.pm100644000765000024 1044414440166670 20116 0ustar00aranstaff000000000000GitLab-API-v4-0.27/lib/GitLab/API/v4package GitLab::API::v4::WWWClient; our $VERSION = '0.27'; =encoding utf8 =head1 NAME GitLab::API::v4::WWWClient - A client that works against the GitLab web site. =head1 SYNOPSIS use GitLab::API::v4::WWWClient; my $client = GitLab::API::v4::WWWClient->new( url => 'https://git.example.com/', ); $client->sign_in( $username, $password ); my $res = $client->get( $path ); =head1 DESCRIPTION This class makes it possible to interact with the GitLab web site. =cut use Carp qw( croak ); use HTTP::Tiny; use List::Util qw( first ); use Types::Common::String qw( NonEmptySimpleStr ); use Moo; use strictures 2; use namespace::clean; has _session => ( is => 'rw', init_arg => undef, ); sub _croak_res { my ($verb, $url, $res) = @_; return if $res->{status} !~ m{^5}; local $Carp::Internal{ 'GitLab::API::v4::WWWClient' } = 1; croak sprintf( 'Error %sing %s (HTTP %s): %s', uc($verb), $url, $res->{status}, ($res->{reason} || 'Unknown'), ); } =head1 REQUIRED ARGUMENTS =head2 url This is the base URL to your GitLab web site. =cut has url => ( is => 'ro', isa => NonEmptySimpleStr, required => 1, ); =head1 METHODS =head2 sign_in $client->sign_in( $username, $password ); Signs in the client given the username and password. =cut sub sign_in { my ($self, $username, $password) = @_; my $tiny = HTTP::Tiny->new( verify_SSL => 1, max_redirect => 0, ); my $base_url = $self->url(); $base_url =~ s{/$}{}; my $sign_in_url = "$base_url/users/sign_in"; my $load_res = $tiny->get( $sign_in_url ); _croak_res( 'get', $sign_in_url, $load_res ); my $token = ( $load_res->{content} =~ m{name="authenticity_token" value="(.+?)"} )[0]; my ($first_session) = do{ my $set_cookie_headers = $load_res->{headers}->{ 'set-cookie' }; $set_cookie_headers = [ $set_cookie_headers ] if !ref $set_cookie_headers; my $value = first { $_ =~ m{^_gitlab_session=(.*)} } @$set_cookie_headers; $value =~ s{^_gitlab_session=}{}r; }; my $submit_res = $tiny->post_form( $sign_in_url, { 'utf8' => '✓', 'authenticity_token' => $token, 'user[login]' => $username, 'user[password]' => $password, 'user[remember_me]' => 0, }, { headers => { 'Referer' => $sign_in_url, 'Cookie' => "_gitlab_session=$first_session", 'Cookie2' => '$Version="1"', }, }, ); _croak_res( 'post', $sign_in_url, $submit_res ); my ($second_session) = do{ my $set_cookie_headers = $submit_res->{headers}->{ 'set-cookie' }; $set_cookie_headers = [ $set_cookie_headers ] if !ref $set_cookie_headers; my $value = first { $_ =~ m{^_gitlab_session=(.*)} } @$set_cookie_headers; $value =~ s{^_gitlab_session=}{}r; }; my $home_res = $tiny->get( $base_url, { headers => { 'Referer' => $sign_in_url, 'Cookie' => "_gitlab_session=$second_session", 'Cookie2' => '$Version="1"', }, }, ); _croak_res( 'get', $base_url, $home_res ); my $ok = ( $home_res->{content} =~ m{sign-out-link} ) ? 1 : 0; croak 'Failed to sign in' if !$ok; $self->_session( $second_session ); return; } =head2 get my $res = $client->get( $path ); Gets the path and returns the L response hash. =cut sub get { my ($self, $path) = @_; my $tiny = HTTP::Tiny->new( verify_SSL => 1, max_redirect => 0, ); my $base_url = $self->url(); $base_url =~ s{/$}{}; $path =~ s{^/}{}; my $url = "$base_url/$path"; my $session = $self->_session(); my $headers = $session ? { 'Cookie' => "_gitlab_session=$session", 'Cookie2' => '$Version="1"', } : {}; my $res = $tiny->get( $url, { headers=>$headers }, ); _croak_res( 'get', $url, $res ); return $res; } 1; __END__ =head1 SUPPORT See L. =head1 AUTHORS See L. =head1 LICENSE See L. =cut minil.toml100644000765000024 15714440166670 15030 0ustar00aranstaff000000000000GitLab-API-v4-0.27name = "GitLab-API-v4" authority = "cpan:BLUEFEET" markdown_maker = "Pod::Markdown::Github" license = "perl_5" gitlab-api-v4100755000765000024 1225714440166670 16661 0ustar00aranstaff000000000000GitLab-API-v4-0.27/script#!/usr/bin/env perl use strictures 2; use GitLab::API::v4::Config; use GitLab::API::v4::Constants qw( :all ); use GitLab::API::v4; use JSON::MaybeXS; use Log::Any qw( $log ); use Log::Any::Adapter::Screen; use Log::Any::Adapter; use Pod::Usage qw( pod2usage ); use Try::Tiny; if (!@ARGV) { print "USAGE: gitlab-api-v4 help\n"; exit 0; } my $config = GitLab::API::v4::Config->new(); $config->get_options( 'a|all' => \my $all, 'p|pretty' => \my $pretty, 'c|canonical' => \my $canonical, 'h|help' => \my $help, 'v|verbose' => \my $verbose, 'q|quiet' => \my $quiet, ); if ($help or (@ARGV and $ARGV[0] eq 'help')) { pod2usage( -verbose => 2 ); exit 0; } if (@ARGV and $ARGV[0] eq 'configure') { $config->configure(); exit 0; } my $min_level = 'info'; $min_level = 'trace' if $verbose; $min_level = 'error' if $quiet; Log::Any::Adapter->set( 'Screen', min_level => $min_level, stderr => 1, ); my $method = shift @ARGV; die "ERROR: No API method specified.\n" if !$method; my $orig_method = $method; $method =~ s{-}{_}g; die "ERROR: Unknown API method \"$orig_method\".\n" if !GitLab::API::v4->can( $method ); my @args; while (@ARGV and $ARGV[0] !~ m{:}) { my $arg = shift @ARGV; next if $arg eq '--'; push @args, $arg; } my $aliases = { access_level => { guest => $GITLAB_ACCESS_LEVEL_GUEST, reporter => $GITLAB_ACCESS_LEVEL_REPORTER, developer => $GITLAB_ACCESS_LEVEL_DEVELOPER, master => $GITLAB_ACCESS_LEVEL_MASTER, owner => $GITLAB_ACCESS_LEVEL_OWNER, }, }; my $params = {}; while (@ARGV) { my $arg = shift @ARGV; next if $arg eq '--'; if ($arg =~ m{^([^:]+):(.*)$}s) { my ($key, $value) = ($1, $2); $key =~ s{-}{_}g; if ($aliases->{$key} and exists $aliases->{$key}->{$value}) { $value = $aliases->{$key}->{$value}; } $params->{$key} = $value; } else { die "ERROR: Invalid API parameter \"$arg\".\n"; } } # Make sure we don't leak tokens in the logs. my $debug_config = { %{ $config->args() } }; $debug_config->{private_token} = 'xxxx' if $debug_config->{private_token}; $debug_config->{access_token} = 'xxxx' if $debug_config->{access_token}; $log->debug('config: ' . encode_json($debug_config)); $log->debug("method: $method"); $log->debug('arguments: ' . encode_json(\@args)); $log->debug('params: ' . encode_json($params)); my $api = GitLab::API::v4->new( $config->args() ); if ($all) { unshift @args, $method; $method = 'paginator'; } my $data = $api->$method( @args, %$params ? $params : (), ); $data = $data->all() if $all; binmode STDOUT, ':utf8'; my $json = JSON::MaybeXS->new(allow_nonref => 1); $json->pretty() if $pretty; $json->canonical() if $canonical; print $json->encode( $data ); __END__ =encoding utf8 =head1 NAME gitlab-api-v4 - Command line interface to the GitLab API v4. =head1 SYNOPSIS # Generally: gitlab-api-v4 [] [ ...] [: ...] # List all groups: gitlab-api-v4 groups # List information about a project: gitlab-api-v4 project # Create an admin user: gitlab-api-v4 create-user \ username:foo \ password:xxxxxxxx \ email:user@example.com \ "name:Foo Smith" \ admin:1 =head1 CONFIGURING You may configure this module with environment variables, command line options, and a configuration file. To setup the configuration file run: gitlab-api-v4 configure This will ask several interactive questions to help you configure this script. The information, which may include GitLab authentication tokens, is stored in C<~/.gitlab-api-v4.json>. Read more at L. =head1 OPTIONS =head2 url --url= Sets L. =head2 access-token --access-token= Sets L. =head2 private-token --private-token= Sets L. =head2 retries --retries= Sets L. =head2 all --all -a Retrieves all results when the results would normally be paged. See L for details. =head2 pretty --pretty -p Enables the L feature. =head2 canonical --canonical -c Enables the L feature. =head1 API METHOD The API method to call - one of the methods documented in L. =head1 API ARGUMENTS ... Any arguments that the L requires. =head1 API PARAMETERS : ... Any parameters that the L accepts. =head2 access-level access-level:guest access-level:reporter access-level:developer access-level:master access-level:owner There are mappings setup for the various C parameters so that you can, for example, specify C and it will be automatically converted to C. =head1 SUPPORT See L. =head1 AUTHORS See L. =head1 COPYRIGHT AND LICENSE See L. =cut gitlab-api-v4.t100755000765000024 115514440166670 16035 0ustar00aranstaff000000000000GitLab-API-v4-0.27/t#!/usr/bin/env perl use strictures 2; use Test2::Require::AuthorTesting; use Test2::V0; use IPC::Cmd qw(); use JSON::MaybeXS qw(); my $json = JSON::MaybeXS->new(allow_nonref => 1); my $project = run('create-project', 'name:test-gitlab-api-v4'); run('delete-project', $project->{id}); ok( 1, 'made it to the end' ); done_testing; sub run { my($ok, $error, $full, $stdout, $stderr) = IPC::Cmd::run( command => [$^X, '-I', 'lib', 'script/gitlab-api-v4', @_] ); if ($ok) { $stdout = join('',@$stdout); return $json->decode( $stdout ); } die join('', @$stderr) . $error; } 1; regression.t100755000765000024 1423114440166670 15674 0ustar00aranstaff000000000000GitLab-API-v4-0.27/t#!/usr/bin/env perl use strictures 2; use Test2::Require::AuthorTesting; use Test2::V0; use Log::Any::Adapter 'TAP'; use MIME::Base64 qw( decode_base64 ); use Path::Tiny; use GitLab::API::v4::Config; use GitLab::API::v4::WWWClient; use GitLab::API::v4; my $config = GitLab::API::v4::Config->new(); my $api = GitLab::API::v4->new( $config->args() ); subtest projects => sub{ my $stamp = time(); my $project_name = "gitlab-api-v4-test-$stamp"; my $created_project = $api->create_project( { name=>$project_name }, ); ok( $created_project, 'project created' ); my $project_id = $created_project->{id}; my $project = $api->project( $project_id ); ok( $project, 'project found' ); subtest upload_file_to_project => sub{ my $file = Path::Tiny->tempfile( SUFFIX => '.txt' ); my $file_content = 'Hello GitLab, this is a test of ' . ref($api) . '.'; $file->spew( $file_content ); my $upload = $api->upload_file_to_project( $project_id, { file=>"$file" }, ); ok( $upload->{url}, 'got an upload response' ); my $www_base_url = $api->url(); $www_base_url =~ s{/api/v4.*$}{}; my $www_client = GitLab::API::v4::WWWClient->new( url => $www_base_url, ); $www_client->sign_in( 'root', $ENV{GITLAB_API_V4_ROOT_PASSWORD}, ); my $project_path = $project->{path_with_namespace}; my $upload_path = $upload->{url}; my $download_path = "$project_path/$upload_path"; my $res = $www_client->get( $download_path ); is( $res->{content}, $file_content, 'upload_file_to_project worked' ); }; subtest 'file methods' => sub{ $api->create_file( $project_id, 'foo/bar.txt', { branch => 'master', content => 'Test of create file.', commit_message => 'This is a commit.', }, ); my $file = $api->file( $project_id, 'foo/bar.txt', { ref=>'master' }, ); is( decode_base64( $file->{content} ), 'Test of create file.', 'created file is there; and looks right', ); my $content = $api->raw_file( $project_id, 'foo/bar.txt', { ref=>'master' }, ); is( $content, 'Test of create file.', 'able to retrieve the file raw', ); $api->edit_file( $project_id, 'foo/bar.txt', { branch => 'master', content => 'Test of edit file.', commit_message => 'This is the next commit.', }, ); my $edited_file = $api->file( $project_id, 'foo/bar.txt', { ref=>'master' }, ); is( decode_base64( $edited_file->{content} ), 'Test of edit file.', 'editing a file worked', ); $api->delete_file( $project_id, 'foo/bar.txt', { branch => 'master', commit_message => 'This is the last commit.', }, ); $file = $api->file( $project_id, 'foo/bar.txt', { ref=>'master' }, ); is( $file, undef, 'file was deleted', ); }; subtest hooks => sub{ my $hook = $api->create_project_hook( $project->{id}, { url=>'http://example.com/gitlab-hook-1' }, ); ok( $hook, 'create_project_hook returned the hook' ); $hook = $api->edit_project_hook( $project->{id}, $hook->{id}, { url=>'http://example.com/gitlab-hook-2' }, ); ok( $hook, 'edit_project_hook returned the hook' ); my $hook_id = $hook->{id}; $hook = $api->project_hook( $project->{id}, $hook_id ); ok( $hook, 'project_hook returned the hook' ); is( $hook->{url}, 'http://example.com/gitlab-hook-2', 'hook looks right' ); $api->delete_project_hook( $project->{id}, $hook_id ); $hook = $api->project_hook( $project->{id}, $hook_id ); ok( (!$hook), 'delete_project_hook seems to have worked' ); like( dies { $api->delete_project_hook( $project->{id}, $hook_id ) }, qr{\b404\b}, 'a subsequent delete_project_hook throws', ); }; $api->delete_project( $project_id ); pass 'project deleted'; }; subtest users => sub{ my $stamp = time(); my $username = "gitlab-api-v4-test-$stamp"; $api->create_user({ username => $username, email => "$username\@example.com", password => 'd5fzHF7tfgh', name => 'GitLabAPIv4 Test', }); pass 'user created'; my $users = $api->users({ username => $username }); is( @$users+0, 1, 'one user found' ); my $user = shift @$users; is( $user->{username}, $username, 'user has correct username' ); die 'Incorrect user found' if $user->{username} ne $username; my $user_id = $user->{id}; ok( $api->block_user($user_id), 'user blocked' ); ok( (!$api->block_user($user_id)), 'user cannot be blocked again' ); ok( $api->unblock_user($user_id), 'user unblocked' ); ok( (!$api->unblock_user($user_id)), 'user cannot be unblocked again' ); $api->delete_user($user_id); pass 'user deleted'; }; subtest failures => sub{ is( $api->user( 12345678 ), undef, 'GETing an unknown entity returns undef' ); my $err_re = qr{^Error PUTing \S+/users/12345678 \(HTTP 404\): Not Found \{"message":"404 User Not Found"\}}; like( dies{ $api->edit_user( 12345678, {} ) }, $err_re, 'POSTing an unknown entity throws a specific exception' ); }; done_testing; sub join_paths { my @paths = @_; return() if !@paths; return @paths if @paths==1; my $first = shift @paths; $first =~ s{/$}{}; my $last = pop @paths; $last =~ s{^/}{}; @paths = ( map { $_ =~ s{^/?(.*?)/?$}{$1}; $_ } @paths ); return join('/', $first, @paths, $last); } unit.t100755000765000024 257314440166670 14461 0ustar00aranstaff000000000000GitLab-API-v4-0.27/t#!/usr/bin/env perl use strictures 2; use Test2::V0; use GitLab::API::v4::Mock; subtest users => sub{ my @users = (); my $next_id = 1; my $api = GitLab::API::v4::Mock->new(); my @expected; is( $api->users(), \@expected, 'users is empty' ); $api->create_user({}); push @expected, {id=>1}; is( $api->users(), \@expected, 'one user created' ); $api->create_user({}); push @expected, {id=>2}; $api->create_user({}); push @expected, {id=>3}; is( $api->users(), \@expected, 'two more users created' ); $api->edit_user( 3, {name=>'foo'}); $expected[2]->{name} = 'foo'; is( $api->users(), \@expected, 'user was updated' ); $api->delete_user( 2 ); splice @expected, 1, 1; is( $api->users(), \@expected, 'user was deleted' ); }; subtest reqres => sub{ my $api = GitLab::API::v4::Mock->new(); is( $api->rest_client->http_tiny_request(), undef, 'no request' ); is( $api->rest_client->http_tiny_response(), undef, 'no response' ); $api->users(); is( $api->rest_client->http_tiny_request(), [ 'GET', 'https://example.com/api/v4/users', {headers=>{}} ], 'recorded request arrayref looks great', ); is( $api->rest_client->http_tiny_response(), { success=>1, status=>200, content=>'[]' }, 'recorded response hashref looks great', ); }; done_testing; META.yml100644000765000024 577614440166670 14330 0ustar00aranstaff000000000000GitLab-API-v4-0.27--- abstract: 'A complete GitLab API v4 client.' author: - 'Aran Clary Deltac ' build_requires: Log::Any::Adapter::TAP: '0.003003' MIME::Base64: '3.15' Test2::V0: '0.000094' configure_requires: Module::Build::Tiny: '0.035' dynamic_config: 0 generated_by: 'Minilla/v3.1.21, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: GitLab-API-v4 no_index: directory: - t - xt - inc - share - eg - examples - author - builder provides: GitLab::API::v4: file: lib/GitLab/API/v4.pm version: '0.27' GitLab::API::v4::Config: file: lib/GitLab/API/v4/Config.pm version: '0.27' GitLab::API::v4::Constants: file: lib/GitLab/API/v4/Constants.pm version: '0.27' GitLab::API::v4::Mock: file: lib/GitLab/API/v4/Mock.pm version: '0.27' GitLab::API::v4::Mock::Engine: file: lib/GitLab/API/v4/Mock/Engine.pm version: '0.27' GitLab::API::v4::Mock::RESTClient: file: lib/GitLab/API/v4/Mock/RESTClient.pm version: '0.27' GitLab::API::v4::Paginator: file: lib/GitLab/API/v4/Paginator.pm version: '0.27' GitLab::API::v4::RESTClient: file: lib/GitLab/API/v4/RESTClient.pm version: '0.27' GitLab::API::v4::WWWClient: file: lib/GitLab/API/v4/WWWClient.pm version: '0.27' 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::MaybeXS: '1.003007' List::Util: '0' 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' resources: bugtracker: https://github.com/bluefeet/GitLab-API-v4/issues homepage: https://github.com/bluefeet/GitLab-API-v4 repository: https://github.com/bluefeet/GitLab-API-v4.git version: '0.27' x_authority: cpan:BLUEFEET x_contributors: - 'Dan Book ' - 'Dave Webb ' - 'Dmitry Frolov ' - 'Dotan Dimet ' - 'Graham Knop ' - 'James Wright ' - 'Jonathan Taylor ' - 'José Joaquín Atria ' - 'Kieren Diment ' - 'Luc Didry ' - 'Marek R. Sotola ' - 'Nigel Gregoire ' - 'Simon Ruderich ' - 'Stig Palmquist ' - 'Thomas Klausner ' - 'g0t mi1k ' - 'gregor herrmann ' - 'royce55 ' - 'trunov-ms ' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' x_static_install: 1 MANIFEST100644000765000024 522514440166670 14175 0ustar00aranstaff000000000000GitLab-API-v4-0.27Build.PL Changes LICENSE META.json README.md author/README.pod author/config.yml author/footer.pm author/generate.pl author/header.pm author/sections/award_emoji.yml author/sections/boards.yml author/sections/branches.yml author/sections/broadcast_messages.yml author/sections/commits.yml author/sections/container_registry.yml author/sections/custom_attributes.yml author/sections/deploy_keys.yml author/sections/deployments.yml author/sections/discussions.yml author/sections/environments.yml author/sections/events.yml author/sections/features.yml author/sections/gitignores_templates.yml author/sections/gitlab_ci_ymls_templates.yml author/sections/group_access_requests.yml author/sections/group_badges.yml author/sections/group_boards.yml author/sections/group_level_variables.yml author/sections/group_members.yml author/sections/group_milestones.yml author/sections/groups.yml author/sections/issues.yml author/sections/jobs.yml author/sections/keys.yml author/sections/labels.yml author/sections/licenses_templates.yml author/sections/lint.yml author/sections/markdown.yml author/sections/merge_requests.yml author/sections/milestones.yml author/sections/namespaces.yml author/sections/notes.yml author/sections/notification_settings.yml author/sections/page_domains.yml author/sections/pipeline_schedules.yml author/sections/pipeline_triggers.yml author/sections/pipelines.yml author/sections/project_access_requests.yml author/sections/project_badges.yml author/sections/project_import_export.yml author/sections/project_level_variables.yml author/sections/project_members.yml author/sections/project_snippets.yml author/sections/projects.yml author/sections/protected_branches.yml author/sections/protected_tags.yml author/sections/release_links.yml author/sections/releases.yml author/sections/remote_mirrors.yml author/sections/repositories.yml author/sections/repository_files.yml author/sections/resource_label_events.yml author/sections/runners.yml author/sections/search.yml author/sections/services.yml author/sections/settings.yml author/sections/sidekiq_metrics.yml author/sections/snippets.yml author/sections/statistics.yml author/sections/system_hooks.yml author/sections/tags.yml author/sections/todos.yml author/sections/users.yml author/sections/version.yml author/sections/wikis.yml author/setup-test-container cpanfile lib/GitLab/API/v4.pm lib/GitLab/API/v4/Config.pm lib/GitLab/API/v4/Constants.pm lib/GitLab/API/v4/Mock.pm lib/GitLab/API/v4/Mock/Engine.pm lib/GitLab/API/v4/Mock/RESTClient.pm lib/GitLab/API/v4/Paginator.pm lib/GitLab/API/v4/RESTClient.pm lib/GitLab/API/v4/WWWClient.pm minil.toml script/gitlab-api-v4 t/gitlab-api-v4.t t/regression.t t/unit.t META.yml MANIFEST