livestream.py
ListLiveStream (ListViewItem)
¶
Class exposing necessary components of a live stream
Source code in mps_youtube/listview/livestream.py
class ListLiveStream(ListViewItem):
""" Class exposing necessary components of a live stream """
# pylint: disable=unused-argument
def ytid(self, lngt=10):
""" Exposes ytid(string) """
return self.data.get("id").get("videoId")
def ret(self):
""" Returns content.video compatible tuple """
return (self.ytid(), self.title(), self.length())
def title(self, lngt=10):
""" exposes title """
return util.uea_pad(lngt, self.data.get("snippet").get("title"))
def description(self, lngt=10):
""" exposes description """
return util.uea_pad(lngt, self.data.get("snippet").get("description"))
@staticmethod
def return_field():
""" ret """
return "ret"
description(self, lngt=10)
¶
exposes description
Source code in mps_youtube/listview/livestream.py
def description(self, lngt=10):
""" exposes description """
return util.uea_pad(lngt, self.data.get("snippet").get("description"))
ret(self)
¶
Returns content.video compatible tuple
Source code in mps_youtube/listview/livestream.py
def ret(self):
""" Returns content.video compatible tuple """
return (self.ytid(), self.title(), self.length())
return_field()
staticmethod
¶
ret
Source code in mps_youtube/listview/livestream.py
@staticmethod
def return_field():
""" ret """
return "ret"
title(self, lngt=10)
¶
exposes title
Source code in mps_youtube/listview/livestream.py
def title(self, lngt=10):
""" exposes title """
return util.uea_pad(lngt, self.data.get("snippet").get("title"))
ytid(self, lngt=10)
¶
Exposes ytid(string)
Source code in mps_youtube/listview/livestream.py
def ytid(self, lngt=10):
""" Exposes ytid(string) """
return self.data.get("id").get("videoId")