class documentation

Class representing a Reddit document.

Class Method from_praw Convert a PRAW document object to a custom Document object.
Method __init__ Initialize a RedditDocument object.
Method __str__ Return a string representation of the RedditDocument object.
Instance Variable num_comments Undocumented

Inherited from Document:

Method __repr__ Return a string representation of the Document object.
Instance Variable author Undocumented
Instance Variable date Undocumented
Instance Variable source Undocumented
Instance Variable text Undocumented
Instance Variable title Undocumented
Instance Variable url Undocumented
@classmethod
def from_praw(cls, praw_document) -> Document: (source)

Convert a PRAW document object to a custom Document object. Args: praw_document (praw.models.Submission): The PRAW document object to convert. Returns: Document: The converted Document object.

def __init__(self, title: str, date: str, author: str, url: str, text: str, source: str, num_comments: int): (source)

Initialize a RedditDocument object.

Args:

    title (str): The title of the document.
    date (str): The date of the document.
    author (str): The author of the document.
    url (str): The URL of the document.
    text (str): The text of the document.
    num_comments (int): The number of comments on the document.
def __str__(self) -> str: (source)

Return a string representation of the RedditDocument object.

num_comments = (source)

Undocumented