예제 #1
0
 def DeleteDoumails(self, uris):
     feed = gdata.GDataFeed()
     for uri in uris:
         entry = gdata.GDataEntry()
         entry.id = atom.Id(text=uri)
         feed.entry.append(entry)
     return self.Post(feed, '/doumail/delete')
예제 #2
0
 def MarkDoumailRead(self, uris):
     feed = gdata.GDataFeed()
     for uri in uris:
         entry = gdata.GDataEntry()
         entry.id = atom.Id(text=uri)
         entry.attribute = []
         entry.attribute.append(douban.Attribute('unread', 'false'))
         feed.entry.append(entry)
     return self.Put(feed, '/doumail/')
예제 #3
0
 def testAllowsEmptyId(self):
     feed = gdata.GDataFeed()
     try:
         feed.id = atom.Id()
     except AttributeError:
         self.fail('Empty id should not raise an attribute error.')