예제 #1
0
 def list_contacts( cls, start_idx=None, length=None ):
    listing = contact.list_contacts( cls.publicKeyStr(), cls.privateKeyStr(), start_idx=start_idx, length=length )
    if listing != None:
       listing_dicts = [storage.tuple_to_dict( x ) for x in listing]
       return listing_dicts
    else:
       return []
예제 #2
0
 def read_contact( cls, email_addr ):
    contact_tuple = contact.read_contact( cls.publicKeyStr(), cls.privateKeyStr(), email_addr )
    if contact_tuple != None:
       contact_dict = storage.tuple_to_dict( contact_tuple )
       return contact_dict
    else:
       return None