imagehosting

ImageHosting是一个集合多家免费图床的JAVA实现

License

License

GroupId

GroupId

com.bushangbuxia
ArtifactId

ArtifactId

imagehosting
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

imagehosting
ImageHosting是一个集合多家免费图床的JAVA实现
Project URL

Project URL

https://github.com/jingxiang/imagehosting
Source Code Management

Source Code Management

https://github.com/jingxiang/imagehosting.git

Download imagehosting

How to add to project

<!-- https://jarcasting.com/artifacts/com.bushangbuxia/imagehosting/ -->
<dependency>
    <groupId>com.bushangbuxia</groupId>
    <artifactId>imagehosting</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.bushangbuxia/imagehosting/
implementation 'com.bushangbuxia:imagehosting:1.0.0'
// https://jarcasting.com/artifacts/com.bushangbuxia/imagehosting/
implementation ("com.bushangbuxia:imagehosting:1.0.0")
'com.bushangbuxia:imagehosting:jar:1.0.0'
<dependency org="com.bushangbuxia" name="imagehosting" rev="1.0.0">
  <artifact name="imagehosting" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.bushangbuxia', module='imagehosting', version='1.0.0')
)
libraryDependencies += "com.bushangbuxia" % "imagehosting" % "1.0.0"
[com.bushangbuxia/imagehosting "1.0.0"]

Dependencies

compile (4)

Group / Artifact Type Version
com.alibaba : fastjson jar 1.2.54
org.projectlombok : lombok Optional jar 1.18.8
org.apache.httpcomponents : httpclient jar 4.5.6
org.apache.httpcomponents : httpmime jar 4.5.6

Project Modules

There are no modules declared in this project.

Introduction

ImageHosting是一个集合多家免费图床的JAVA实现

Guides

1、添加依赖

<dependency>
    <groupId>com.bushangbuxia</groupId>
    <artifactId>imagehosting</artifactId>
    <version>1.0.0</version>
</dependency>

最新版本:https://search.maven.org/artifact/com.bushangbuxia/imagehosting

2、使用案例

public static void main(String[] args) {
	try {
		ImageHostingService imageHostingService = new DefaultImageHostingService();
		File imageFile = new File("C:\\5E44465978FB976E3597D3110CB76AB9.png");
		ImageHostingOptions options = new ImageHostingOptions();
		options.setHostingPlatforms(Arrays.asList(ImageHostingPlatform.JD));
		ImageHostingResponse response = imageHostingService.upload(imageFile, options);
		System.out.println(JSON.toJSONString(response));
	} catch (Exception e) {
		e.printStackTrace();
	}
}

Support Site

当前支持的站点

  • 苏宁
  • 京东
  • 阿里
  • 今日头条
  • 网易
  • 搜狐
  • CC
  • 掘金

相关站点正在陆续加入中,欢迎贡献pull request......

License

ImageHosting is released under the MIT license.

Versions

Version
1.0.0