Exemplo n.º 1
0
 def __init__(self, user_id=-1, feed_id=-1):
   self.sub_id = gen_id('subscriptions')
   self.user_id = user_id
   self.feed_id = feed_id
   self.active = False
   self.unread_count = 0
   self.last_read_date = datetime.datetime.utcnow()
Exemplo n.º 2
0
  def __init__(self, feed_id=-1, link=''):
    self.feed_id = feed_id
    self.link = link and urlnorm.normalize(link)

    self.story_id = gen_id('stories')
    self.title = ''
    self.summary = ''
    self.author = ''
    #publish_date = '' # TODO: remove this
    self.publish_date = datetime.datetime.utcnow()
    self.story_class = -1
Exemplo n.º 3
0
 def __init__(self, address='', title='', link=''):
   self.feed_id = gen_id('feeds')
   self.feed_address = address
   self.feed_title = title
   self.feed_link = link
   self.feed_link_locked = False
   self.feed_tagline = ''
   self.description = ''
   self.num_subscribers = 0
   self.etag = None
   self.last_modified = None
   self.last_update = datetime.datetime.min
   self.oldest_story = datetime.datetime.utcnow()
   self.next_scheduled_update = datetime.datetime.min
   self.num_stories = 0
Exemplo n.º 4
0
 def __init__(self, username='', password=''):
   self._id = gen_id('users')
   self.username = username
   self.password = password
Exemplo n.º 5
0
 def __init__(self, url=''):
   self._id = gen_id('stories')
   self.url = url