Line 5: |
Line 5: |
| | | |
| == Mini Profiles == | | == Mini Profiles == |
− | Mini Profiles extend [[WebServices|Web Service]] code adding stubs to Account factory class for getting public id and getting latest posts from web service. | + | Mini Profiles extend [[WebServices|Web Service]] code adding minimal changes to the existing models to support social features such as fetching latest posts from multiple webservices and displaying it in Group View. |
| + | |
| + | === Detailed Description === |
| + | |
| + | For identification of a user on a webservice such as Project Sharing Website, or Fedora pastebin, a unique id will be used. The API of the webservice should allow posting/fetching resources related to the user via this UID (and if required authentication credentials such as API token). |
| + | |
| + | Changes to Sugar: |
| + | |
| + | ==== BuddyModel ==== |
| + | * Each Buddy used to have properties like nick, color and current activity |
| + | * We add another property `social_ids` to the BaseBuddyModel which are populated initially from all webservice accounts. |
| + | * social_ids is a dictionary of `service name`: `public id` pairs. E.g. {'gmoksaya': 'a454', 'gpaste': 'adsfq524325'} |
| + | * As are other properties like color, serialized social_ids are broadcasted to other online Sugar users via Telepathy. |
| + | |
| + | ==== WebServices Account Interface ==== |
| + | * Two new methods: `get_public_id()` and `get_latest_post()` are added to Account class. (webservice.account.Account) |
| + | * `get_public_id` returns the public id associated with that account. |
| + | ** It is used to populate social_ids property initially |
| + | ** Public ids are used to fetch posts from the external webservice, e.g. latest project uploaded on Project Sharing Website. (This is implemented in the service specific extension.) |
| + | * `get_latest_post` returns the latest post on the service. |
| + | |
| + | New Classes: |
| + | |
| + | ==== WebServicePost ==== |
| + | * This is an abstract class for WebService posts returned by `get_latest_post` |
| + | * Has unimplemented methods for title, message, image and hyperlink. |
| + | |
| | | |
| === Testing === | | === Testing === |