Commit Graph

210 Commits

Author SHA1 Message Date
Mads Marquart
c83836ceed Rename _core.py -> _common.py 2020-01-23 14:06:26 +01:00
Mads Marquart
45a71fd1a3 Add inline examples 2020-01-23 12:07:40 +01:00
Mads Marquart
89f90ef849 Make all models frozen, and sessions hashable 2020-01-23 10:18:33 +01:00
Mads Marquart
3d3b0f9e91 Remove todo page and testing page in documentation 2020-01-22 23:00:45 +01:00
Mads Marquart
935947f212 Fix a few spelling errors 2020-01-22 03:48:03 +01:00
Mads Marquart
2644aa9b7a Add type hints, and clean up Client a bit 2020-01-22 01:43:04 +01:00
Mads Marquart
9b75db898a Move listen methods out of Client and into MQTT class
Make MQTT class / `Listener` public
2020-01-21 01:29:43 +01:00
Mads Marquart
01f8578dea Add top level MQTT topic parsing to a separate file 2020-01-20 18:20:24 +01:00
Mads Marquart
0a6bf221e6 Move /t_ms delta admin text type parsing to separate file and add tests 2020-01-20 18:02:56 +01:00
Mads Marquart
4abe5659ae Move /t_ms delta class parsing to separate file and add tests 2020-01-20 18:02:55 +01:00
Mads Marquart
0696ff9f4b Move ClientPayload parsing to separate file and add tests 2020-01-16 17:06:15 +01:00
Mads Marquart
e735823d37 Add initial common/core listen events 2020-01-16 16:02:58 +01:00
Mads Marquart
dbc88bc4ed Fix merge error, fix listening and clean up 2020-01-16 11:32:21 +01:00
Mads Marquart
d2f8acb68f Merge branch 'v1' 2020-01-15 16:37:08 +01:00
Mads Marquart
e25f53d9a9 Wrap requests exceptions 2020-01-15 12:19:28 +01:00
Mads Marquart
3cdd646c37 Move error handling functions to _exception 2020-01-15 11:05:59 +01:00
Mads Marquart
3445eccc32 Initial redo of exceptions 2020-01-15 10:49:16 +01:00
Mads Marquart
45303005b8 Fix onFriendRequest 2020-01-14 23:27:50 +01:00
Mads Marquart
2b45fdbc8a Make Client.search_for_X more forwards compatible 2020-01-14 22:10:12 +01:00
Mads Marquart
60cce0d112 Refactor Client.fetch_thread_list to return an iterable 2020-01-14 21:28:54 +01:00
Mads Marquart
55182e21b6 Improve message searching in Client 2020-01-13 17:06:59 +01:00
Mads Marquart
5e09cb9cab Remove composite methods in Client
- graphql_requests
- graphql_request
- fetch_threads
- fetch_all_users_from_threads
- fetch_user_info
- fetch_page_info
- fetch_group_info

fetch_threads and fetch_all_users_from_threads will be replaced later by
better versions
2020-01-13 11:39:09 +01:00
Mads Marquart
3662fbd038 Rename Client.fetch_all_users -> .fetch_users, and document it better 2020-01-13 11:39:09 +01:00
Mads Marquart
26f99d983e Refactor polls and poll options 2020-01-09 22:03:15 +01:00
Mads Marquart
c81e509eb0 Remove TypingStatus 2020-01-09 21:00:35 +01:00
Mads Marquart
8b6d9b16c6 Remove ThreadColor
Replaced with raw color values. In the future, we should probably
investigate using "themes"
2020-01-09 21:00:34 +01:00
Mads Marquart
3341f4a45c Remove MessageReaction 2020-01-09 19:51:06 +01:00
Mads Marquart
b00f748647 Remove msg parameter from Client.on_x methods 2020-01-09 18:25:02 +01:00
Mads Marquart
f2bf3756db Standardize json parsing 2020-01-09 18:19:25 +01:00
Mads Marquart
12c2059812 Split Message into Message/MessageData 2020-01-09 17:50:18 +01:00
Mads Marquart
6d6f779d26 Move plan actions into Plan 2020-01-09 15:17:51 +01:00
Mads Marquart
483fdf43dc Split Plan into Plan/PlanData, and add Plan.session 2020-01-09 15:13:37 +01:00
Mads Marquart
e039e88f80 Be more explicit in UserData/PageData parsing
Allows us to make some fields required (aka. not None)
2020-01-09 14:52:29 +01:00
Mads Marquart
2459a0251a Split Group into Group/GroupData 2020-01-09 14:09:44 +01:00
Mads Marquart
c7ee45aaca Split Page into Page/PageData 2020-01-09 14:09:33 +01:00
Mads Marquart
22217c793c Split User into User/UserData 2020-01-09 14:09:17 +01:00
Mads Marquart
deda3b433d Fix various errors
Found using mypy!
2020-01-09 13:04:04 +01:00
Mads Marquart
942c3e5b70 Merge pull request #499 from carpedm20/session-in-models
Add ThreadABC helper, and move a bunch of methods out of Client
2020-01-09 11:33:45 +01:00
Mads Marquart
2ec0be9635 Remove ThreadType completely 2020-01-09 11:22:28 +01:00
Mads Marquart
d8d044f091 Merge pull request #498 from carpedm20/rename-uid
Rename .uid to .id
2020-01-09 10:58:46 +01:00
Mads Marquart
f968e583e8 Make Client.session attribute public 2020-01-09 10:55:36 +01:00
Mads Marquart
0e0fce714a Allow on_2fa_callback to be None in Session.login 2020-01-09 10:39:30 +01:00
Mads Marquart
cf24c7e8c2 Add Session and Client __repr__ implementations 2020-01-09 10:32:30 +01:00
Mads Marquart
ded6039b69 Add message-related functions to Message model 2020-01-09 01:13:27 +01:00
Mads Marquart
6b4327fa69 Add Message.session 2020-01-09 01:13:27 +01:00
Mads Marquart
53e4669fc1 Move fetch_message_info to Message 2020-01-09 01:13:27 +01:00
Mads Marquart
4dea10d5de Add thread mute settings to ThreadABC 2020-01-09 01:13:26 +01:00
Mads Marquart
bd2b39c27a Add thread actions to ThreadABC 2020-01-09 01:13:17 +01:00
Mads Marquart
f3b1d10d85 Move fetch methods to ThreadABC 2020-01-09 00:35:44 +01:00
Mads Marquart
13aa1f5e5a Move send methods to ThreadABC 2020-01-09 00:35:44 +01:00