API adjustments to match current beta

This commit is contained in:
Stefan Schueller 2018-04-02 16:45:47 +02:00
parent 03520b55e7
commit 9b265c20c7
7 changed files with 131 additions and 51 deletions

View File

@ -0,0 +1,23 @@
package net.schueller.peertube.model;
public class Category {
private Integer id;
private String label;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}

View File

@ -1,18 +1,18 @@
package net.schueller.peertube.model; package net.schueller.peertube.model;
public class File { public class File {
private Integer resolution; private Resolution resolution;
private String resolutionLabel; private String resolutionLabel;
private String magnetUri; private String magnetUri;
private Integer size; private Integer size;
private String torrentUrl; private String torrentUrl;
private String fileUrl; private String fileUrl;
public Integer getResolution() { public Resolution getResolution() {
return resolution; return resolution;
} }
public void setResolution(Integer resolution) { public void setResolution(Resolution resolution) {
this.resolution = resolution; this.resolution = resolution;
} }

View File

@ -0,0 +1,23 @@
package net.schueller.peertube.model;
public class Language {
private Integer id;
private String label;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}

View File

@ -0,0 +1,23 @@
package net.schueller.peertube.model;
public class Licence {
private Integer id;
private String label;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}

View File

@ -0,0 +1,23 @@
package net.schueller.peertube.model;
public class Privacy {
private Integer id;
private String label;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}

View File

@ -0,0 +1,23 @@
package net.schueller.peertube.model;
public class Resolution {
private Integer id;
private String label;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}

View File

@ -8,12 +8,9 @@ public class Video {
private Integer id; private Integer id;
private String uuid; private String uuid;
private String name; private String name;
private String category; private Category category;
private String categoryLabel; private Licence licence;
private String licence; private Language language;
private String licenceLabel;
private String language;
private String languageLabel;
private Boolean nsfw; private Boolean nsfw;
private String description; private String description;
private Boolean isLocal; private Boolean isLocal;
@ -27,8 +24,8 @@ public class Video {
private Date createdAt; private Date createdAt;
private Date updatedAt; private Date updatedAt;
private String privacyLabel; private Privacy privacy;
private Integer privacy;
private String support; private String support;
private String descriptionPath; private String descriptionPath;
@ -67,54 +64,30 @@ public class Video {
this.name = name; this.name = name;
} }
public String getCategory() { public Category getCategory() {
return category; return category;
} }
public void setCategory(String category) { public void setCategory(Category category) {
this.category = category; this.category = category;
} }
public String getCategoryLabel() { public Licence getLicence() {
return categoryLabel;
}
public void setCategoryLabel(String categoryLabel) {
this.categoryLabel = categoryLabel;
}
public String getLicence() {
return licence; return licence;
} }
public void setLicence(String licence) { public void setLicence(Licence licence) {
this.licence = licence; this.licence = licence;
} }
public String getLicenceLabel() { public Language getLanguage() {
return licenceLabel;
}
public void setLicenceLabel(String licenceLabel) {
this.licenceLabel = licenceLabel;
}
public String getLanguage() {
return language; return language;
} }
public void setLanguage(String language) { public void setLanguage(Language language) {
this.language = language; this.language = language;
} }
public String getLanguageLabel() {
return languageLabel;
}
public void setLanguageLabel(String languageLabel) {
this.languageLabel = languageLabel;
}
public Boolean getNsfw() { public Boolean getNsfw() {
return nsfw; return nsfw;
} }
@ -211,19 +184,11 @@ public class Video {
this.updatedAt = updatedAt; this.updatedAt = updatedAt;
} }
public String getPrivacyLabel() { public Privacy getPrivacy() {
return privacyLabel;
}
public void setPrivacyLabel(String privacyLabel) {
this.privacyLabel = privacyLabel;
}
public Integer getPrivacy() {
return privacy; return privacy;
} }
public void setPrivacy(Integer privacy) { public void setPrivacy(Privacy privacy) {
this.privacy = privacy; this.privacy = privacy;
} }