Software Freedom Law Center

Changeset 174

Show
Ignore:
Timestamp:
07/09/08 00:40:00 (5 months ago)
Author:
landon
Message:

Entry API now connets to the REST interface dunk_ made, still needs some tweaking in regards to types being passed though

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/antimatter/luke/myplugs/libtracker/entry.py

    r169 r174  
    11""" Abstract database interface for time manipulation """ 
    22 
     3from myplugs.timedbplug.timedb import TimeObj 
     4 
    35def add(user, adjustment): 
    4     pass 
     6    restconn = TimeObj('http://localhost:8888/timedb') 
     7    result = restconn.add(user.name,'default', adjustment.start, adjustment.duration) 
     8    print result 
     9    return result 
  • trunk/antimatter/luke/myplugs/libtracker/timeparser.py

    r169 r174  
    1212def msgparse(ievent): 
    1313    dtime = extractor(ievent) 
     14    ievent.reply(repr(dtime)) 
    1415    if (dtime): 
    1516        user = check_auth(ievent) 
    16         add(user, dtime[1]) 
     17        result = add(user, dtime[1]) 
     18        ievent.reply(result) 
    1719 
    1820def extractor(ievent): 
  • trunk/antimatter/luke/myplugs/libtracker/__init__.py

    r163 r174  
    1 __plugs__ = ['timeparser', 'auth', 'user', 'tracker'
     1__plugs__ = ['timeparser', 'auth', 'user', 'tracker', 'timeadjustment', 'entry'

SFLC Main Page

[frdm] Support SFLC