Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created Message class to encapsulate the "messages" generator #129

Merged
merged 4 commits into from
Jul 25, 2018

Commits on Jul 25, 2018

  1. Configuration menu
    Copy the full SHA
    55f64a1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    635d154 View commit details
    Browse the repository at this point in the history
  3. Moved query_ids from Imbox to Messages.

    Moved `fetch_list` to `Messages` and renamed `fetch_email_list`, moving assignment of uid_list to the constructor of `Messages`.
    
    Moved `fetch_by_uid` from `Imbox` to a pure function in `parser` module.
    
    Replaced call to `Imbox.fetch_list` with a call to `Messages` instead.
    
    created `Messages` class, which encapsulates the generator `Messages.fetch_email_list`, while also implementing `__len__` to show how many emails match a given query, and `__iter__` to refresh the `fetch_email_list` generator when it's exhausted.  It also implements `__getitem__` to support indexing of the emails matching a query.  Messages requires the `connection` and `parser_policy` established in `Imbox` and accepts arbitrary keyword arguments, which it uses in the IMAP query as well as in the `__repr__`.
    zevaverbach committed Jul 25, 2018
    Configuration menu
    Copy the full SHA
    8e26e92 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    73fafcb View commit details
    Browse the repository at this point in the history