com.cloudinary.Util.timestamp()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(447)

本文整理了Java中com.cloudinary.Util.timestamp()方法的一些代码示例,展示了Util.timestamp()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.timestamp()方法的具体详情如下:
包路径:com.cloudinary.Util
类名称:Util
方法名:timestamp

Util.timestamp介绍

暂无

代码示例

代码示例来源:origin: com.cloudinary/cloudinary-core

public void signRequestParams(Map<String, Object> params, Map options) {
  if (!params.containsKey("timestamp"))
    params.put("timestamp", Util.timestamp());
  cloudinary.signRequest(params, options);
}

代码示例来源:origin: cloudinary/cloudinary_java

public void signRequestParams(Map<String, Object> params, Map options) {
  if (!params.containsKey("timestamp"))
    params.put("timestamp", Util.timestamp());
  cloudinary.signRequest(params, options);
}

代码示例来源:origin: com.cloudinary/cloudinary-core

public String privateDownload(String publicId, String format, Map<String, Object> options) throws Exception {
  Map<String, Object> params = new HashMap<String, Object>();
  params.put("public_id", publicId);
  params.put("format", format);
  params.put("attachment", options.get("attachment"));
  params.put("type", options.get("type"));
  params.put("expires_at", options.get("expires_at"));
  params.put("timestamp", Util.timestamp());
  signRequest(params, options);
  return buildUrl(cloudinaryApiUrl("download", options), params);
}

代码示例来源:origin: cloudinary/cloudinary_java

public String privateDownload(String publicId, String format, Map<String, Object> options) throws Exception {
  Map<String, Object> params = new HashMap<String, Object>();
  params.put("public_id", publicId);
  params.put("format", format);
  params.put("attachment", options.get("attachment"));
  params.put("type", options.get("type"));
  params.put("expires_at", options.get("expires_at"));
  params.put("timestamp", Util.timestamp());
  signRequest(params, options);
  return buildUrl(cloudinaryApiUrl("download", options), params);
}

代码示例来源:origin: com.cloudinary/cloudinary-core

public String zipDownload(String tag, Map<String, Object> options) throws Exception {
  Map<String, Object> params = new HashMap<String, Object>();
  params.put("timestamp", Util.timestamp());
  params.put("tag", tag);
  Object transformation = options.get("transformation");
  if (transformation != null) {
    if (transformation instanceof Transformation) {
      transformation = ((Transformation) transformation).generate();
    }
    params.put("transformation", transformation.toString());
  }
  params.put("transformation", transformation);
  signRequest(params, options);
  return buildUrl(cloudinaryApiUrl("download_tag.zip", options), params);
}

代码示例来源:origin: cloudinary/cloudinary_java

public String zipDownload(String tag, Map<String, Object> options) throws Exception {
  Map<String, Object> params = new HashMap<String, Object>();
  params.put("timestamp", Util.timestamp());
  params.put("tag", tag);
  Object transformation = options.get("transformation");
  if (transformation != null) {
    if (transformation instanceof Transformation) {
      transformation = ((Transformation) transformation).generate();
    }
    params.put("transformation", transformation.toString());
  }
  params.put("transformation", transformation);
  signRequest(params, options);
  return buildUrl(cloudinaryApiUrl("download_tag.zip", options), params);
}

代码示例来源:origin: com.cloudinary/cloudinary-core

@SuppressWarnings({"rawtypes", "unchecked"})
public static final Map<String, Object> buildArchiveParams(Map options, String targetFormat) {
  Map<String, Object> params = new HashMap<String, Object>();
  if (options != null && options.size() > 0){
    params.put("type", options.get("type"));
    params.put("mode", options.get("mode"));
    params.put("target_format", targetFormat);
    params.put("target_public_id", options.get("target_public_id"));
    putBoolean("flatten_folders", options, params);
    putBoolean("flatten_transformations", options, params);
    putBoolean("use_original_filename", options, params);
    putBoolean("async", options, params);
    putBoolean("keep_derived", options, params);
    params.put("notification_url", options.get("notification_url"));
    putArray("target_tags", options, params);
    putArray("tags", options, params);
    putArray("public_ids", options, params);
    putArray("prefixes", options, params);
    putEager("transformations", options, params);
    putObject("timestamp", options, params, Util.timestamp());
    putBoolean("skip_transformation_name", options, params);
    putBoolean("allow_missing", options, params);
    putObject("expires_at", options, params);
  }
  return params;
}

代码示例来源:origin: cloudinary/cloudinary_java

@SuppressWarnings({"rawtypes", "unchecked"})
public static final Map<String, Object> buildArchiveParams(Map options, String targetFormat) {
  Map<String, Object> params = new HashMap<String, Object>();
  if (options != null && options.size() > 0){
    params.put("type", options.get("type"));
    params.put("mode", options.get("mode"));
    params.put("target_format", targetFormat);
    params.put("target_public_id", options.get("target_public_id"));
    putBoolean("flatten_folders", options, params);
    putBoolean("flatten_transformations", options, params);
    putBoolean("use_original_filename", options, params);
    putBoolean("async", options, params);
    putBoolean("keep_derived", options, params);
    params.put("notification_url", options.get("notification_url"));
    putArray("target_tags", options, params);
    putArray("tags", options, params);
    putArray("public_ids", options, params);
    putArray("prefixes", options, params);
    putEager("transformations", options, params);
    putObject("timestamp", options, params, Util.timestamp());
    putBoolean("skip_transformation_name", options, params);
    putBoolean("allow_missing", options, params);
    putObject("expires_at", options, params);
  }
  return params;
}

相关文章