def __init__(self, data): self.id = data['id'] self.podcast = data['podcast'] self.state = int(data['state']) self.type = int(data['type']) self.synced = parse_bool(data['synced']) self.title = data['title'] self.url = data['url'] self.streamurl = data['streamurl'] self.livedate = parse_date(data['livedate']) self.duration = int(data['duration']) self.twittered = parse_bool(data['twittered'])
def __init__(self, data): self.id = int(data['ID']) self.title = data['title'] self.description = data['description'] self.url = data['url'] self.feedurl = data['feedurl'] self.imageurl = data['imageurl'] self.slug = data['slug'] self.recension = data['recension'] self.cluster = data['cluster'] self.rec_pos = data['rec_pos'] self.rec_neg = data['rec_neg'] self.chat_server = data['chat_server'] self.chat_channel = data['chat_channel'] self.chat_url = data['chat_url'] self.obsolete = parse_bool(data['obsolete']) self.freeze = parse_bool(data['freeze']) self.otitle = data['otitle'] self.feature = parse_bool(data['feature']) self.contact = PodcastDataContact(data['contact']) self.rundfunk = parse_bool(data['rundfunk'])
def test_parse_bool(str, bool): assert parse_bool(str) == bool