3 This object is used to represent user's stream on D\*.
4 It is returned by `Client()`'s method `get_stream()` and
5 is basically a list of posts.
11 To get basic stream you have to have working `Connection()` as
12 this is required by `Stream()`'s constructor.
14 c = diaspy.connection.Connection(pod='https://pod.example.com',
18 stream = diaspy.models.Stream(c)
20 Now you have a stream filled with posts (if any can be found on user's stream).
24 ##### `fill()`, `update()` and `more()`
26 When you want to refresh stream call it's `fill()` method. It will overwrite old stream
29 On the contrary, `update()` will get a new stream but will not overwrite old stream saved
30 in the object memory. It will append every new post to the old stream.
32 `more()` complements `update()` it will fetch you older posts instead of newer ones.
36 ##### Length of and iterating over a stream
38 Stream's length can be checked by calling `len()` on it.
43 When you want to iterate over a stream (e.g. when you want to print first *n* posts on
44 the stream) you can do it in two ways.
46 First, using `len()` and `range()` functions.
48 for i in range(len(stream)):
51 Second, iterating directly over the stream contents:
59 ##### Posting data to stream
61 This is described in [`posting`](./posting.markdown) document in this manual.
70 This will remove all posts from visible stream.
74 This will scan stream for nonexistent posts (eg. deleted) and remove them.
78 ###### Manual for `diaspy`, written by Marek Marecki