Module tvtimewrapper.user
Expand source code
# Class that has the methods for the user data
class userManager:
  def __init__(self,main):
    """
    User data instance accessible thoruogh `tvtime.user.METHOD`
    """
    self.m = main
  def profile(self):
    """
    Get user profile data
    """
    return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/profile").json()
  def friends(self):
    """
    Get user friend list
    """
    return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/friends").json()
  def stats(self):
    """
    Get user stats
    """
    return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/stats").json()
  def badges(self):
    """
    Get user badges list
    """
    return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/badges").json()
  def calendar(self):
    """
    Get user calendar of upcoming shows
    """
    return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/calendar").json()
  def notifications(self, page=0, limit=20):
    """
    Get user notifications. By default only 20, you can set different limit and use `page` accordingly
    """
    return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/notifications?page={page}&limit={limit}").json()Classes
- class userManager (main)
- 
User data instance accessible thoruogh tvtime.user.METHODExpand source codeclass userManager: def __init__(self,main): """ User data instance accessible thoruogh `tvtime.user.METHOD` """ self.m = main def profile(self): """ Get user profile data """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/profile").json() def friends(self): """ Get user friend list """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/friends").json() def stats(self): """ Get user stats """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/stats").json() def badges(self): """ Get user badges list """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/badges").json() def calendar(self): """ Get user calendar of upcoming shows """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/calendar").json() def notifications(self, page=0, limit=20): """ Get user notifications. By default only 20, you can set different limit and use `page` accordingly """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/notifications?page={page}&limit={limit}").json()Methods- def badges(self)
- 
Get user badges list Expand source codedef badges(self): """ Get user badges list """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/badges").json()
- def calendar(self)
- 
Get user calendar of upcoming shows Expand source codedef calendar(self): """ Get user calendar of upcoming shows """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/calendar").json()
- def friends(self)
- 
Get user friend list Expand source codedef friends(self): """ Get user friend list """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/friends").json()
- def notifications(self, page=0, limit=20)
- 
Get user notifications. By default only 20, you can set different limit and use pageaccordinglyExpand source codedef notifications(self, page=0, limit=20): """ Get user notifications. By default only 20, you can set different limit and use `page` accordingly """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/notifications?page={page}&limit={limit}").json()
- def profile(self)
- 
Get user profile data Expand source codedef profile(self): """ Get user profile data """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/profile").json()
- def stats(self)
- 
Get user stats Expand source codedef stats(self): """ Get user stats """ return self.m.session.get(f"{self.m.url}/user/{self.m.userId}/stats").json()