/**
* Get manage sources for the given type
*/
public FutureData<ManagedSourceList> get(ManagedDataSourceType type, int page, int perPage) {
FutureData<ManagedSourceList> future = new FutureData<>();
ParamBuilder b = newParams();
if (type != null) {
b.put("source_type", type.value());
}
if (page > 0) {
b.put("page", page);
}
if (perPage > 0) {
b.put("per_page", perPage);
}
URI uri = b.forURL(config.newAPIEndpointURI(GET));
Request request = config.http().
GET(uri, new PageReader(newRequestCallback(future, new ManagedSourceList(), config)));
performRequest(future, request);
return future;
}