Fix bugs, and document

This commit is contained in:
rubenwardy 2020-06-05 04:46:46 +01:00
parent 064eb9df04
commit 66885fedaa
2 changed files with 4 additions and 2 deletions

View File

@ -58,10 +58,10 @@ def package(package):
def package_dependencies(package):
ret = []
include_optional = request.args.get("include_optional", True)
only_hard = request.args.get("only_hard", True)
for dep in package.dependencies:
if not include_optional and dep.option:
if only_hard and dep.optional:
continue
name = None

View File

@ -25,6 +25,8 @@ Tokens can be attained by visiting [Profile > "API Tokens"](/user/tokens/).
* GET `/api/packages/` - See [Package Queries](#package-queries)
* GET `/api/scores/` - See [Package Queries](#package-queries)
* GET `/api/packages/<username>/<name>/`
* GET `/api/packages/<username>/<name>/`
* If query argument `only_hard` is present, only hard deps will be returned.
### Releases