File tree Expand file tree Collapse file tree
src/main/java/com/afrozaar/wordpress/wpapi/v2/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ public class Media {
2020 private Guid guid ;
2121 @ JsonProperty ("date" )
2222 private String date ;
23+ @ JsonProperty ("date_gmt" )
24+ private String dateGmt ;
2325
2426 @ JsonProperty ("modified" )
2527 private String modified ;
@@ -181,6 +183,14 @@ public void setDate(String date) {
181183 this .date = date ;
182184 }
183185
186+ public String getDateGmt () {
187+ return dateGmt ;
188+ }
189+
190+ public void setDateGmt (String dateGmt ) {
191+ this .dateGmt = dateGmt ;
192+ }
193+
184194 public Guid getGuid () {
185195 return guid ;
186196 }
@@ -221,6 +231,7 @@ public String toString() {
221231 ", author=" + author +
222232 ", guid=" + guid +
223233 ", date='" + date + '\'' +
234+ ", dateGmt='" + dateGmt + '\'' +
224235 ", modified='" + modified + '\'' +
225236 ", modifiedGmt='" + modifiedGmt + '\'' +
226237 ", slug='" + slug + '\'' +
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ public class MediaBuilder {
1313 private int author ;
1414 private Guid guid ;
1515 private String date ;
16+ private String dateGmt ;
1617 private String modified ;
1718 private String modifiedGmt ;
1819 private String slug ;
@@ -65,6 +66,11 @@ public MediaBuilder withDate(String date) {
6566 return this ;
6667 }
6768
69+ public MediaBuilder withDateGmt (String dateGmt ) {
70+ this .dateGmt = dateGmt ;
71+ return this ;
72+ }
73+
6874 public MediaBuilder withModified (String modified ) {
6975 this .modified = modified ;
7076 return this ;
@@ -136,7 +142,7 @@ public MediaBuilder withMimeType(String mimeType) {
136142 }
137143
138144 public MediaBuilder but () {
139- 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 );
145+ 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 );
140146 }
141147
142148 public Media build () {
@@ -147,6 +153,7 @@ public Media build() {
147153 media .setAuthor (author );
148154 media .setGuid (guid );
149155 media .setDate (date );
156+ media .setDateGmt (dateGmt );
150157 media .setModified (modified );
151158 media .setModifiedGmt (modifiedGmt );
152159 media .setSlug (slug );
You can’t perform that action at this time.
0 commit comments