Skip to content

xfxT/imagehosting

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

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

Guides

1、添加依赖(需自行打包)

<dependency>
    <groupId>com.bushangbuxia</groupId>
	<artifactId>imagehosting</artifactId>
    <version>${version}</version>
</dependency>

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%