Bridges-Python 3.5.1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
bridges.data_src_dependent.reddit.Reddit Class Reference

A reddit object representing a reddit post, used along with the reddit data source. More...

Public Member Functions

 __init__ (self, id=0, title="", author="", score=0, vote_ratio=0.0, comment_count=0, subreddit="", post_time=0, url="", text="")
 

Properties

 id = property
 return id of the reddit post
 
 title = property
 return the title of the reddit post
 
 author = property
 return the author of the reddit post
 
 score = property
 return the score (upvotes-downvotes) of the reddit post
 
 vote_ratio = property
 ratio of upvote to downvotes of the reddit post
 
 comment_count = property
 number of comments on that reddit post
 
 subreddit = property
 name of the subreddit the post appeared in
 
 post_time = property
 time the post was made (UNIX time)
 
 url = property
 URL associated with the post.
 
 text = property
 returns the text of the reddit post.
 

Detailed Description

A reddit object representing 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.

This object is generally not created by the user, to see how its created check out bridges::data_src_dependent::data_source::reddit_data()

For an example, check out https://bridgesuncc.github.io/tutorials/Data_Reddit.html

Author
Erik Saule, Jay Strahler
Date
12/12/22

Constructor & Destructor Documentation

◆ __init__()

bridges.data_src_dependent.reddit.Reddit.__init__ (   self,
  id = 0,
  title = "",
  author = "",
  score = 0,
  vote_ratio = 0.0,
  comment_count = 0,
  subreddit = "",
  post_time = 0,
  url = "",
  text = "" 
)

Property Documentation

◆ author

bridges.data_src_dependent.reddit.Reddit.author = property
static

return the author of the reddit post

Returns
string author's username

◆ comment_count

bridges.data_src_dependent.reddit.Reddit.comment_count = property
static

number of comments on that reddit post

Returns
int number of comments

◆ id

bridges.data_src_dependent.reddit.Reddit.id = property
static

return id of the reddit post

Returns
string id

◆ post_time

bridges.data_src_dependent.reddit.Reddit.post_time = property
static

time the post was made (UNIX time)

Returns
int unix time

◆ score

bridges.data_src_dependent.reddit.Reddit.score = property
static

return the score (upvotes-downvotes) of the reddit post

Returns
int score (upvotes - downvotes)

◆ subreddit

bridges.data_src_dependent.reddit.Reddit.subreddit = property
static

name of the subreddit the post appeared in

Returns
string subreddit name

◆ text

bridges.data_src_dependent.reddit.Reddit.text = property
static

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
string full text of the reddit post

◆ title

bridges.data_src_dependent.reddit.Reddit.title = property
static

return the title of the reddit post

Returns
string title

◆ url

bridges.data_src_dependent.reddit.Reddit.url = property
static

URL associated with the post.

   This could be the url of the reddit post itself or the URL of an associated article/video
Returns
string URL

◆ vote_ratio

bridges.data_src_dependent.reddit.Reddit.vote_ratio = property
static

ratio of upvote to downvotes of the reddit post

Returns
float vote ratio

The documentation for this class was generated from the following file: