-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d6413d8
Showing
22 changed files
with
1,287 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>cn.echisan</groupId> | ||
<artifactId>wpb4j</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
|
||
<name>wpb4j</name> | ||
<description>a simple java api for weibo picture bed</description> | ||
<url>https://echisan.cn</url> | ||
|
||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.11</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient --> | ||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpclient</artifactId> | ||
<version>4.5.5</version> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime --> | ||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpmime</artifactId> | ||
<version>4.5</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.9.5</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-simple</artifactId> | ||
<version>1.6.1</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-clean-plugin</artifactId> | ||
<version>3.0.0</version> | ||
</plugin> | ||
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging --> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>3.0.2</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.7.0</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.20.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.0.2</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-install-plugin</artifactId> | ||
<version>2.5.2</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>2.8.2</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>8</source> | ||
<target>8</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
package cn.echisan.wpb4j.Entity; | ||
|
||
/** | ||
* Created by echisan on 2018/6/14 | ||
*/ | ||
public class ImageInfo { | ||
|
||
// 照片id | ||
private String pid; | ||
// 宽度 | ||
private Integer width; | ||
// 长度 | ||
private Integer height; | ||
// 大小 | ||
private Integer size; | ||
// 原图url | ||
private String large; | ||
// 中等尺寸 | ||
private String middle; | ||
// 缩略图 | ||
private String small; | ||
|
||
public ImageInfo(String pid, Integer width, Integer height, Integer size) { | ||
this.pid = pid; | ||
this.large = "//wx4.sinaimg.cn/large/" + pid + ".jpg"; | ||
this.middle = "//wx4.sinaimg.cn/mw690/" + pid + ".jpg"; | ||
this.small = "//wx4.sinaimg.cn/thumbnail/" + pid + ".jpg"; | ||
this.width = width; | ||
this.height = height; | ||
this.size = size; | ||
} | ||
|
||
public String getPid() { | ||
return pid; | ||
} | ||
|
||
public void setPid(String pid) { | ||
this.pid = pid; | ||
} | ||
|
||
public Integer getWidth() { | ||
return width; | ||
} | ||
|
||
public void setWidth(Integer width) { | ||
this.width = width; | ||
} | ||
|
||
public Integer getHeight() { | ||
return height; | ||
} | ||
|
||
public void setHeight(Integer height) { | ||
this.height = height; | ||
} | ||
|
||
public Integer getSize() { | ||
return size; | ||
} | ||
|
||
public void setSize(Integer size) { | ||
this.size = size; | ||
} | ||
|
||
public String getLarge() { | ||
return large; | ||
} | ||
|
||
public void setLarge(String large) { | ||
this.large = large; | ||
} | ||
|
||
public String getMiddle() { | ||
return middle; | ||
} | ||
|
||
public void setMiddle(String middle) { | ||
this.middle = middle; | ||
} | ||
|
||
public String getSmall() { | ||
return small; | ||
} | ||
|
||
public void setSmall(String small) { | ||
this.small = small; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ImageInfo{" + | ||
"pid='" + pid + '\'' + | ||
", width=" + width + | ||
", height=" + height + | ||
", size=" + size + | ||
", large='" + large + '\'' + | ||
", middle='" + middle + '\'' + | ||
", small='" + small + '\'' + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package cn.echisan.wpb4j.Entity; | ||
|
||
/** | ||
* Created by echisan on 2018/6/13 | ||
*/ | ||
public class PreLogin { | ||
|
||
private Integer retcode; | ||
private Long servertime; | ||
private String pcid; | ||
private String nonce; | ||
private String pubkey; | ||
private String rsakv; | ||
private Integer is_openlock; | ||
private Integer showpin; | ||
private Integer exectime; | ||
|
||
public Integer getRetcode() { | ||
return retcode; | ||
} | ||
|
||
public void setRetcode(Integer retcode) { | ||
this.retcode = retcode; | ||
} | ||
|
||
public Long getServertime() { | ||
return servertime; | ||
} | ||
|
||
public void setServertime(Long servertime) { | ||
this.servertime = servertime; | ||
} | ||
|
||
public String getPcid() { | ||
return pcid; | ||
} | ||
|
||
public void setPcid(String pcid) { | ||
this.pcid = pcid; | ||
} | ||
|
||
public String getNonce() { | ||
return nonce; | ||
} | ||
|
||
public void setNonce(String nonce) { | ||
this.nonce = nonce; | ||
} | ||
|
||
public String getPubkey() { | ||
return pubkey; | ||
} | ||
|
||
public void setPubkey(String pubkey) { | ||
this.pubkey = pubkey; | ||
} | ||
|
||
public String getRsakv() { | ||
return rsakv; | ||
} | ||
|
||
public void setRsakv(String rsakv) { | ||
this.rsakv = rsakv; | ||
} | ||
|
||
public Integer getIs_openlock() { | ||
return is_openlock; | ||
} | ||
|
||
public void setIs_openlock(Integer is_openlock) { | ||
this.is_openlock = is_openlock; | ||
} | ||
|
||
public Integer getShowpin() { | ||
return showpin; | ||
} | ||
|
||
public void setShowpin(Integer showpin) { | ||
this.showpin = showpin; | ||
} | ||
|
||
public Integer getExectime() { | ||
return exectime; | ||
} | ||
|
||
public void setExectime(Integer exectime) { | ||
this.exectime = exectime; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "PreLogin{" + | ||
"retcode=" + retcode + | ||
", servertime=" + servertime + | ||
", pcid='" + pcid + '\'' + | ||
", nonce='" + nonce + '\'' + | ||
", pubkey='" + pubkey + '\'' + | ||
", rsakv='" + rsakv + '\'' + | ||
", is_openlock=" + is_openlock + | ||
", showpin=" + showpin + | ||
", exectime=" + exectime + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package cn.echisan.wpb4j.Entity; | ||
|
||
import cn.echisan.wpb4j.Entity.upload.Data; | ||
|
||
/** | ||
* Created by echisan on 2018/6/14 | ||
*/ | ||
public class UploadResp { | ||
|
||
private String code; | ||
private Data data; | ||
|
||
public String getCode() { | ||
return code; | ||
} | ||
|
||
public void setCode(String code) { | ||
this.code = code; | ||
} | ||
|
||
public Data getData() { | ||
return data; | ||
} | ||
|
||
public void setData(Data data) { | ||
this.data = data; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "UploadResp{" + | ||
"code='" + code + '\'' + | ||
", data=" + data + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package cn.echisan.wpb4j.Entity.upload; | ||
|
||
/** | ||
* Created by echisan on 2018/6/14 | ||
*/ | ||
public class Data { | ||
private int count; | ||
|
||
private String data; | ||
|
||
private Pics pics; | ||
|
||
public void setCount(int count){ | ||
this.count = count; | ||
} | ||
public int getCount(){ | ||
return this.count; | ||
} | ||
public void setData(String data){ | ||
this.data = data; | ||
} | ||
public String getData(){ | ||
return this.data; | ||
} | ||
public void setPics(Pics pics){ | ||
this.pics = pics; | ||
} | ||
public Pics getPics(){ | ||
return this.pics; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Data{" + | ||
"count=" + count + | ||
", data='" + data + '\'' + | ||
", pics=" + pics + | ||
'}'; | ||
} | ||
} |
Oops, something went wrong.