Added missing documentation for all supported query keyword arguments. Fixes #124. Added Pycharm directory to .gitignore.
Fixed var names in documentation of query keywords moved Messages and Imbox to their own modules, imported Imbox.imbox into __init__.py and put it in __all__. fixes #130. clarified in documentation and Imbox.messages logging that, unless a folder is specified in the kwargs to Imbox.messages, the returned messages will be from the inbox. In the documentation this is accomplished exclusively by the var names. fixes #128. amended `8df7d7c` to reflect manual changes made to `README.rst` in current master, but also added `inbox_` to several var names to make that explicit in the documentation. Added flags to messages returned by `fetch_email_by_uid`, using the new function `parse_flags` in `parser.py`. Fixes #126. added TODO back into query.py
This commit is contained in:
33
README.rst
33
README.rst
@@ -36,40 +36,45 @@ Usage
|
||||
ssl=True,
|
||||
ssl_context=None,
|
||||
starttls=False) as imbox:
|
||||
|
||||
|
||||
# Get all folders
|
||||
status, folders_with_additional_info = imbox.folders()
|
||||
|
||||
# Gets all messages from the inbox
|
||||
all_messages = imbox.messages()
|
||||
all_inbox_messages = imbox.messages()
|
||||
|
||||
# Unread messages
|
||||
unread_messages = imbox.messages(unread=True)
|
||||
unread_inbox_messages = imbox.messages(unread=True)
|
||||
|
||||
# Flagged messages
|
||||
inbox_flagged_messages = imbox.messages(flagged=True)
|
||||
|
||||
# Un-flagged messages
|
||||
inbox_unflagged_messages = imbox.messages(unflagged=True)
|
||||
|
||||
# Messages sent FROM
|
||||
messages_from = imbox.messages(sent_from='sender@example.org')
|
||||
inbox_messages_from = imbox.messages(sent_from='sender@example.org')
|
||||
|
||||
# Messages sent TO
|
||||
messages_to = imbox.messages(sent_to='receiver@example.org')
|
||||
inbox_messages_to = imbox.messages(sent_to='receiver@example.org')
|
||||
|
||||
# Messages received before specific date
|
||||
messages_received_before = imbox.messages(date__lt=datetime.date(2018, 7, 31))
|
||||
inbox_messages_received_before = imbox.messages(date__lt=datetime.date(2018, 7, 31))
|
||||
|
||||
# Messages received after specific date
|
||||
messages_received_after = imbox.messages(date__gt=datetime.date(2018, 7, 30))
|
||||
inbox_messages_received_after = imbox.messages(date__gt=datetime.date(2018, 7, 30))
|
||||
|
||||
# Messages received on a specific date
|
||||
messages_received_on_date = imbox.messages(date__on=datetime.date(2018, 7, 30))
|
||||
inbox_messages_received_on_date = imbox.messages(date__on=datetime.date(2018, 7, 30))
|
||||
|
||||
# Messages from a specific folder
|
||||
messages_from_folder = imbox.messages(folder='Social')
|
||||
|
||||
# Messages whose subjects contain a string
|
||||
messages_subject_christmas = imbox.messages(subject='Christmas')
|
||||
|
||||
# Messages whose subjects contain a string
|
||||
inbox_messages_subject_christmas = imbox.messages(subject='Christmas')
|
||||
|
||||
|
||||
|
||||
for uid, message in all_messages:
|
||||
for uid, message in all_inbox_messages:
|
||||
# Every message is an object with the following keys
|
||||
|
||||
message.sent_from
|
||||
@@ -129,7 +134,7 @@ Usage
|
||||
|
||||
# mark the message as read
|
||||
imbox.mark_seen(uid)
|
||||
|
||||
|
||||
|
||||
|
||||
Changelog
|
||||
|
||||
Reference in New Issue
Block a user