Adjust the examples to the new API and extend the advanced API to showcase multiple stream listeners #9

Merged
CSDUMMI merged 2 commits from docs-advanced-example-cli-mastodon-interface into main 2023-04-11 16:55:34 +00:00
CSDUMMI commented 2023-04-03 18:24:13 +00:00 (Migrated from gitlab.com)

This MR depends on !6 as it adjust the examples to the new connect method and extends the examples/advanced.py bot.

The advanced bot now listens both on the user and the local stream.
Any local status is printed to stdout, while the bot also reads from the command line for lines to post as local statuses.

$ INSTANCE=example.org ACCESS_TOKEN=... python3 examples/advanced.py
alice, Hallo
Toot> Hello, alice!

This is to showcase not just the ability to listen on multiple streams, but also to use the bot's utility functions (.post in this case).

This MR depends on !6 as it adjust the examples to the new `connect` method and extends the `examples/advanced.py` bot. The advanced bot now listens both on the user and the local stream. Any local status is printed to stdout, while the bot also reads from the command line for lines to post as local statuses. ```bash $ INSTANCE=example.org ACCESS_TOKEN=... python3 examples/advanced.py alice, Hallo Toot> Hello, alice! ``` This is to showcase not just the ability to listen on multiple streams, but also to use the bot's utility functions (`.post` in this case).
CSDUMMI commented 2023-04-03 18:24:13 +00:00 (Migrated from gitlab.com)

requested review from @emacsen

requested review from @emacsen
CSDUMMI commented 2023-04-03 18:24:13 +00:00 (Migrated from gitlab.com)

assigned to @CSDUMMI

assigned to @CSDUMMI
CSDUMMI commented 2023-04-03 18:24:46 +00:00 (Migrated from gitlab.com)

mentioned in merge request !6

mentioned in merge request !6
CSDUMMI commented 2023-04-03 18:45:21 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 4abefbfd - Mock Mastodon.py library differently in tests to be able to test connect

Compare with previous version

added 1 commit <ul><li>4abefbfd - Mock Mastodon.py library differently in tests to be able to test connect</li></ul> [Compare with previous version](/babka_net/mastobot/-/merge_requests/7/diffs?diff_id=646225107&start_sha=34ef690ee61f65ef46776c94c4ddd633eae25f8a)
CSDUMMI commented 2023-04-03 18:56:04 +00:00 (Migrated from gitlab.com)

added 3 commits

  • 5e380fb2 - Add listening to multiple streams on the advanced example.
  • 77d78af9 - Extend the advanced example to be a complete command-line Mastodon client for local posts
  • 963e9624 - Mock Mastodon.py library differently in tests to be able to test connect

Compare with previous version

added 3 commits <ul><li>5e380fb2 - Add listening to multiple streams on the advanced example.</li><li>77d78af9 - Extend the advanced example to be a complete command-line Mastodon client for local posts</li><li>963e9624 - Mock Mastodon.py library differently in tests to be able to test connect</li></ul> [Compare with previous version](/babka_net/mastobot/-/merge_requests/7/diffs?diff_id=646232829&start_sha=4abefbfd25f8c75cb7c0cdeabb4f5c71e1136582)
emacsen commented 2023-04-11 16:55:34 +00:00 (Migrated from gitlab.com)

mentioned in commit 258de7beec

mentioned in commit 258de7beec44032ab48ec973bb0399c8f4602b21
emacsen (Migrated from gitlab.com) merged commit 258de7beec into main 2023-04-11 16:55:34 +00:00
Sign in to join this conversation.
No reviewers
No labels
bug
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
babka/matzobot!9
No description provided.