public void setBucketAcl(String bucket, AclType acl) throws QiniuException { String url = String.format("%s/private?bucket=%s&private=%s", configuration.ucHost(), bucket, acl.getType()); Response res = post(url, null); if (!res.isOK()) { throw new QiniuException(res); } res.close(); }
public void setIndexPage(String bucket, IndexPageType type) throws QiniuException { String url = String.format("%s/noIndexPage?bucket=%s&noIndexPage=%s", configuration.ucHost(), bucket, type.getType()); Response res = post(url, null); if (!res.isOK()) { throw new QiniuException(res); } res.close(); }
public void setBucketAcl(String bucket, AclType acl) throws QiniuException { String url = String.format("%s/private?bucket=%s&private=%s", configuration.ucHost(), bucket, acl.getType()); Response res = post(url, null); if (!res.isOK()) { throw new QiniuException(res); } res.close(); }
public BucketInfo getBucketInfo(String bucket) throws QiniuException { String url = String.format("%s/v2/bucketInfo?bucket=%s", configuration.ucHost(), bucket); Response res = post(url, null); if (!res.isOK()) { throw new QiniuException(res); } BucketInfo info = res.jsonToObject(BucketInfo.class); res.close(); return info; }
public void setIndexPage(String bucket, IndexPageType type) throws QiniuException { String url = String.format("%s/noIndexPage?bucket=%s&noIndexPage=%s", configuration.ucHost(), bucket, type.getType()); Response res = post(url, null); if (!res.isOK()) { throw new QiniuException(res); } res.close(); }
public BucketInfo getBucketInfo(String bucket) throws QiniuException { String url = String.format("%s/v2/bucketInfo?bucket=%s", configuration.ucHost(), bucket); Response res = post(url, null); if (!res.isOK()) { throw new QiniuException(res); } BucketInfo info = res.jsonToObject(BucketInfo.class); res.close(); return info; }