T - Type of iterable objects@Immutable public final class RtPagination<T> extends RtValuePagination<T,javax.json.JsonObject>
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
);RtValuePagination.Mapping<X,P extends javax.json.JsonValue>| 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.
|
public static final RtValuePagination.Mapping<javax.json.JsonObject,javax.json.JsonObject> COPYING
public RtPagination(@NotNull(message="request can\'t be NULL")
com.jcabi.http.Request req,
@NotNull(message="mapping can\'t be NULL")
RtValuePagination.Mapping<T,javax.json.JsonObject> mpp)
req - Requestmpp - MappingCopyright © 2012–2014 jcabi.com. All rights reserved.