added postId support in subclasses
This commit is contained in:
parent
433f677749
commit
51bbc2fee6
@ -77,15 +77,16 @@ public abstract class RedditPost {
|
|||||||
* Main constructor for a Reddit post.
|
* Main constructor for a Reddit post.
|
||||||
* @param title post's title
|
* @param title post's title
|
||||||
* @param quarantine is this post in quarantine?
|
* @param quarantine is this post in quarantine?
|
||||||
* @param score
|
* @param score post's score
|
||||||
* @param postHint
|
* @param postHint
|
||||||
* @param crosspostable
|
* @param crosspostable
|
||||||
* @param over18
|
* @param over18
|
||||||
* @param author
|
* @param author
|
||||||
* @param permalink
|
* @param permalink
|
||||||
* @param spoiler
|
* @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 id, String title, boolean quarantine, double score, String postHint, boolean crosspostable, boolean over18, String author, String permalink, boolean spoiler) {
|
||||||
|
this.postId = id;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.quarantine = quarantine;
|
this.quarantine = quarantine;
|
||||||
this.score = score;
|
this.score = score;
|
||||||
|
@ -22,4 +22,8 @@ package twitter_techsupportgore_bot.reddit_handler;
|
|||||||
*/
|
*/
|
||||||
public class RedditPostImage extends RedditPost {
|
public class RedditPostImage extends RedditPost {
|
||||||
|
|
||||||
|
public RedditPostImage(String id, String title, boolean quarantine, double score, String postHint, boolean crosspostable, boolean over18, String author, String permalink, boolean spoiler) {
|
||||||
|
super(id, title, quarantine, score, postHint, crosspostable, over18, author, permalink, spoiler);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,8 +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) {
|
public RedditPostLink(String id, 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);
|
super(id, title, quarantine, score, postHint, crosspostable, over18, author, permalink, spoiler);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,5 +21,9 @@ package twitter_techsupportgore_bot.reddit_handler;
|
|||||||
* @author louis
|
* @author louis
|
||||||
*/
|
*/
|
||||||
public class RedditPostText extends RedditPost {
|
public class RedditPostText extends RedditPost {
|
||||||
|
|
||||||
|
public RedditPostText(String id, String title, boolean quarantine, double score, String postHint, boolean crosspostable, boolean over18, String author, String permalink, boolean spoiler) {
|
||||||
|
super(id, title, quarantine, score, postHint, crosspostable, over18, author, permalink, spoiler);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,8 +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) {
|
public RedditPostVideo(String id, 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);
|
super(id, title, quarantine, score, postHint, crosspostable, over18, author, permalink, spoiler);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user