Merge pull request #74 from Brobin/user_profile_page
added user profile page for logged in users
This commit is contained in:
@@ -310,6 +310,18 @@ class SubredditContent(BaseContent):
|
||||
|
||||
return content
|
||||
|
||||
@classmethod
|
||||
def from_redditor(cls, reddit, loader, order='new'):
|
||||
submissions = reddit.user.get_submitted(sort=order)
|
||||
display_name = '/r/me'
|
||||
content = cls(display_name, submissions, loader)
|
||||
try:
|
||||
content.get(0)
|
||||
except (praw.errors.APIException, requests.HTTPError,
|
||||
praw.errors.RedirectException):
|
||||
raise SubredditError(display_name)
|
||||
return content
|
||||
|
||||
def get(self, index, n_cols=70):
|
||||
"""
|
||||
Grab the `i`th submission, with the title field formatted to fit inside
|
||||
|
||||
Reference in New Issue
Block a user