Bridges-Java  3.4.3
Bridges(Java API)
Public Member Functions | Package Attributes | List of all members
bridges.data_src_dependent.Reddit Class Reference

Detailed Description

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

Public Member Functions

 Reddit ()
 Reddit default constructor. More...
 
String getID ()
 
void setID (String i)
 
String getTitle ()
 
void setTitle (String titl)
 
String getAuthor ()
 
void setAuthor (String auth)
 
int getScore ()
 
void setScore (int sc)
 
float getVoteRatio ()
 ratio of upvotes to downvotes of the reddit post More...
 
void setVoteRatio (float vr)
 
int getCommentCount ()
 number of comments of the reddit post More...
 
void setCommentCount (int cnt)
 
String getSubreddit ()
 name of the subreddit the post appeared in More...
 
void setSubreddit (String sr)
 
int getPostTime ()
 time the post was made (UNIX time) More...
 
void setPostTime (int pt)
 
String getURL ()
 URL associated with the post. More...
 
void setURL (String u)
 
String getText ()
 returns the text of the reddit post. More...
 
void setText (String txt)
 

Package Attributes

String title
 
String author
 
String subreddit
 
String url
 
String text
 
int comment_count
 
int post_time
 

Constructor & Destructor Documentation

◆ Reddit()

bridges.data_src_dependent.Reddit.Reddit ( )

Reddit default constructor.

Member Function Documentation

◆ 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)

Member Data Documentation

◆ 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: