3 This object is used to represent user's stream on D\*.
4 It is basically a list of posts.
10 To get basic stream you have to have working `Connection()` as
11 this is required by `Stream()`'s constructor.
13 c = diaspy.connection.Connection(pod='https://pod.example.com',
17 stream = diaspy.streams.Stream(c)
19 Now you have a stream filled with posts (if any can be found on user's
22 Other streams you can use are `Activity()`, `Aspects()`, `Commented()`,
23 `Liked()`, `Mentions()`, `FollowedTags()` and `Tag()`.
25 Example: `stream = diaspy.streams.Activity(c)`
29 ##### `fill()`, `update()` and `more()`
31 When you want to refresh stream call it's `fill()` method. It will
32 overwrite old stream contents.
34 On the contrary, `update()` will get a new stream but will not overwrite
35 old stream saved in the object memory. It will append every new post to
38 `more()` complements `update()` it will fetch you older posts instead of
43 ##### Length of and iterating over a stream
45 Stream's length can be checked by calling `len()` on it.
50 When you want to iterate over a stream (e.g. when you want to print
51 first *n* posts on the stream) you can do it in two ways.
53 First, using `len()` and `range()` functions.
55 for i in range(len(stream)):
58 Second, iterating directly over the stream contents:
66 ##### Posting data to stream
68 This is described in [`posting`](./posting.markdown) document in this
78 This will remove all posts from visible stream.
82 This will scan stream for nonexistent posts (eg. deleted) and remove
87 ###### Manual for `diaspy`, written by Marek Marecki