Пример #1
0
 public String mediaCreate(String url, DCArray assets_names, DCObject meta) throws Exception {
   DCObject args = DCObject.create().push("url", url);
   if (assets_names != null && assets_names.size() > 0) {
     args.push("assets_names", assets_names);
   }
   if (meta != null && meta.size() > 0) {
     args.push("meta", meta);
   }
   DCObject result = this.call("media.create", args);
   return result.pull("id");
 }
Пример #2
0
 public DCObject fileUpload(Boolean status, String jsonp_cb, String target) throws Exception {
   DCObject args = DCObject.create();
   if (status) {
     args.push("status", true);
   }
   if (!jsonp_cb.equals("")) {
     args.push("jsonp_cb", jsonp_cb);
   }
   if (!target.equals("")) {
     args.push("target", target);
   }
   return (DCObject) this.call("file.upload", args);
 }