Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
ce8a9830
Unverified
Commit
ce8a9830
authored
Apr 05, 2023
by
Matthias Fussenegger
Committed by
GitHub
Apr 05, 2023
Browse files
Fix "Results Paging" code example in README.md (#938)
parent
dc0f9f25
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
ce8a9830
...
...
@@ -175,10 +175,10 @@ GitLab4J-API provides an easy to use paging mechanism to page through lists of r
Here are a couple of examples on how to use the Pager:
```
java
// Get a Pager instance that will page through the projects with 10 projects per page
Pager
<
Project
>
projectPager
=
git
l
abApi
.
getProject
s
Api
().
getProjects
(
10
);
Pager
<
Project
>
projectPager
=
git
L
abApi
.
getProjectApi
().
getProjects
(
10
);
// Iterate through the pages and print out the name and description
while
(
project
s
Pager
.
hasNext
())
)
{
while
(
projectPager
.
hasNext
())
{
for
(
Project
project
:
projectPager
.
next
())
{
System
.
out
.
println
(
project
.
getName
()
+
" -: "
+
project
.
getDescription
());
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment