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
|
def | __init__ (self, id=0, title="", author="", score=0, vote_ratio=0.0, comment_count=0, subreddit="", post_time=0, url="", text="") |
|
def | id (self) |
| return id of the reddit post More...
|
|
def | id (self, i) |
|
def | title (self) |
| return the title of the reddit post More...
|
|
def | title (self, i) |
|
def | author (self) |
| return the author of the reddit post More...
|
|
def | author (self, i) |
|
def | score (self) |
| return the score (upvotes-downvotes) of the reddit post More...
|
|
def | score (self, i) |
|
def | vote_ratio (self) |
| ratio of upvote to downvotes of the reddit post More...
|
|
def | vote_ratio (self, i) |
|
def | comment_count (self) |
| number of comments on that reddit post More...
|
|
def | comment_count (self, i) |
|
def | subreddit (self) |
| name of the subreddit the post appeared in More...
|
|
def | subreddit (self, i) |
|
def | post_time (self) |
| time the post was made (UNIX time) More...
|
|
def | post_time (self, i) |
|
def | url (self) |
| URL associated with the post. More...
|
|
def | url (self, i) |
|
def | text (self) |
| returns the text of the reddit post. More...
|
|
def | text (self, i) |
|
◆ __init__()
def 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 = "" |
|
) |
| |
◆ author() [1/2]
def bridges.data_src_dependent.reddit.Reddit.author |
( |
|
self | ) |
|
return the author of the reddit post
- Returns
-
string author's username
◆ author() [2/2]
def bridges.data_src_dependent.reddit.Reddit.author |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ comment_count() [1/2]
def bridges.data_src_dependent.reddit.Reddit.comment_count |
( |
|
self | ) |
|
number of comments on that reddit post
- Returns
-
int number of comments
◆ comment_count() [2/2]
def bridges.data_src_dependent.reddit.Reddit.comment_count |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ id() [1/2]
def bridges.data_src_dependent.reddit.Reddit.id |
( |
|
self | ) |
|
return id of the reddit post
- Returns
-
string id
◆ id() [2/2]
def bridges.data_src_dependent.reddit.Reddit.id |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ post_time() [1/2]
def bridges.data_src_dependent.reddit.Reddit.post_time |
( |
|
self | ) |
|
time the post was made (UNIX time)
- Returns
-
int unix time
◆ post_time() [2/2]
def bridges.data_src_dependent.reddit.Reddit.post_time |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ score() [1/2]
def bridges.data_src_dependent.reddit.Reddit.score |
( |
|
self | ) |
|
return the score (upvotes-downvotes) of the reddit post
- Returns
-
int score (upvotes - downvotes)
◆ score() [2/2]
def bridges.data_src_dependent.reddit.Reddit.score |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ subreddit() [1/2]
def bridges.data_src_dependent.reddit.Reddit.subreddit |
( |
|
self | ) |
|
name of the subreddit the post appeared in
- Returns
-
string subreddit name
◆ subreddit() [2/2]
def bridges.data_src_dependent.reddit.Reddit.subreddit |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ text() [1/2]
def bridges.data_src_dependent.reddit.Reddit.text |
( |
|
self | ) |
|
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
◆ text() [2/2]
def bridges.data_src_dependent.reddit.Reddit.text |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ title() [1/2]
def bridges.data_src_dependent.reddit.Reddit.title |
( |
|
self | ) |
|
return the title of the reddit post
- Returns
-
string title
◆ title() [2/2]
def bridges.data_src_dependent.reddit.Reddit.title |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ url() [1/2]
def bridges.data_src_dependent.reddit.Reddit.url |
( |
|
self | ) |
|
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
◆ url() [2/2]
def bridges.data_src_dependent.reddit.Reddit.url |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ vote_ratio() [1/2]
def bridges.data_src_dependent.reddit.Reddit.vote_ratio |
( |
|
self | ) |
|
ratio of upvote to downvotes of the reddit post
- Returns
-
float vote ratio
◆ vote_ratio() [2/2]
def bridges.data_src_dependent.reddit.Reddit.vote_ratio |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ author
bridges.data_src_dependent.reddit.Reddit.author |
◆ comment_count
bridges.data_src_dependent.reddit.Reddit.comment_count |
◆ id
bridges.data_src_dependent.reddit.Reddit.id |
◆ post_time
bridges.data_src_dependent.reddit.Reddit.post_time |
◆ score
bridges.data_src_dependent.reddit.Reddit.score |
◆ subreddit
bridges.data_src_dependent.reddit.Reddit.subreddit |
◆ text
bridges.data_src_dependent.reddit.Reddit.text |
◆ title
bridges.data_src_dependent.reddit.Reddit.title |
◆ url
bridges.data_src_dependent.reddit.Reddit.url |
◆ vote_ratio
bridges.data_src_dependent.reddit.Reddit.vote_ratio |
The documentation for this class was generated from the following file:
- /home/erik/work/bridges/bridges-python/bridges/data_src_dependent/reddit.py