Mads Marquart
d1fbf0ba0a
Clean up doc references
2019-12-11 16:20:38 +01:00
Mads Marquart
aaf26691d6
Move Mention parsing into the class itself
2019-12-11 16:20:38 +01:00
Mads Marquart
1f96c624e7
Combine variously sized previews to a single key
2019-12-11 16:20:38 +01:00
Mads Marquart
a7b08fefe4
Use attrs on exception classes
2019-12-11 16:20:38 +01:00
Mads Marquart
91d4055545
Make models use kw_only (on Python > 3.5)
2019-12-11 16:12:14 +01:00
Mads Marquart
523c320c08
Make models use slots
2019-12-11 16:12:14 +01:00
Mads Marquart
27ae1c9f88
Stop mutating models
2019-12-11 16:12:14 +01:00
Mads Marquart
b03d0ae3b7
Allow specifying class variables in init
2019-12-11 16:12:14 +01:00
Mads Marquart
637ea97ffe
Add Image model
2019-12-11 16:12:14 +01:00
Mads Marquart
074c271fb8
Fix pytest version
2019-12-11 16:11:57 +01:00
Mads Marquart
e348425204
Fix black version
2019-12-11 16:11:54 +01:00
Mads Marquart
b8f83610e7
Merge pull request #480 from carpedm20/add-unit-tests
...
Add unit tests
2019-10-28 11:01:39 +01:00
Mads Marquart
41a445a989
Add ShareAttachment subattachment tests
2019-10-28 10:33:45 +01:00
Mads Marquart
80c7fff571
Add file attachment tests
2019-10-28 10:33:04 +01:00
Mads Marquart
e2d98356ad
Add poll tests
2019-10-27 14:40:09 +01:00
Mads Marquart
a8412ea3d8
Add plan tests
2019-10-27 14:40:09 +01:00
Mads Marquart
71177d8bf9
Add group test
2019-10-27 14:40:09 +01:00
Mads Marquart
5019aac6b7
Add page test
2019-10-27 14:40:09 +01:00
Mads Marquart
0c305f621a
Add user tests
2019-10-27 14:40:09 +01:00
Mads Marquart
ef73bb27aa
Add graphql tests
2019-10-27 14:40:09 +01:00
Mads Marquart
bd499c1ea2
Add message tests
2019-10-27 14:40:09 +01:00
Mads Marquart
24c4b10012
Add thread tests
2019-10-27 14:40:09 +01:00
Mads Marquart
648cbb4999
Add location tests, and fix live location expires_at parsing
2019-10-27 14:40:09 +01:00
Mads Marquart
ef5c86c427
Add quick reply tests
2019-10-27 14:40:09 +01:00
Mads Marquart
5e0b80cada
Add sticker tests
2019-10-27 14:40:09 +01:00
Mads Marquart
9898e8cd19
Add attachment tests
2019-10-27 14:40:09 +01:00
Mads Marquart
77d9b25bf0
Add utility function tests
2019-10-27 14:40:08 +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
bdd7f69a66
Fix missing pytest 4.0 features
...
Not really sure how many versions of pytest we should support? But then
again, we might as well for now...
2019-09-10 21:22:28 +02:00
Mads Marquart
d06ff7078a
Mark existing tests as online
...
- Remove `offline` and `expensive` markers
2019-09-10 10:59:01 +02:00
Mads Marquart
7416c8b7fc
Make test setup more strict
2019-09-10 10:59:01 +02:00
Mads Marquart
fc7cc4ca38
Fix typo
2019-09-10 10:58:28 +02:00
Mads Marquart
614e5ad4bb
Use snake_case method names
...
Renamed:
- Message.formatMentions
- _util.digitToChar
- _util.generateMessageID
- _util.getSignatureID
- _util.generateOfflineThreadingID
- Client._markAlive
Renamed following Client methods:
- isLoggedIn
- getSession
- setSession
- _forcedFetch
- fetchThreads
- fetchAllUsersFromThreads
- fetchAllUsers
- searchForUsers
- searchForPages
- searchForGroups
- searchForThreads
- searchForMessageIDs
- searchForMessages
- _fetchInfo
- fetchUserInfo
- fetchPageInfo
- fetchGroupInfo
- fetchThreadInfo
- fetchThreadMessages
- fetchThreadList
- fetchUnread
- fetchUnseen
- fetchImageUrl
- fetchMessageInfo
- fetchPollOptions
- fetchPlanInfo
- _getPrivateData
- getPhoneNumbers
- getEmails
- getUserActiveStatus
- fetchThreadImages
- _oldMessage
- _doSendRequest
- quickReply
- _sendLocation
- sendLocation
- sendPinnedLocation
- _sendFiles
- sendRemoteFiles
- sendLocalFiles
- sendRemoteVoiceClips
- sendLocalVoiceClips
- forwardAttachment
- createGroup
- addUsersToGroup
- removeUserFromGroup
- _adminStatus
- addGroupAdmins
- removeGroupAdmins
- changeGroupApprovalMode
- _usersApproval
- acceptUsersToGroup
- denyUsersFromGroup
- _changeGroupImage
- changeGroupImageRemote
- changeGroupImageLocal
- changeThreadTitle
- changeNickname
- changeThreadColor
- changeThreadEmoji
- reactToMessage
- createPlan
- editPlan
- deletePlan
- changePlanParticipation
- createPoll
- updatePollVote
- setTypingStatus
- markAsDelivered
- _readStatus
- markAsRead
- markAsUnread
- markAsSeen
- friendConnect
- removeFriend
- blockUser
- unblockUser
- moveThreads
- deleteThreads
- markAsSpam
- deleteMessages
- muteThread
- unmuteThread
- muteThreadReactions
- unmuteThreadReactions
- muteThreadMentions
- unmuteThreadMentions
- _pullMessage
- _parseMessage
- _doOneListen
- setActiveStatus
- onLoggingIn
- on2FACode
- onLoggedIn
- onListening
- onListenError
- onMessage
- onColorChange
- onEmojiChange
- onTitleChange
- onImageChange
- onNicknameChange
- onAdminAdded
- onAdminRemoved
- onApprovalModeChange
- onMessageSeen
- onMessageDelivered
- onMarkedSeen
- onMessageUnsent
- onPeopleAdded
- onPersonRemoved
- onFriendRequest
- onInbox
- onTyping
- onGamePlayed
- onReactionAdded
- onReactionRemoved
- onBlock
- onUnblock
- onLiveLocation
- onCallStarted
- onCallEnded
- onUserJoinedCall
- onPollCreated
- onPollVoted
- onPlanCreated
- onPlanEnded
- onPlanEdited
- onPlanDeleted
- onPlanParticipation
- onQprimer
- onChatTimestamp
- onBuddylistOverlay
- onUnknownMesssageType
- onMessageError
2019-09-08 19:59:53 +02:00
Mads Marquart
8d8ef6bbc9
Merge pull request #466 from carpedm20/various-removals
...
Various removals
2019-09-08 18:51:20 +02:00
Mads Marquart
5aed7b0abc
Remove login retrying
...
Unnecessary clutter, easy to implement if required by the user.
2019-09-08 18:44:46 +02:00
Mads Marquart
856c1ffe0e
Remove ability to control the listening loop externally
...
It was probably scarcely used, and separate functionality will be
developed that makes this redundant anyhow.
2019-09-08 18:44:46 +02:00
Mads Marquart
650112a592
Remove automatic fb_dtsg refreshing
...
This was error prone, inefficient and wouldn't handle all error cases.
The real solution is to make some way to retry the request in the
general case (since you can alway just get logged out), and that's
probably out of scope for this project, at least right now. :/
2019-09-08 18:44:46 +02:00
Mads Marquart
b5a37e35c6
Remove FBchatUserError in favor of builtin exceptions
2019-09-08 18:44:46 +02:00
Mads Marquart
91cf4589a5
Remove ability to set a custom User-Agent
...
This causes issues if the User-Agent is set to resemble a mobile phone,
see #431 , and besides, it's not an API surface I want / need to support.
2019-09-08 18:44:46 +02:00
Mads Marquart
4155775305
Remove ssl_verify property
...
Only used when debugging, and in that case, the functionality could be
implemented using private APIs.
2019-09-08 18:44:45 +02:00
Mads Marquart
7c758501fc
Remove methods to set the default thread
...
This has been done to value explicitness over implicitness, and also
since the question of whether thread_id=None is acceptable was dependent
on mutable variables in Client.
2019-09-08 18:44:45 +02:00
Mads Marquart
c70a39c568
Remove deprecated arguments, methods, and classes
2019-09-08 18:44:06 +02:00
Mads Marquart
2e88bd49d4
Merge pull request #472 from carpedm20/use-datetime
...
Use datetime/timedelta objects
2019-09-08 18:41:41 +02:00
Asiel Díaz Benítez
6bffb66b5e
Fix mimetypes.guess_type ( #471 )
...
`mimetypes.guess_type` fails if the url is something like `http://example.com/file.zip?u=10 `.
2019-09-08 15:56:27 +02:00
Mads Marquart
72ab8695f1
Make ts
a datetime, and rename to at
in all onX methods
2019-09-08 15:24:58 +02:00
Mads Marquart
47bdb84957
Make seen_ts a datetime, and rename to seen_at in onX methods
...
- onMessageSeen
- onMarkedSeen
2019-09-08 15:24:58 +02:00
Mads Marquart
24cf4047b7
Convert durations to timedeltas
...
On:
- AudioAttachment.duration
- VideoAttachment.duration
- Client.onCallEnded call_duration argument
- Client.muteThread mute_time argument
2019-09-08 15:24:58 +02:00
Mads Marquart
2e53963398
Make LiveLocationAttachment.expires_at a datetime object
...
Renamed from .expiration_time
2019-09-08 15:24:58 +02:00
Mads Marquart
61842b199f
Make ActiveStatus.last_active a datetime object
2019-09-08 15:24:58 +02:00