在cloudant java客户端(http://www.javadoc.io/doc/com.cloudant/cloudant-client/2.2.0)中是否支持此列表功能?
https://cloudant.com/blog/building-custom-dashboards-with-geckoboard-and-cloudant
答案 0 :(得分:1)
没有特定的API调用可以与java-cloudant 2.2.0中的_list
端点进行交互。
但是,可以手动设置请求,因此您可以尝试以下方法:
// Compose the URI and create a HttpConnection to GET it
URI listRequestURI = new URI(db.getDBUri().toString()
+ "/_design/your-designdoc/_list/your-list/your-view");
HttpConnection listRequest = Http.GET(listRequestURI);
// Execute the request and get the response
HttpConnection listResponse = account.executeRequest(listRequest);
// Get the response in the desired format and process
listResponse.responseAsString();
// or responseAsBytes()
// or responseAsInputStream()