Package com.jcabi.github
Class RtPagination<T>
java.lang.Object
com.jcabi.github.RtPagination<T>
- Type Parameters:
T- Type of iterable objects
- All Implemented Interfaces:
Iterable<T>
GitHub pagination.
This class is a convenient iterator over multiple JSON objects returned by GitHub API. For example, to iterate through notifications (see Notifications API) you can use this code:
Iterable<JsonObject> notifications = new RtPagination<>(
new RtGitHub(oauth).entry()
.uri().path("/notifications").back(),
RtPagination.COPYING
);- Since:
- 0.11
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RtValuePagination.Mapping<jakarta.json.JsonObject,jakarta.json.JsonObject> Mapping that just copies JsonObject. -
Constructor Summary
ConstructorsConstructorDescriptionRtPagination(com.jcabi.http.Request req, RtValuePagination.Mapping<T, jakarta.json.JsonObject> mpp) Public ctor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
COPYING
public static final RtValuePagination.Mapping<jakarta.json.JsonObject,jakarta.json.JsonObject> COPYINGMapping that just copies JsonObject.- Suppressed Checkstyle violations:
- LineLength (3 lines)
-
-
Constructor Details
-
RtPagination
public RtPagination(com.jcabi.http.Request req, RtValuePagination.Mapping<T, jakarta.json.JsonObject> mpp) Public ctor.- Parameters:
req- Requestmpp- Mapping
-
-
Method Details