@@ -85,6 +85,89 @@ public Stream<Tag> getTagsStream(Object projectIdOrPath) throws GitLabApiExcepti
8585 return (getTags (projectIdOrPath , getDefaultPerPage ()).stream ());
8686 }
8787
88+ /**
89+ * Get a list of repository tags from a project, sorted by name in reverse alphabetical order.
90+ *
91+ * <pre><code>GitLab Endpoint: GET /projects/:id/repository/tags</code></pre>
92+ *
93+ * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
94+ * @param orderBy return tags ordered by name or updated fields. Default is updated
95+ * @param sortOrder return tags sorted in asc or desc order. Default is desc
96+ * @param search return list of tags matching the search criteria
97+ * @return the list of tags for the specified project ID
98+ * @throws GitLabApiException if any exception occurs
99+ * @since GitLab 11.8
100+ */
101+ public List <Tag > getTags (Object projectIdOrPath , TagOrderBy orderBy , SortOrder sortOrder , String search ) throws GitLabApiException {
102+ return (getTags (projectIdOrPath , orderBy , sortOrder , search , getDefaultPerPage ()).all ());
103+ }
104+
105+ /**
106+ * Get a list of repository tags from a project, sorted by name in reverse alphabetical order and in the specified page range.
107+ *
108+ * <pre><code>GitLab Endpoint: GET /projects/:id/repository/tags</code></pre>
109+ *
110+ * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
111+ * @param orderBy return tags ordered by name or updated fields. Default is updated
112+ * @param sortOrder return tags sorted in asc or desc order. Default is desc
113+ * @param search return list of tags matching the search criteria
114+ * @param page the page to get
115+ * @param perPage the number of Tag instances per page
116+ * @return the list of tags for the specified project ID
117+ * @throws GitLabApiException if any exception occurs
118+ * @since GitLab 11.8
119+ */
120+ public List <Tag > getTags (Object projectIdOrPath , TagOrderBy orderBy , SortOrder sortOrder , String search , int page , int perPage ) throws GitLabApiException {
121+ Form formData = new GitLabApiForm ()
122+ .withParam ("order_by" , orderBy )
123+ .withParam ("sort" , sortOrder )
124+ .withParam ("search" , search )
125+ .withParam (PAGE_PARAM , page )
126+ .withParam (PER_PAGE_PARAM , perPage );
127+ Response response = get (Response .Status .OK , formData .asMap (),
128+ "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "tags" );
129+ return (response .readEntity (new GenericType <List <Tag >>() { }));
130+ }
131+
132+ /**
133+ * Get a list of repository tags from a project, sorted by name in reverse alphabetical order.
134+ *
135+ * <pre><code>GitLab Endpoint: GET /projects/:id/repository/tags</code></pre>
136+ *
137+ * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
138+ * @param orderBy return tags ordered by name or updated fields. Default is updated
139+ * @param sortOrder return tags sorted in asc or desc order. Default is desc
140+ * @param search return list of tags matching the search criteria
141+ * @param itemsPerPage the number of Project instances that will be fetched per page
142+ * @return the Pager of tags for the specified project ID
143+ * @throws GitLabApiException if any exception occurs
144+ * @since GitLab 11.8
145+ */
146+ public Pager <Tag > getTags (Object projectIdOrPath , TagOrderBy orderBy , SortOrder sortOrder , String search , int itemsPerPage ) throws GitLabApiException {
147+ Form formData = new GitLabApiForm ()
148+ .withParam ("order_by" , orderBy )
149+ .withParam ("sort" , sortOrder )
150+ .withParam ("search" , search );
151+ return (new Pager <Tag >(this , Tag .class , itemsPerPage , formData .asMap (), "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "tags" ));
152+ }
153+
154+ /**
155+ * Get a Stream of repository tags from a project, sorted by name in reverse alphabetical order.
156+ *
157+ * <pre><code>GitLab Endpoint: GET /projects/:id/repository/tags</code></pre>
158+ *
159+ * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
160+ * @param orderBy return tags ordered by name or updated fields. Default is updated
161+ * @param sortOrder return tags sorted in asc or desc order. Default is desc
162+ * @param search return list of tags matching the search criteria
163+ * @return a Stream of tags for the specified project ID
164+ * @throws GitLabApiException if any exception occurs
165+ * @since GitLab 11.8
166+ */
167+ public Stream <Tag > getTagsStream (Object projectIdOrPath , TagOrderBy orderBy , SortOrder sortOrder , String search ) throws GitLabApiException {
168+ return (getTags (projectIdOrPath , orderBy , sortOrder , search , getDefaultPerPage ()).stream ());
169+ }
170+
88171 /**
89172 * Get a specific repository tag determined by its name.
90173 *
0 commit comments