Skip to content

Commit

Permalink
fixed comment requests returning only 25 responses
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpodolak committed Feb 17, 2021
1 parent bbd3bd0 commit 6106ecd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.2 (2021/02/11)

- fixed comments returning 25 by default

## 1.0.1 (2021/02/16)

- limit error in `trim` hot fix
Expand Down
3 changes: 3 additions & 0 deletions pmaw/Request.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def save_resp(self, results):
def _add_nec_args(self, payload):
"""Adds arguments to the payload as necessary."""

if 'ids' not in payload:
payload['size'] = self.max_results_per_request

if 'sort' not in payload:
payload['sort'] = 'desc'
elif payload.get('sort') != 'desc':
Expand Down
2 changes: 1 addition & 1 deletion pmaw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""
PMAW: Pushshift Multithread API Wrapper
"""
__version__ = '1.0.1'
__version__ = '1.0.2'
__author__ = 'Matthew Podolak'
__license__ = 'MIT'

Expand Down

0 comments on commit 6106ecd

Please sign in to comment.