added postId support
This commit is contained in:
parent
769c9d5793
commit
433f677749
@ -23,6 +23,11 @@ package twitter_techsupportgore_bot.reddit_handler;
|
|||||||
*/
|
*/
|
||||||
public abstract class RedditPost {
|
public abstract class RedditPost {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post's id.
|
||||||
|
*/
|
||||||
|
protected String postId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post's title.
|
* Post's title.
|
||||||
*/
|
*/
|
||||||
@ -68,6 +73,18 @@ public abstract class RedditPost {
|
|||||||
*/
|
*/
|
||||||
protected boolean spoiler;
|
protected boolean spoiler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main constructor for a Reddit post.
|
||||||
|
* @param title post's title
|
||||||
|
* @param quarantine is this post in quarantine?
|
||||||
|
* @param score
|
||||||
|
* @param postHint
|
||||||
|
* @param crosspostable
|
||||||
|
* @param over18
|
||||||
|
* @param author
|
||||||
|
* @param permalink
|
||||||
|
* @param spoiler
|
||||||
|
*/
|
||||||
public RedditPost(String title, boolean quarantine, double score, String postHint, boolean crosspostable, boolean over18, String author, String permalink, boolean spoiler) {
|
public RedditPost(String title, boolean quarantine, double score, String postHint, boolean crosspostable, boolean over18, String author, String permalink, boolean spoiler) {
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.quarantine = quarantine;
|
this.quarantine = quarantine;
|
||||||
@ -116,6 +133,7 @@ public abstract class RedditPost {
|
|||||||
return spoiler;
|
return spoiler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPostId() {
|
||||||
|
return postId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,4 +22,8 @@ package twitter_techsupportgore_bot.reddit_handler;
|
|||||||
*/
|
*/
|
||||||
public class RedditPostLink extends RedditPost {
|
public class RedditPostLink extends RedditPost {
|
||||||
|
|
||||||
|
public RedditPostLink(String title, boolean quarantine, double score, String postHint, boolean crosspostable, boolean over18, String author, String permalink, boolean spoiler) {
|
||||||
|
super(title, quarantine, score, postHint, crosspostable, over18, author, permalink, spoiler);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,4 +22,8 @@ package twitter_techsupportgore_bot.reddit_handler;
|
|||||||
*/
|
*/
|
||||||
public class RedditPostVideo extends RedditPost{
|
public class RedditPostVideo extends RedditPost{
|
||||||
|
|
||||||
|
public RedditPostVideo(String title, boolean quarantine, double score, String postHint, boolean crosspostable, boolean over18, String author, String permalink, boolean spoiler) {
|
||||||
|
super(title, quarantine, score, postHint, crosspostable, over18, author, permalink, spoiler);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user