An object to represent a Reddit post, used along with the Reddit data source.
This is a convenience class provided for users who wish to use this data source as part of their application. It provides an API that makes it easy to access the attributes of this data set.
The Reddit object is typically not created by a student but rather obtained from calling bridges::connect::DataSource::getRedditData().
Refer to tutorial for example of using this feature: https://bridgesuncc.github.io/tutorials/Data_Reddit.html
- Author
- Erik Saule
- Date
- 7/12/22
◆ Reddit()
bridges.data_src_dependent.Reddit.Reddit |
( |
| ) |
|
◆ getAuthor()
String bridges.data_src_dependent.Reddit.getAuthor |
( |
| ) |
|
@brief return the author of the reddit post
- Returns
- author's username
◆ getCommentCount()
int bridges.data_src_dependent.Reddit.getCommentCount |
( |
| ) |
|
number of comments of the reddit post
- Returns
- number of comments
◆ getID()
String bridges.data_src_dependent.Reddit.getID |
( |
| ) |
|
@brief return id of the reddit post
- Returns
- id
◆ getPostTime()
int bridges.data_src_dependent.Reddit.getPostTime |
( |
| ) |
|
time the post was made (UNIX time)
- Returns
- unix time
◆ getScore()
int bridges.data_src_dependent.Reddit.getScore |
( |
| ) |
|
@brief return the score (upvotes - downvotes) of the reddit post
- Returns
- score (upvotes - downvotes)
◆ getSubreddit()
String bridges.data_src_dependent.Reddit.getSubreddit |
( |
| ) |
|
name of the subreddit the post appeared in
- Returns
- subreddit name
◆ getText()
String bridges.data_src_dependent.Reddit.getText |
( |
| ) |
|
returns the text of the reddit post.
The text of the reddit post. Often in markdown format.
The text could be empty if the reddit post is just a link to a video or an article
- Returns
- full text of the reddit post
◆ getTitle()
String bridges.data_src_dependent.Reddit.getTitle |
( |
| ) |
|
@brief return the title of the reddit post
- Returns
- title
◆ getURL()
String bridges.data_src_dependent.Reddit.getURL |
( |
| ) |
|
URL associated with the post.
This could be the url of the reddit post itself or the URL of an associated article/video
- Returns
- URL
◆ getVoteRatio()
float bridges.data_src_dependent.Reddit.getVoteRatio |
( |
| ) |
|
ratio of upvotes to downvotes of the reddit post
- Returns
- vote ratio
◆ setAuthor()
void bridges.data_src_dependent.Reddit.setAuthor |
( |
String |
auth | ) |
|
◆ setCommentCount()
void bridges.data_src_dependent.Reddit.setCommentCount |
( |
int |
cnt | ) |
|
◆ setID()
void bridges.data_src_dependent.Reddit.setID |
( |
String |
i | ) |
|
◆ setPostTime()
void bridges.data_src_dependent.Reddit.setPostTime |
( |
int |
pt | ) |
|
◆ setScore()
void bridges.data_src_dependent.Reddit.setScore |
( |
int |
sc | ) |
|
◆ setSubreddit()
void bridges.data_src_dependent.Reddit.setSubreddit |
( |
String |
sr | ) |
|
◆ setText()
void bridges.data_src_dependent.Reddit.setText |
( |
String |
txt | ) |
|
◆ setTitle()
void bridges.data_src_dependent.Reddit.setTitle |
( |
String |
titl | ) |
|
◆ setURL()
void bridges.data_src_dependent.Reddit.setURL |
( |
String |
u | ) |
|
◆ setVoteRatio()
void bridges.data_src_dependent.Reddit.setVoteRatio |
( |
float |
vr | ) |
|
◆ author
String bridges.data_src_dependent.Reddit.author |
|
package |
◆ comment_count
int bridges.data_src_dependent.Reddit.comment_count |
|
package |
◆ post_time
int bridges.data_src_dependent.Reddit.post_time |
|
package |
◆ subreddit
String bridges.data_src_dependent.Reddit.subreddit |
|
package |
◆ text
String bridges.data_src_dependent.Reddit.text |
|
package |
◆ title
String bridges.data_src_dependent.Reddit.title |
|
package |
◆ url
String bridges.data_src_dependent.Reddit.url |
|
package |
The documentation for this class was generated from the following file:
- /home/erik/work/bridges/bridges-java/src/main/java/bridges/data_src_dependent/Reddit.java