diff --git a/pagure/api/fork.py b/pagure/api/fork.py index fc70e31..97d2ad3 100644 --- a/pagure/api/fork.py +++ b/pagure/api/fork.py @@ -51,8 +51,11 @@ def api_pull_request_views(repo, username=None): :: { - "assignee": null, - "author": null, + "args": { + "assignee": null, + "author": null, + "status": true + }, "requests": [ { "assignee": null, @@ -109,8 +112,7 @@ def api_pull_request_views(repo, username=None): "name": "pingou" } } - ], - "status": true + ] } """ @@ -147,9 +149,11 @@ def api_pull_request_views(repo, username=None): jsonout = flask.jsonify({ 'requests': [request.to_json(public=True) for request in requests], - 'status': status, - 'assignee': assignee, - 'author': author, + 'args': { + 'status': status, + 'assignee': assignee, + 'author': author, + } }) return jsonout diff --git a/pagure/api/issue.py b/pagure/api/issue.py index 5b96b39..1e3e5ee 100644 --- a/pagure/api/issue.py +++ b/pagure/api/issue.py @@ -158,8 +158,12 @@ def api_view_issues(repo, username=None): :: { - "assignee": null, - "author": null, + "args": { + "assignee": null, + "author": null, + "status": null, + "tags": [] + }, "issues": [ { "assignee": null, @@ -206,16 +210,20 @@ def api_view_issues(repo, username=None): "name": "pingou" } } - ], - "status": null, - "tags": [] + ] } Second example: { - "assignee": null, - "author": null, + "args": { + "assignee": null, + "author": null, + "status": "Closed", + "tags": [ + "0.1" + ] + }, "issues": [ { "assignee": null, @@ -236,10 +244,6 @@ def api_view_issues(repo, username=None): "name": "pingou" } } - ], - "status": "Closed", - "tags": [ - "0.1" ] } @@ -298,10 +302,12 @@ def api_view_issues(repo, username=None): jsonout = flask.jsonify({ 'issues': [issue.to_json(public=True) for issue in issues], - 'status': status, - 'tags': tags, - 'assignee': assignee, - 'author': author, + 'args': { + 'status': status, + 'tags': tags, + 'assignee': assignee, + 'author': author, + } }) return jsonout