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

Add edit history support (quip.py) #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions python/quip.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,21 @@ def get_teams(self):
"""Returns the teams for the user corresponding to our access token."""
return self._fetch_json("teams/current")

def get_messages(self, thread_id, max_created_usec=None, count=None):
def get_messages(self, thread_id, max_created_usec=None, count=None, message_type=None):
"""Returns the most recent messages for the given thread.

To page through the messages, use max_created_usec, which is the
sort order for the returned messages.

count should be an integer indicating the number of messages you
want returned. The maximum is 100.

set message_type to "edit" to retrieve document edit messages. Regular
messages are returned by default.
"""
return self._fetch_json(
"messages/" + thread_id, max_created_usec=max_created_usec,
count=count)
count=count, message_type=message_type)

def new_message(self, thread_id, content=None, **kwargs):
"""Sends a message on the given thread.
Expand Down