DomainListing¶
- class praw.models.DomainListing(reddit, domain)¶
Provide a set of functions to interact with domain listings.
- Parameters:
reddit (praw.Reddit)
domain (str)
- __init__(reddit, domain)¶
Initialize a
DomainListinginstance.
- controversial(*, time_filter='all', **generator_kwargs)¶
Return a
ListingGeneratorfor controversial items.- Parameters:
- Raises:
ValueErroriftime_filteris invalid.- Return type:
Additional keyword arguments are passed in the initialization of
ListingGenerator.This method can be used like:
reddit.domain("imgur.com").controversial(time_filter="week") reddit.multireddit(redditor="samuraisam", name="programming").controversial( time_filter="day" ) reddit.redditor("spez").controversial(time_filter="month") reddit.redditor("spez").comments.controversial(time_filter="year") reddit.redditor("spez").submissions.controversial(time_filter="all") reddit.subreddit("all").controversial(time_filter="hour")
- hot(**generator_kwargs)¶
Return a
ListingGeneratorfor hot items.Additional keyword arguments are passed in the initialization of
ListingGenerator.This method can be used like:
reddit.domain("imgur.com").hot() reddit.multireddit(redditor="samuraisam", name="programming").hot() reddit.redditor("spez").hot() reddit.redditor("spez").comments.hot() reddit.redditor("spez").submissions.hot() reddit.subreddit("all").hot()
- new(**generator_kwargs)¶
Return a
ListingGeneratorfor new items.Additional keyword arguments are passed in the initialization of
ListingGenerator.This method can be used like:
reddit.domain("imgur.com").new() reddit.multireddit(redditor="samuraisam", name="programming").new() reddit.redditor("spez").new() reddit.redditor("spez").comments.new() reddit.redditor("spez").submissions.new() reddit.subreddit("all").new()
- classmethod parse(data, reddit)¶
Return an instance of
clsfromdata.
- rising(**generator_kwargs)¶
Return a
ListingGeneratorfor rising submissions.Additional keyword arguments are passed in the initialization of
ListingGenerator.For example, to get rising submissions for r/test:
for submission in reddit.subreddit("test").rising(): print(submission.title)
- top(*, time_filter='all', **generator_kwargs)¶
Return a
ListingGeneratorfor top items.- Parameters:
- Raises:
ValueErroriftime_filteris invalid.- Return type:
Additional keyword arguments are passed in the initialization of
ListingGenerator.This method can be used like:
reddit.domain("imgur.com").top(time_filter="week") reddit.multireddit(redditor="samuraisam", name="programming").top(time_filter="day") reddit.redditor("spez").top(time_filter="month") reddit.redditor("spez").comments.top(time_filter="year") reddit.redditor("spez").submissions.top(time_filter="all") reddit.subreddit("all").top(time_filter="hour")