我试图使用以下代码列出来自cloudinary的所有图像,但我得到“未实现异常”
Map config = ObjectUtils.asMap(
"cloud_name", Config.CLOUDINARY_CLOUD_NAME,
"api_key", Config.CLOUDINARY_API_KEY,
"api_secret", Config.CLOUDINARY_API_SECRET);
Cloudinary cloudinary = new Cloudinary(config);
Api api = cloudinary.api();
Map result;
try {
result = api.resources(ObjectUtils.emptyMap());
} catch (Exception e) {
e.printStackTrace();
}
似乎来自
public ApiResponse callApi(HttpMethod method, Iterable<String> uri, Map<String, ? extends Object> params, Map options) throws Exception {
throw new Exception("not implemented");
}
// function parameter values
this = {ApiStrategy@4487}
api = {Api@4499}
shadow$_klass_ = {Class@4338} "class com.cloudinary.android.ApiStrategy"
shadow$_monitor_ = -2091658589
method = {Api$HttpMethod@4395} "GET"
name = {String@4396} "GET"
ordinal = 0
shadow$_klass_ = {Class@4382} "class com.cloudinary.Api$HttpMethod"
shadow$_monitor_ = -2098674761
uri = {ArrayList@4505} size = 2
0 = {String@4400} "resources"
1 = {String@4374} "image"
params = {HashMap@4516} size = 0
options = {Collections$EmptyMap@4371} size = 0
答案 0 :(得分:0)
由于Android是客户端环境,而Admin-API被指定为在服务器端提供服务,因此其原始Android的方法并未实现。
话虽如此,您可以使用ADMIN-API端点自行构建HTTP请求,并发出它以收集您需要的信息。 有关端点和构建HTTP请求的更多信息,请参阅Cloudinary的文档:http://cloudinary.com/documentation/admin_api