From: Steffen van Bergerem <svbergerem@online.de>
Date: Sat, 7 Sep 2013 16:40:22 +0000 (+0200)
Subject: Add provider_display_name to posts
X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=952a429ec1da3ab73f33d7a5edc742886ab98e57;p=diaspy.git

Add provider_display_name to posts
---

diff --git a/diaspy/streams.py b/diaspy/streams.py
index 66036c7..26c8800 100644
--- a/diaspy/streams.py
+++ b/diaspy/streams.py
@@ -218,7 +218,7 @@ class Stream(Generic):
     """
     location = 'stream.json'
 
-    def post(self, text='', aspect_ids='public', photos=None, photo=''):
+    def post(self, text='', aspect_ids='public', photos=None, photo='', provider_display_name=''):
         """This function sends a post to an aspect.
         If both `photo` and `photos` are specified `photos` takes precedence.
 
@@ -230,12 +230,14 @@ class Stream(Generic):
         :type photo: str
         :param photos: id of photo to post (obtained from _photoupload())
         :type photos: int
+        :param provider_display_name: name of provider displayed under the post
+        :type provider_display_name: str
 
         :returns: diaspy.models.Post -- the Post which has been created
         """
         data = {}
         data['aspect_ids'] = aspect_ids
-        data['status_message'] = {'text': text}
+        data['status_message'] = {'text': text, 'provider_display_name': provider_display_name}
         if photo: data['photos'] = self._photoupload(photo)
         if photos: data['photos'] = photos