Change-Id: Icdf4cb65d11d1bbe835111fa2104d901278f57e9
This commit is contained in:
rui.zhang 2019-01-15 22:14:49 +08:00
parent 3609e5b154
commit 8e36a746c6
3 changed files with 13 additions and 13 deletions

View File

@ -1,6 +1,9 @@
package org.chobit.wp.model.response; package org.chobit.wp.model.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import org.chobit.wp.enums.CommentStatus;
import org.chobit.wp.enums.PingStatus;
import org.chobit.wp.enums.PostStatus;
import org.chobit.wp.model.interval.Enclosure; import org.chobit.wp.model.interval.Enclosure;
import java.util.Date; import java.util.Date;
@ -27,7 +30,7 @@ public class Post {
private Date postModifiedGmt; private Date postModifiedGmt;
@JsonProperty("post_status") @JsonProperty("post_status")
private String postStatus; private PostStatus postStatus;
@JsonProperty("post_type") @JsonProperty("post_type")
private String postType; private String postType;
@ -64,10 +67,10 @@ public class Post {
private int menuOrder; private int menuOrder;
@JsonProperty("comment_status") @JsonProperty("comment_status")
private String commentStatus; private CommentStatus commentStatus;
@JsonProperty("ping_status") @JsonProperty("ping_status")
private String pingStatus; private PingStatus pingStatus;
private boolean sticky; private boolean sticky;
@ -122,11 +125,11 @@ public class Post {
this.postModifiedGmt = postModifiedGmt; this.postModifiedGmt = postModifiedGmt;
} }
public String getPostStatus() { public PostStatus getPostStatus() {
return postStatus; return postStatus;
} }
public void setPostStatus(String postStatus) { public void setPostStatus(PostStatus postStatus) {
this.postStatus = postStatus; this.postStatus = postStatus;
} }
@ -226,19 +229,19 @@ public class Post {
this.menuOrder = menuOrder; this.menuOrder = menuOrder;
} }
public String getCommentStatus() { public CommentStatus getCommentStatus() {
return commentStatus; return commentStatus;
} }
public void setCommentStatus(String commentStatus) { public void setCommentStatus(CommentStatus commentStatus) {
this.commentStatus = commentStatus; this.commentStatus = commentStatus;
} }
public String getPingStatus() { public PingStatus getPingStatus() {
return pingStatus; return pingStatus;
} }
public void setPingStatus(String pingStatus) { public void setPingStatus(PingStatus pingStatus) {
this.pingStatus = pingStatus; this.pingStatus = pingStatus;
} }

View File

@ -10,9 +10,6 @@ public class Config {
} }
public static final Integer DEFAULT_BLOG_ID = 1;
public static final String XML_RPC_URL = PropKit.getProp("website", System.getProperty("website")); public static final String XML_RPC_URL = PropKit.getProp("website", System.getProperty("website"));

View File

@ -62,7 +62,7 @@ public class WordPressTest {
@Test @Test
public void getPost() { public void getPost() {
Post p = wp.getPost(29, "post_content"); Post p = wp.getPost(4090);
System.out.println(p); System.out.println(p);
Assert.assertNotNull(p); Assert.assertNotNull(p);
} }