diff options
| author | Pinapelz <donaldshan1@outlook.com> | 2023-04-04 23:24:08 -0700 |
|---|---|---|
| committer | Pinapelz <donaldshan1@outlook.com> | 2023-04-04 23:24:08 -0700 |
| commit | 0bd602d575485361ce2c658ace6374c1d96ba881 (patch) | |
| tree | 133d2912778fb1aca6d75fc00bd6c0ced3895bb0 | |
| parent | 88719faedddd17c180e799db750ea98129ac6382 (diff) | |
Implemented ChannelQueryBuilder, LiveVideoQueryBuilder, and VideoQueryBuilder
| -rw-r--r-- | src/main/java/com/pina/query/ChannelQueryBuilder.java | 69 | ||||
| -rw-r--r-- | src/main/java/com/pina/query/LiveVideoQueryBuilder.java | 157 | ||||
| -rw-r--r-- | src/main/java/com/pina/query/VideoQueryBuilder.java | 150 |
3 files changed, 239 insertions, 137 deletions
diff --git a/src/main/java/com/pina/query/ChannelQueryBuilder.java b/src/main/java/com/pina/query/ChannelQueryBuilder.java new file mode 100644 index 0000000..490a5c9 --- /dev/null +++ b/src/main/java/com/pina/query/ChannelQueryBuilder.java @@ -0,0 +1,69 @@ +package com.pina.query; + +public class ChannelQueryBuilder { + private Integer limit; + private Integer offset; + private String type; + private String lang; + private String order; + private String org; + private String sort; + + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getOffset() { + return offset; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getLang() { + return lang; + } + + public void setLang(String lang) { + this.lang = lang; + } + + public String getOrder() { + return order; + } + + public void setOrder(String order) { + this.order = order; + } + + public String getOrg() { + return org; + } + + public void setOrg(String org) { + this.org = org; + } + + public String getSort() { + return sort; + } + + public void setSort(String sort) { + this.sort = sort; + } + + +} diff --git a/src/main/java/com/pina/query/LiveVideoQueryBuilder.java b/src/main/java/com/pina/query/LiveVideoQueryBuilder.java new file mode 100644 index 0000000..ed92070 --- /dev/null +++ b/src/main/java/com/pina/query/LiveVideoQueryBuilder.java @@ -0,0 +1,157 @@ +package com.pina.query; + +public class LiveVideoQueryBuilder { + /*** + * Query parameters for /api/v2/live and /api/v2/videos + */ + private String channelId; + private String id; + private String include; + private String lang; + private Integer limit; + private Integer maxUpcomingHours; + private String mentionedChannelId; + private Integer offset; + private String order; + private String org; + private String paginated; + private String sort; + private String status; + private String topic; + private String type; + + public LiveVideoQueryBuilder setChannelId(String channelId) { + this.channelId = channelId; + return this; + } + + public LiveVideoQueryBuilder setId(String id) { + this.id = id; + return this; + } + + public LiveVideoQueryBuilder setInclude(String include) { + this.include = include; + return this; + } + + public LiveVideoQueryBuilder setLang(String lang) { + this.lang = lang; + return this; + } + + public LiveVideoQueryBuilder setLimit(Integer limit) { + this.limit = limit; + return this; + } + + public LiveVideoQueryBuilder setMaxUpcomingHours(Integer maxUpcomingHours) { + this.maxUpcomingHours = maxUpcomingHours; + return this; + } + + public LiveVideoQueryBuilder setMentionedChannelId(String mentionedChannelId) { + this.mentionedChannelId = mentionedChannelId; + return this; + } + + public LiveVideoQueryBuilder setOffset(Integer offset) { + this.offset = offset; + return this; + } + + public LiveVideoQueryBuilder setOrder(String order) { + this.order = order; + return this; + } + + public LiveVideoQueryBuilder setOrg(String org) { + this.org = org; + return this; + } + + public LiveVideoQueryBuilder setPaginated(String paginated) { + this.paginated = paginated; + return this; + } + + public LiveVideoQueryBuilder setSort(String sort) { + this.sort = sort; + return this; + } + + public LiveVideoQueryBuilder setStatus(String status) { + this.status = status; + return this; + } + + public LiveVideoQueryBuilder setTopic(String topic) { + this.topic = topic; + return this; + } + + public LiveVideoQueryBuilder setType(String type) { + this.type = type; + return this; + } + + public String getChannelId() { + return channelId; + } + + public String getId() { + return id; + } + + public String getInclude() { + return include; + } + + public String getLang() { + return lang; + } + + public Integer getLimit() { + return limit; + } + + public Integer getMaxUpcomingHours() { + return maxUpcomingHours; + } + + public String getMentionedChannelId() { + return mentionedChannelId; + } + + public Integer getOffset() { + return offset; + } + + public String getOrder() { + return order; + } + + public String getOrg() { + return org; + } + + public String getPaginated() { + return paginated; + } + + public String getSort() { + return sort; + } + + public String getStatus() { + return status; + } + + public String getTopic() { + return topic; + } + + public String getType() { + return type; + } +}
\ No newline at end of file diff --git a/src/main/java/com/pina/query/VideoQueryBuilder.java b/src/main/java/com/pina/query/VideoQueryBuilder.java index e65a04c..76d01db 100644 --- a/src/main/java/com/pina/query/VideoQueryBuilder.java +++ b/src/main/java/com/pina/query/VideoQueryBuilder.java @@ -1,157 +1,33 @@ package com.pina.query; public class VideoQueryBuilder { - /*** - * Query parameters for /api/v2/live and /api/v2/videos - */ - private String channelId; - private String id; - private String include; + private String videoId; private String lang; - private Integer limit; - private Integer maxUpcomingHours; - private String mentionedChannelId; - private Integer offset; - private String order; - private String org; - private String paginated; - private String sort; - private String status; - private String topic; - private String type; + private String c; - public VideoQueryBuilder setChannelId(String channelId) { - this.channelId = channelId; - return this; + public String getVideoId() { + return videoId; } - public VideoQueryBuilder setId(String id) { - this.id = id; - return this; - } - - public VideoQueryBuilder setInclude(String include) { - this.include = include; - return this; - } - - public VideoQueryBuilder setLang(String lang) { - this.lang = lang; - return this; - } - - public VideoQueryBuilder setLimit(Integer limit) { - this.limit = limit; - return this; - } - - public VideoQueryBuilder setMaxUpcomingHours(Integer maxUpcomingHours) { - this.maxUpcomingHours = maxUpcomingHours; - return this; - } - - public VideoQueryBuilder setMentionedChannelId(String mentionedChannelId) { - this.mentionedChannelId = mentionedChannelId; - return this; - } - - public VideoQueryBuilder setOffset(Integer offset) { - this.offset = offset; - return this; - } - - public VideoQueryBuilder setOrder(String order) { - this.order = order; - return this; - } - - public VideoQueryBuilder setOrg(String org) { - this.org = org; - return this; - } - - public VideoQueryBuilder setPaginated(String paginated) { - this.paginated = paginated; - return this; - } - - public VideoQueryBuilder setSort(String sort) { - this.sort = sort; - return this; - } - - public VideoQueryBuilder setStatus(String status) { - this.status = status; - return this; - } - - public VideoQueryBuilder setTopic(String topic) { - this.topic = topic; - return this; - } - - public VideoQueryBuilder setType(String type) { - this.type = type; - return this; - } - - public String getChannelId() { - return channelId; - } - - public String getId() { - return id; - } - - public String getInclude() { - return include; + public void setVideoId(String videoId) { + this.videoId = videoId; } public String getLang() { return lang; } - public Integer getLimit() { - return limit; - } - - public Integer getMaxUpcomingHours() { - return maxUpcomingHours; - } - - public String getMentionedChannelId() { - return mentionedChannelId; - } - - public Integer getOffset() { - return offset; - } - - public String getOrder() { - return order; - } - - public String getOrg() { - return org; - } - - public String getPaginated() { - return paginated; + public void setLang(String lang) { + this.lang = lang; } - public String getSort() { - return sort; + public String getC() { + return c; } - public String getStatus() { - return status; + public void setC(String c) { + this.c = c; } - public String getTopic() { - return topic; - } - public String getType() { - return type; - } -}
\ No newline at end of file +} |
