From 231350f78f2be7f93b2312c21659714869644d37 Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Sat, 10 Mar 2018 22:59:39 +0100 Subject: [PATCH] Extend Models --- .../net/schueller/peertube/model/Account.java | 114 +++++++++++++++ .../net/schueller/peertube/model/Channel.java | 132 ++++++++++++++++++ .../net/schueller/peertube/model/File.java | 58 ++++++++ .../net/schueller/peertube/model/Video.java | 85 +++++++++++ 4 files changed, 389 insertions(+) create mode 100644 app/src/main/java/net/schueller/peertube/model/Account.java create mode 100644 app/src/main/java/net/schueller/peertube/model/Channel.java create mode 100644 app/src/main/java/net/schueller/peertube/model/File.java diff --git a/app/src/main/java/net/schueller/peertube/model/Account.java b/app/src/main/java/net/schueller/peertube/model/Account.java new file mode 100644 index 0000000..d10f1f8 --- /dev/null +++ b/app/src/main/java/net/schueller/peertube/model/Account.java @@ -0,0 +1,114 @@ +package net.schueller.peertube.model; + +import java.util.Date; + +public class Account { + private Integer id; + private String url; + private String uuid; + private String name; + private String host; + private Integer followingCount; + private Integer followersCount; + private String avatar; + private Date createdAt; + private Date updatedAt; + private String displayName; + private String description; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public Integer getFollowingCount() { + return followingCount; + } + + public void setFollowingCount(Integer followingCount) { + this.followingCount = followingCount; + } + + public Integer getFollowersCount() { + return followersCount; + } + + public void setFollowersCount(Integer followersCount) { + this.followersCount = followersCount; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } +} diff --git a/app/src/main/java/net/schueller/peertube/model/Channel.java b/app/src/main/java/net/schueller/peertube/model/Channel.java new file mode 100644 index 0000000..d6dcb9f --- /dev/null +++ b/app/src/main/java/net/schueller/peertube/model/Channel.java @@ -0,0 +1,132 @@ +package net.schueller.peertube.model; + +import java.util.Date; + +public class Channel { + private Integer id; + private String url; + private String uuid; + private String name; + private String host; + private Integer followingCount; + private Integer followersCount; + private String avatar; + private Date createdAt; + private Date updatedAt; + private String displayName; + private String description; + private String support; + private Boolean isLocal; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public Integer getFollowingCount() { + return followingCount; + } + + public void setFollowingCount(Integer followingCount) { + this.followingCount = followingCount; + } + + public Integer getFollowersCount() { + return followersCount; + } + + public void setFollowersCount(Integer followersCount) { + this.followersCount = followersCount; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getSupport() { + return support; + } + + public void setSupport(String support) { + this.support = support; + } + + public Boolean getLocal() { + return isLocal; + } + + public void setLocal(Boolean local) { + isLocal = local; + } +} diff --git a/app/src/main/java/net/schueller/peertube/model/File.java b/app/src/main/java/net/schueller/peertube/model/File.java new file mode 100644 index 0000000..05f45c7 --- /dev/null +++ b/app/src/main/java/net/schueller/peertube/model/File.java @@ -0,0 +1,58 @@ +package net.schueller.peertube.model; + +public class File { + private Integer resolution; + private String resolutionLabel; + private String magnetUri; + private Integer size; + private String torrentUrl; + private String fileUrl; + + public Integer getResolution() { + return resolution; + } + + public void setResolution(Integer resolution) { + this.resolution = resolution; + } + + public String getResolutionLabel() { + return resolutionLabel; + } + + public void setResolutionLabel(String resolutionLabel) { + this.resolutionLabel = resolutionLabel; + } + + public String getMagnetUri() { + return magnetUri; + } + + public void setMagnetUri(String magnetUri) { + this.magnetUri = magnetUri; + } + + public Integer getSize() { + return size; + } + + public void setSize(Integer size) { + this.size = size; + } + + public String getTorrentUrl() { + return torrentUrl; + } + + public void setTorrentUrl(String torrentUrl) { + this.torrentUrl = torrentUrl; + } + + public String getFileUrl() { + return fileUrl; + } + + public void setFileUrl(String fileUrl) { + this.fileUrl = fileUrl; + } +} diff --git a/app/src/main/java/net/schueller/peertube/model/Video.java b/app/src/main/java/net/schueller/peertube/model/Video.java index 81257be..6af9eaa 100644 --- a/app/src/main/java/net/schueller/peertube/model/Video.java +++ b/app/src/main/java/net/schueller/peertube/model/Video.java @@ -1,5 +1,6 @@ package net.schueller.peertube.model; +import java.util.ArrayList; import java.util.Date; public class Video { @@ -28,6 +29,18 @@ public class Video { private Date createdAt; private Date updatedAt; + private String privacyLabel; + private Integer privacy; + private String support; + private String descriptionPath; + + private Channel channel; + private Account account; + private ArrayList tags; + + private Boolean commentsEnabled; + private ArrayList files; + public Video() { } @@ -215,4 +228,76 @@ public class Video { public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } + + public String getPrivacyLabel() { + return privacyLabel; + } + + public void setPrivacyLabel(String privacyLabel) { + this.privacyLabel = privacyLabel; + } + + public Integer getPrivacy() { + return privacy; + } + + public void setPrivacy(Integer privacy) { + this.privacy = privacy; + } + + public String getSupport() { + return support; + } + + public void setSupport(String support) { + this.support = support; + } + + public String getDescriptionPath() { + return descriptionPath; + } + + public void setDescriptionPath(String descriptionPath) { + this.descriptionPath = descriptionPath; + } + + public Channel getChannel() { + return channel; + } + + public void setChannel(Channel channel) { + this.channel = channel; + } + + public Account getAccount() { + return account; + } + + public void setAccount(Account account) { + this.account = account; + } + + public ArrayList getTags() { + return tags; + } + + public void setTags(ArrayList tags) { + this.tags = tags; + } + + public Boolean getCommentsEnabled() { + return commentsEnabled; + } + + public void setCommentsEnabled(Boolean commentsEnabled) { + this.commentsEnabled = commentsEnabled; + } + + public ArrayList getFiles() { + return files; + } + + public void setFiles(ArrayList files) { + this.files = files; + } }