1 #### `Post()` object and posting
3 `Post` object is used to represent a post on D\*.
9 Posting is done through a `Stream` object method `post()`.
10 It supports posting just text, images or text and images.
12 `Stream().post()` returns `Post` object referring to the post
13 which have just been created.
18 If you want to post just text you should call `post()` method with
21 stream.post(text='Your post.')
23 It will return `Post` you have just created.
28 Posting images, from back-end point of view, is a two-step process.
29 First, you have to *upload* an image to the desired pod.
30 This is done by `_photoupload()` method.
31 It will return *id* of uploaded image.
33 Then you have to actually post your image and this is done by appending
34 `photos` field containg the id of uploaded image to the data being
35 sent by request. This is handled by `post()` method.
37 `post()` has two very similar arguments used for posting photos.
38 They are `photos` - which takes id and `photo` - which takes filename.
40 You can post images using either of them. Even passing them side by side
41 is accepted but remember that `photos` will overwrite data set by `photo`.
44 Example #1: using `photo`
47 stream.post(photo='./kitten-image.png')
50 Example #2: using `photos`
53 id = stream._photoupload(filename='./kitten-image.png')
54 stream.post(photos=id)
57 The effect will be the same.
58 To either call you can append `text` argument which will be posted alongside
63 ###### Manual for `diaspy`, written by Marek Marecki