Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/com/afrozaar/wordpress/wpapi/v2/model/Media.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class Media {
private Guid guid;
@JsonProperty("date")
private String date;
@JsonProperty("date_gmt")
private String dateGmt;

@JsonProperty("modified")
private String modified;
Expand Down Expand Up @@ -181,6 +183,14 @@ public void setDate(String date) {
this.date = date;
}

public String getDateGmt() {
return dateGmt;
}

public void setDateGmt(String dateGmt) {
this.dateGmt = dateGmt;
}

public Guid getGuid() {
return guid;
}
Expand Down Expand Up @@ -221,6 +231,7 @@ public String toString() {
", author=" + author +
", guid=" + guid +
", date='" + date + '\'' +
", dateGmt='" + dateGmt + '\'' +
", modified='" + modified + '\'' +
", modifiedGmt='" + modifiedGmt + '\'' +
", slug='" + slug + '\'' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class MediaBuilder {
private int author;
private Guid guid;
private String date;
private String dateGmt;
private String modified;
private String modifiedGmt;
private String slug;
Expand Down Expand Up @@ -65,6 +66,11 @@ public MediaBuilder withDate(String date) {
return this;
}

public MediaBuilder withDateGmt(String dateGmt) {
this.dateGmt = dateGmt;
return this;
}

public MediaBuilder withModified(String modified) {
this.modified = modified;
return this;
Expand Down Expand Up @@ -136,7 +142,7 @@ public MediaBuilder withMimeType(String mimeType) {
}

public MediaBuilder but() {
return aMedia().withAltText(altText).withId(id).withMediaDetails(mediaDetails).withAuthor(author).withGuid(guid).withDate(date).withModified(modified).withModifiedGmt(modifiedGmt).withSlug(slug).withType(type).withLink(link).withTitle(title).withCommentStatus(commentStatus).withPingStatus(pingStatus).withCaption(caption).withDescription(description).withMediaType(mediaType).withPost(post).withSourceUrl(sourceUrl).withMimeType(mimeType);
return aMedia().withAltText(altText).withId(id).withMediaDetails(mediaDetails).withAuthor(author).withGuid(guid).withDate(date).withDateGmt(dateGmt).withModified(modified).withModifiedGmt(modifiedGmt).withSlug(slug).withType(type).withLink(link).withTitle(title).withCommentStatus(commentStatus).withPingStatus(pingStatus).withCaption(caption).withDescription(description).withMediaType(mediaType).withPost(post).withSourceUrl(sourceUrl).withMimeType(mimeType);
}

public Media build() {
Expand All @@ -147,6 +153,7 @@ public Media build() {
media.setAuthor(author);
media.setGuid(guid);
media.setDate(date);
media.setDateGmt(dateGmt);
media.setModified(modified);
media.setModifiedGmt(modifiedGmt);
media.setSlug(slug);
Expand Down