diff --git a/python/quip.py b/python/quip.py index b39eafe..5ab7509 100644 --- a/python/quip.py +++ b/python/quip.py @@ -272,6 +272,22 @@ def add_thread_members(self, thread_id, member_ids): "member_ids": ",".join(member_ids), }) + def add_thread_members_by_access_level(self, thread_id, full=None, + edit=None, comment=None, + view=None): + """Adds the given folder or userIDs to the given thread.""" + return self._fetch_json("threads/add-members", post_data={ + "thread_id": thread_id, + "member_ids_by_access_level": json.dumps([ + {"access_level": 0, + "member_ids": full or []}, + {"access_level": 1, + "member_ids": edit or []}, + {"access_level": 2, + "member_ids": comment or []}, + {"access_level": 3, + "member_ids": view or []}])}) + def delete_thread(self, thread_id): """Deletes the thread with the given thread id or secret""" return self._fetch_json("threads/delete", post_data={