fastposter发布1.4.2 跨语言的海报生成器,一分钟完成海报开发
欢迎点亮小星星???,加速项目迭代更新。
// Java生成海报
public static void main(String[] args) throws IOException {
// 创建海报客户端对象
FastPosterClient client = new FastPosterClient("https://poster.prodapi.cn/", "ApfrIzxCoK1DwNZO", "EJCwlrnv6QZ0PCdvrWGi");
// 构造海报参数
HashMap<String, String> params = new HashMap<>();
// 暂未指定任何动态参数
params.put("nickname", "笑傲江湖");
// 海报ID
String posterId = "25";
// 获取下载地址
String url = client.getUrl(posterId, params);
System.out.println("url=" + url);
// 保存到本地
client.saveToPath(url, "temp.png");
}
启动服务
> 编辑海报
> 生成代码
docker run --name fast-poster -p 9001:9001 tangweixin/fast-poster
https://gitee.com/psoho/fast-poster
原文:https://www.cnblogs.com/psoho/p/15009010.html