From 952a429ec1da3ab73f33d7a5edc742886ab98e57 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Sat, 7 Sep 2013 18:40:22 +0200 Subject: [PATCH] Add provider_display_name to posts --- diaspy/streams.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.25.1