Released under the Artistic Licence."""
- def __init__(self, name=None, source=None):
+ def __init__(self, name=None, props=None):
""" source is source service, such as LinkedIn """
self._attributes = {};
if name: self._set('fn', name)
self._multi_attributes = {}
- self._source = source
+ if props:
+ for key in props:
+ self._set(key, props[key])
def __getitem__(self, key):
return self._safe_get(key)
def set_photo_url(self, url):
self._set('photo-url', url)
- def update_friend(self, other_friend, overwrite=False):
+ def update_from_friend(self, other_friend, overwrite=False):
"""
Overwrites any attributes in this friend, with attributes from other_friend
"""