From 2d38e6cdc191a4e5a0669be29484f765a2493174 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Wed, 17 Apr 2024 10:44:56 -0400 Subject: [PATCH] thumbnails now changed to Object --- .idea/jarRepositories.xml | 15 +++++ .../src/test/resources/test-config.properties | 4 +- .../discourse/common/model/dto/Thumbnail.java | 63 +++++++++++++++++++ .../discourse/common/model/dto/Topic.java | 6 +- 4 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 common/src/main/java/com/ossez/discourse/common/model/dto/Thumbnail.java diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml index 1067e4c..d93942b 100644 --- a/.idea/jarRepositories.xml +++ b/.idea/jarRepositories.xml @@ -1,11 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/client/src/test/resources/test-config.properties b/client/src/test/resources/test-config.properties index ff398c9..bb2311b 100644 --- a/client/src/test/resources/test-config.properties +++ b/client/src/test/resources/test-config.properties @@ -1,4 +1,4 @@ # --- APP --- api.site.url=https://www.zchub.net/ -api.username=****** -api.key=***** \ No newline at end of file +api.username=zchub +api.key=a6e6882164f606343bb0a9cde05992f27e73db2cf76c9347b885323a98f8afd3 \ No newline at end of file diff --git a/common/src/main/java/com/ossez/discourse/common/model/dto/Thumbnail.java b/common/src/main/java/com/ossez/discourse/common/model/dto/Thumbnail.java new file mode 100644 index 0000000..2dbb877 --- /dev/null +++ b/common/src/main/java/com/ossez/discourse/common/model/dto/Thumbnail.java @@ -0,0 +1,63 @@ +package com.ossez.discourse.common.model.dto; + +import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.annotation.JsonNaming; + +import java.io.Serializable; + +/** + * PostUpdate Data Object + * + * @author YuCheng Hu + */ +@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class) +public class Thumbnail implements Serializable { + + private static final long serialVersionUID = 6031191663190724895L; + + private Long maxWidth; + private Long maxHeight; + private long width; + private long height; + private String url; + + public Long getMaxWidth() { + return maxWidth; + } + + public void setMaxWidth(Long maxWidth) { + this.maxWidth = maxWidth; + } + + public Long getMaxHeight() { + return maxHeight; + } + + public void setMaxHeight(Long maxHeight) { + this.maxHeight = maxHeight; + } + + public long getWidth() { + return width; + } + + public void setWidth(long width) { + this.width = width; + } + + public long getHeight() { + return height; + } + + public void setHeight(long height) { + this.height = height; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } +} diff --git a/common/src/main/java/com/ossez/discourse/common/model/dto/Topic.java b/common/src/main/java/com/ossez/discourse/common/model/dto/Topic.java index 43c47c3..f7c9106 100644 --- a/common/src/main/java/com/ossez/discourse/common/model/dto/Topic.java +++ b/common/src/main/java/com/ossez/discourse/common/model/dto/Topic.java @@ -55,7 +55,7 @@ public class Topic { private Long messageBus_LastId; private Integer participantCount; private Boolean showReadIndicator; - private String thumbnails; + private List thumbnails; private String slowModeEnabledUUntil; private Boolean summarizable; @@ -412,11 +412,11 @@ public class Topic { this.showReadIndicator = showReadIndicator; } - public String getThumbnails() { + public List getThumbnails() { return thumbnails; } - public void setThumbnails(String thumbnails) { + public void setThumbnails(List thumbnails) { this.thumbnails = thumbnails; }