diff --git a/src/main/java/eu/m724/jarupdater/download/SimpleDownloader.java b/src/main/java/eu/m724/jarupdater/download/SimpleDownloader.java index ca74fd3..f76b36b 100644 --- a/src/main/java/eu/m724/jarupdater/download/SimpleDownloader.java +++ b/src/main/java/eu/m724/jarupdater/download/SimpleDownloader.java @@ -33,7 +33,7 @@ public class SimpleDownloader implements Downloader { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(url)) - .header("User-Agent", "rwu/1") // real weather updater v1 + .header("User-Agent", "ju/1") // jar updater v1 .build(); CompletableFuture> responseFuture = diff --git a/src/main/java/eu/m724/jarupdater/object/Version.java b/src/main/java/eu/m724/jarupdater/object/Version.java index d648b23..587d093 100644 --- a/src/main/java/eu/m724/jarupdater/object/Version.java +++ b/src/main/java/eu/m724/jarupdater/object/Version.java @@ -8,20 +8,23 @@ public class Version { */ public static final int SPEC = 1; - public Version(int id, long timestamp, String label, String fileUrl, String sha256) { + public Version(int id, long timestamp, String label, String fileUrl, String changelogUrl, String sha256) { this.id = id; this.timestamp = timestamp; this.label = label; this.fileUrl = fileUrl; + this.changelogUrl = changelogUrl; this.sha256 = sha256; } - private int id; - private long timestamp; - private String label; + private final int id; + private final long timestamp; + private final String label; @SerializedName("file") - private String fileUrl; - private String sha256; + private final String fileUrl; + @SerializedName("changelog") + private final String changelogUrl; + private final String sha256; /** * version id. increments with each version @@ -38,7 +41,7 @@ public class Version { } /** - * label aka version string + * label aka version string
* example: 1.0.0 */ public String getLabel() { @@ -52,6 +55,13 @@ public class Version { return fileUrl; } + /** + * url of changelog file + */ + public String getChangelogUrl() { + return changelogUrl; + } + /** * sha256 hash of that file */