Mads Marquart
9f1c9c9697
Remove _core.Enum and aenum dependency
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
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
a1b3fd3ffa
Refactor message sending
2020-01-09 17:21:07 +01:00
Mads Marquart
6d6f779d26
Move plan actions into Plan
2020-01-09 15:17:51 +01:00
Mads Marquart
deda3b433d
Fix various errors
...
Found using mypy!
2020-01-09 13:04:04 +01:00
Mads Marquart
2ec0be9635
Remove ThreadType completely
2020-01-09 11:22:28 +01:00
Mads Marquart
6b4327fa69
Add Message.session
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
Mads Marquart
152f20027a
Add ThreadABC helper, that'll contain functions that threads can call
2020-01-09 00:35:43 +01:00
Mads Marquart
4199439e07
Remove Thread.type
2020-01-08 23:52:14 +01:00
Mads Marquart
0531a9e482
Add session attribute to Group/User/Page/Thread
2020-01-08 23:11:39 +01:00
Mads Marquart
a5abb05ab3
Rename .uid -> .id everywhere
2020-01-08 23:09:51 +01:00
Mads Marquart
45c0a4772d
Move attributes out of Thread and into User/Page/Group
2020-01-08 12:25:06 +01:00
Mads Marquart
d1fbf0ba0a
Clean up doc references
2019-12-11 16:20:38 +01:00
Mads Marquart
523c320c08
Make models use slots
2019-12-11 16:12:14 +01:00
Mads Marquart
637ea97ffe
Add Image model
2019-12-11 16:12:14 +01:00
Mads Marquart
e757e51a4e
Remove most __init__ methods
2019-10-22 20:18:14 +02:00
Mads Marquart
ce8711ba65
Enable model comparisons
2019-10-22 20:04:08 +02:00
Mads Marquart
c70a39c568
Remove deprecated arguments, methods, and classes
2019-09-08 18:44:06 +02:00
Mads Marquart
4b34a063e8
Rename Thread.last_message_timestamp to .last_active, and use datetimes
2019-09-08 15:20:31 +02:00
Mads Marquart
01b80b300e
Remove explicit new style class declarations
2019-08-28 21:57:50 +02:00
Mads Marquart
66505f8f41
Remove redundant encoding specifiers and __future__ imports
2019-08-28 21:57:46 +02:00
Mads Marquart
1f342d0c71
Move Client._getSendData into the Thread / Group models
2019-08-28 18:07:21 +02:00
Mads Marquart
5e86d4a48a
Add method to convert a ThreadType to a subclass of Thread (e.g. Group)
2019-08-28 18:07:21 +02:00
Mads Marquart
cc9d81a39e
Fix spelling mistakes in documentation
2019-07-24 16:18:15 +02:00
Mads Marquart
6b07f1d8b9
Fix first line of docstrings
...
- Use the imperative sense
- Use trailing dot
- Omit leading newline
- Grammar / vocabulary fixes
2019-07-24 13:43:01 +02:00
Mads Marquart
47c744e5e2
Fix reST any roles/references
2019-07-03 17:35:38 +02:00
Mads Marquart
18ec1f5680
Merge branch 'master' into refactor-model-parsing
2019-04-17 22:06:07 +02:00
LukasOndrejka
d7a5d00439
Add new colors ( #393 )
...
Color names are from https://www.htmlcsscolor.com/
2019-03-12 18:15:11 +01:00
Mads Marquart
ce469d5e5a
Move get_customization_info -> Thread._parse_customization_info
2019-03-10 17:02:03 +01:00
Mads Marquart
279f637c75
Move graphql_color_to_enum -> ThreadColor._from_graphql
2019-03-07 18:54:38 +01:00
Mads Marquart
8ae8435940
Use attrs, to remove verbose __init__ and __repr__ methods
...
Backwards compatibility is strictly preserved in `__init__`, including parameter names, defaults and position. Whenever that's difficult using `attrs`, the custom `__init__` is kept instead (for the time being).
`__repr__` methods have changed to the format `attrs` use, but people don't rely on this for anything other than debug output, so it shouldn't be a problem.
2019-02-24 20:18:07 +01:00
Mads Marquart
929c2137bf
Move model docstrings into the class level, out of init
2019-02-24 20:18:00 +01:00
Mads Marquart
98056e91c5
Split models.py into several files ( #398 )
...
* Move exception models into separate file
* Move thread model into separate file
* Move user model into separate file
* Move group and room models into separate file
* Move page model into separate file
* Move message model into separate file
* Move basic attachment models into separate file
* Move sticker model into separate file
* Move location models into separate file
* Move file attachment models into separate file
* Move mention model to reside with message model
* Move quick reply models into separate file
* Move poll models into separate file
* Move plan model into separate file
* Move active status model to reside with user model
* Move core enum model into separate file
* Move thread-related enums to reside with thread model
* Move typingstatus model to reside with user model
* Move emojisize and reaction enums to reside wtih message model
2019-02-24 20:06:59 +01:00