2 """The notional `Service' for a provider. This is responsible for communicating
3 with the backend service and enhancing contacts.
5 Copyright (c) Andrew Flegg <andrew@bleb.org> 2010.
6 Released under the Artistic Licence."""
9 """Should make initial calls to the service and retrieve a list of friends."""
12 # -----------------------------------------------------------------------
14 """Should return the same name as the provider class - debugging only - REMOVE/FIXME"""
19 # -----------------------------------------------------------------------
20 def pre_process_contact(self, contact):
21 """If the contact have an URL (or similar) that proves an existing matching
22 to a friend on this service, then this should be remembered to avoid
23 name collission/mapping the same friend to other contacts with the same
29 # -----------------------------------------------------------------------
30 def process_contact(self, contact, friend):
31 """Called for each contact in the address book. Any friends linked to
32 from the contact should have their matching updated. The back end should
33 enrich the friend passed with any meta-data it can."""
38 # -----------------------------------------------------------------------
39 def get_unmatched_friends(self):
40 """Return a list of friends not matched to a contact, or 'None' if manual mapping
46 # -----------------------------------------------------------------------
47 def finalise(self, updated, overwrite = False):
48 """Once all contacts have been processed, allows for any tidy-up/additional
49 enrichment. If any contacts are updated at this stage, 'updated' should