Skip to content

Commit

Permalink
Support received_recent_date thread ordering.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennie Lees committed Jul 28, 2015
1 parent bb29ca2 commit da84d32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ for thread in namespace.threads.where(starred=True):
# List all threads with '[email protected]'
for thread in namespace.threads.where(any_email='[email protected]').items():
print thread.subject

# List threads in order of most recently received message (excludes sent messages)
for thread in namespace.threads.where(sort='received_recent_date'):
print thread.subject
```


Expand Down
1 change: 1 addition & 0 deletions nylas/client/restful_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def messages(self):
class Thread(NylasAPIObject):
attrs = ["draft_ids", "id", "message_ids", "namespace_id", "object",
"participants", "snippet", "subject", "subject_date", "tags",
"last_message_timestamp", "first_message_timestamp",
"unread", "starred", "version", "_folders", "_labels"]
collection_name = 'threads'

Expand Down

0 comments on commit da84d32

Please sign in to comment.