@@ -162,6 +162,35 @@ public List<Job> getJobsForPipeline(Object projectIdOrPath, int pipelineId, JobS
162162 return (response .readEntity (new GenericType <List <Job >>() {}));
163163 }
164164
165+ /**
166+ * Get a Pager of jobs in a pipeline.
167+ *
168+ * <pre><code>GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id/jobs</code></pre>
169+ *
170+ * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
171+ * @param pipelineId the pipeline ID to get the list of jobs for
172+ * @param itemsPerPage the number of Job instances that will be fetched per page
173+ * @return a list containing the jobs for the specified project ID and pipeline ID
174+ * @throws GitLabApiException if any exception occurs during execution
175+ */
176+ public Pager <Job > getJobsForPipeline (Object projectIdOrPath , int pipelineId , int itemsPerPage ) throws GitLabApiException {
177+ return (new Pager <Job >(this , Job .class , itemsPerPage , getDefaultPerPageParam (),
178+ "projects" , getProjectIdOrPath (projectIdOrPath ), "pipelines" , pipelineId , "jobs" ));
179+ }
180+
181+ /**
182+ * Get a Stream of jobs in a pipeline.
183+ * <pre><code>GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id/jobs</code></pre>
184+ *
185+ * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
186+ * @param pipelineId the pipeline ID to get the list of jobs for
187+ * @return a Stream containing the jobs for the specified project ID
188+ * @throws GitLabApiException if any exception occurs during execution
189+ */
190+ public Stream <Job > getJobsStream (Object projectIdOrPath , int pipelineId ) throws GitLabApiException {
191+ return (getJobsForPipeline (projectIdOrPath , pipelineId , getDefaultPerPage ()).stream ());
192+ }
193+
165194 /**
166195 * Get single job in a project.
167196 *
0 commit comments