diff options
author | Blake DeMarcy <ofunknowndescent@gmail.com> | 2017-04-29 20:48:38 -0500 |
---|---|---|
committer | Blake DeMarcy <ofunknowndescent@gmail.com> | 2017-04-29 20:48:38 -0500 |
commit | e673706ae52460507040e83a3428185eb53996bf (patch) | |
tree | e8c32c58dfd51dd6aebb7a3190e9cfb642d8ffe9 /clients | |
parent | d5ae142a7f9dc382c06dca424973f4345b181c5b (diff) | |
download | bbj-e673706ae52460507040e83a3428185eb53996bf.tar.gz |
add option to include ops with index (or only ops with gets)
Diffstat (limited to 'clients')
-rw-r--r-- | clients/network_client.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clients/network_client.py b/clients/network_client.py index 5ce7975..8278ae4 100644 --- a/clients/network_client.py +++ b/clients/network_client.py @@ -424,7 +424,7 @@ class BBJ(object): return response["data"] - def thread_index(self): + def thread_index(self, include_op=False): """ Returns a tuple where [0] is a list of all threads ordered by most recently interacted, and [1] is a usermap object. @@ -435,11 +435,11 @@ class BBJ(object): author_id = thread["author"] print(usermap[author_id]["user_name"]) """ - response = self("thread_index") + response = self("thread_index", include_op=include_op) return response["data"], response["usermap"] - def thread_load(self, thread_id, format=None): + def thread_load(self, thread_id, format=None, op_only=False): """ Returns a tuple where [0] is a thread object and [1] is a usermap object. @@ -450,7 +450,8 @@ class BBJ(object): print(usermap[author_id]["user_name"]) print(message["body"]) """ - response = self("thread_load", format=format, thread_id=thread_id) + response = self("thread_load", + format=format, thread_id=thread_id, op_only=op_only) return response["data"], response["usermap"] |