mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 14:32:25 +01:00
Fix bugs, and document
This commit is contained in:
parent
064eb9df04
commit
66885fedaa
@ -58,10 +58,10 @@ def package(package):
|
|||||||
def package_dependencies(package):
|
def package_dependencies(package):
|
||||||
ret = []
|
ret = []
|
||||||
|
|
||||||
include_optional = request.args.get("include_optional", True)
|
only_hard = request.args.get("only_hard", True)
|
||||||
|
|
||||||
for dep in package.dependencies:
|
for dep in package.dependencies:
|
||||||
if not include_optional and dep.option:
|
if only_hard and dep.optional:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
name = None
|
name = None
|
||||||
|
@ -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/packages/` - See [Package Queries](#package-queries)
|
||||||
* GET `/api/scores/` - See [Package Queries](#package-queries)
|
* GET `/api/scores/` - See [Package Queries](#package-queries)
|
||||||
* GET `/api/packages/<username>/<name>/`
|
* GET `/api/packages/<username>/<name>/`
|
||||||
|
* GET `/api/packages/<username>/<name>/`
|
||||||
|
* If query argument `only_hard` is present, only hard deps will be returned.
|
||||||
|
|
||||||
### Releases
|
### Releases
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user