T - Type of iterable objects@Immutable public final class RtPagination<T> extends Object implements Iterable<T>
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
);| Modifier and Type | Field and Description |
|---|---|
static RtValuePagination.Mapping<javax.json.JsonObject,javax.json.JsonObject> |
COPYING
Mapping that just copies JsonObject.
|
| Constructor and Description |
|---|
RtPagination(com.jcabi.http.Request req,
RtValuePagination.Mapping<T,javax.json.JsonObject> mpp)
Public ctor.
|
| Modifier and Type | Method and Description |
|---|---|
Iterator<T> |
iterator() |
RtValuePagination.Mapping<T,javax.json.JsonObject> |
mapping()
Mapping.
|
com.jcabi.http.Request |
request()
Entry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static final RtValuePagination.Mapping<javax.json.JsonObject,javax.json.JsonObject> COPYING
public RtPagination(com.jcabi.http.Request req,
RtValuePagination.Mapping<T,javax.json.JsonObject> mpp)
req - Requestmpp - MappingCopyright © 2012–2018 jcabi.com. All rights reserved.