Ejemplo n.º 1
0
    def top_lang_srs(cls, lang, limit, filter_allow_top=False, over18=True, over18_only=False, ids=False, stale=False):
        from r2.lib import sr_pops

        lang = tup(lang)

        sr_ids = sr_pops.pop_reddits(lang, over18, over18_only, filter_allow_top=filter_allow_top)
        sr_ids = sr_ids[:limit]

        return sr_ids if ids else Subreddit._byID(sr_ids, data=True, return_dict=False, stale=stale)
Ejemplo n.º 2
0
    def top_lang_srs(cls, lang, limit, filter_allow_top = False, over18 = True,
                     over18_only = False, ids=False, stale=False):
        from r2.lib import sr_pops
        lang = tup(lang)

        sr_ids = sr_pops.pop_reddits(lang, over18, over18_only, filter_allow_top = filter_allow_top)
        sr_ids = sr_ids[:limit]

        return (sr_ids if ids
                else Subreddit._byID(sr_ids, data=True, return_dict=False, stale=stale))