Copyright (c) Andrew Flegg <andrew@bleb.org> 2010.
Released under the Artistic Licence."""
- def __init__(self):
+ def __init__(self, service_id):
"""Should make initial calls to the service and retrieve a list of friends."""
+
+ self._service_id = service_id
# -----------------------------------------------------------------------
- def get_name(self):
- """Should return the same name as the provider class - debugging only - REMOVE/FIXME"""
+ def get_id(self):
+ """Return the service ID, as given to the service at creation."""
- return None
+ return self._service_id
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
+ def create_contacts(self):
+ """Return a list of friends which should have contacts created. This
+ should expected by the user, and optional."""
+
+ return []
+
+
+ # -----------------------------------------------------------------------
def finalise(self, updated, overwrite = False):
"""Once all contacts have been processed, allows for any tidy-up/additional
enrichment. If any contacts are updated at this stage, 'updated' should
def _create_friend(self, name):
"""Used to create a Friend object for a contact"""
- return Friend(name)
+ return Friend(name, self._service_id)