Ignore:
Timestamp:
05/08/08 06:40:55 (4 years ago)
Author:
nigel.sim
Message:
  • Corrected the creation of bookmark objects
  • Added a put method to delicious
File:
1 edited

Legend:

Unmodified
Added
Removed
  • bookmark-conduit/trunk/DeliciousModule.py

    r146 r147  
    9292        data = data['posts'] 
    9393        self.data = {} 
    94         import pdb; pdb.set_trace() 
     94 
    9595        for obj in data: 
    9696            self.data[obj['href']] = obj 
     
    110110            time.sleep(1) 
    111111 
    112         data = BookmarkModule.BookmarkDataType(LUID, title=self.data[LUID]['description']) 
     112        data = Bookmark.Bookmark(title=self.data[LUID]['description'], uri=LUID) 
     113        data.set_UID(LUID) 
     114        data.set_open_URI(LUID) 
    113115        return data 
    114116 
    115117    def add(self, LUID): 
    116118        return True 
     119 
     120    def put(self, data, overwrite, LUID=None): 
     121        DataProvider.DataSink.put(self, data, overwrite, LUID) 
     122        data = Bookmark.Bookmark(title=data.get_title(), uri=data.get_uri()) 
     123        data.set_UID(LUID) 
     124        return data.get_rid() 
    117125         
    118126    def finish(self, aborted, error, conflict):  
Note: See TracChangeset for help on using the changeset viewer.