Skip to content

Commit

Permalink
31 guardian only gets 19 results (#32)
Browse files Browse the repository at this point in the history
* guardian command is paginated but was not using pagination in the cli, paginated results could also only output json, fixed

* bump version in __init__.py
  • Loading branch information
eacmen authored Aug 7, 2020
1 parent d3d8f20 commit 7a4e122
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion centrifuge_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.6.2'
__version__ = '0.6.3'
4 changes: 2 additions & 2 deletions centrifuge_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def do_GET(self, path, query_list=None, paginated=False):
if total >= count or (self.limit > -1 and total >= self.limit):
break

return json.dumps({'count': total, 'results': results}, indent=2, sort_keys=True)
data = {'count': total, 'results': results}

else:
url = self.build_url(path, query_list, self.limit)
Expand Down Expand Up @@ -311,7 +311,7 @@ def passhash(cli):
@pass_cli
def guardian(cli):
result = cli.do_GET(f'/api/report/{cli.ufid}/analyzer-results', query_list=['affected=true&sorters[0][field]=name',
'sorters[0][dir]=asc'])
'sorters[0][dir]=asc'], paginated=True)
cli.echo(result)
return(result)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "centrifuge-cli"
version = "0.6.2"
version = "0.6.3"
description = "A command line utility for interacting with the Centrifuge Firmware Analysis Platform's REST API."
authors = ["Peter Eacmen <[email protected]>"]
readme = 'README.rst'
Expand Down

0 comments on commit 7a4e122

Please sign in to comment.