Пример #1
0
    def to_event(self, raw):
        e = Event()
        e.feed = self.dict()
        e.text = Runkeeper.get_text(raw)
        e.link = raw['activity']
        e.occurred = Runkeeper.get_date(raw, self.timezone)
        e.raw = raw

        return e
Пример #2
0
    def to_event(self, raw):
        e = Event()
        e.feed = self.dict()
        e.text = raw['text']
        e.occurred = datetime.datetime.strptime(raw['created_at'],
                                                '%a %b %d %H:%M:%S +0000 %Y')
        e.raw = raw

        return e
Пример #3
0
    def to_event(self, raw):
        e = Event()
        e.feed = self.dict()
        e.title = "[" + raw["name"] + "]"
        e.text = "Obtained"
        e.link = "http://www.wowhead.com/item=" + str(raw['id'])
        e.occurred = WoW.parse_date(raw['timestamp'])
        e.raw = raw

        return e
Пример #4
0
    def to_event(self, raw):
        e = Event()
        e.feed = self.dict()
        e.text = Fitbit.get_text(raw)
        e.occurred = datetime.datetime.strptime(
            raw['datetime'], '%a %b %d %H:%M:%S +0000 %Y'
        )
        e.raw = raw

        return e
Пример #5
0
    def to_event(self, raw):
        e = Event()
        e.feed = self.dict()
        e.text = raw['artist']['#text'] + " - " + raw['name']
        e.link = raw.get('url')
        e.occurred = datetime.datetime.utcfromtimestamp(
            float(raw["date"]["uts"]))
        e.thumbnail_url = Lastfm.get_image_url(raw)
        e.raw = raw

        return e