Skip to content

Commit

Permalink
Use Markdown for properly rendering API description
Browse files Browse the repository at this point in the history
  • Loading branch information
keshav-space committed Nov 7, 2023
1 parent 71c0aba commit 4a5c54e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 30 deletions.
67 changes: 37 additions & 30 deletions packagedb/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,27 +109,30 @@ def filter_by_checksums(self, request, *args, **kwargs):
against the packagedb.
Supported checksum fields are:
- md5
- sha1
Example:
{
"sha1": [
"b55fd82f80cc1bd0bdabf9c6e3153788d35d7911",
"27afff2610b5a94274a2311f8b15e514446b0e76
]
}
{
"sha1": [
"b55fd82f80cc1bd0bdabf9c6e3153788d35d7911",
"27afff2610b5a94274a2311f8b15e514446b0e76
]
}
Multiple checksums algorithms can be passed together:
{
"sha1": [
"b55fd82f80cc1bd0bdabf9c6e3153788d35d7911",
"27afff2610b5a94274a2311f8b15e514446b0e76
],
"md5": [
"e927df60b093456d4e611ae235c1aa5b"
]
}
{
"sha1": [
"b55fd82f80cc1bd0bdabf9c6e3153788d35d7911",
"27afff2610b5a94274a2311f8b15e514446b0e76
],
"md5": [
"e927df60b093456d4e611ae235c1aa5b"
]
}
This will return Resources whose sha1 or md5 matches those values.
"""
Expand Down Expand Up @@ -474,6 +477,7 @@ def reindex_packages(self, request, *args, **kwargs):
package set as the packages from `package_urls` will be reindexed.
Then return a mapping containing:
- requeued_packages_count
- The number of package urls placed on the queue.
- requeued_packages
Expand Down Expand Up @@ -526,29 +530,32 @@ def filter_by_checksums(self, request, *args, **kwargs):
against the packagedb.
Supported checksum fields are:
- md5
- sha1
- sha256
- sha512
Example:
{
"sha1": [
"b55fd82f80cc1bd0bdabf9c6e3153788d35d7911",
"27afff2610b5a94274a2311f8b15e514446b0e76
]
}
{
"sha1": [
"b55fd82f80cc1bd0bdabf9c6e3153788d35d7911",
"27afff2610b5a94274a2311f8b15e514446b0e76
]
}
Multiple checksums algorithms can be passed together:
{
"sha1": [
"b55fd82f80cc1bd0bdabf9c6e3153788d35d7911",
"27afff2610b5a94274a2311f8b15e514446b0e76
],
"md5": [
"e927df60b093456d4e611ae235c1aa5b"
]
}
{
"sha1": [
"b55fd82f80cc1bd0bdabf9c6e3153788d35d7911",
"27afff2610b5a94274a2311f8b15e514446b0e76
],
"md5": [
"e927df60b093456d4e611ae235c1aa5b"
]
}
This will return Packages whose sha1 or md5 matches those values.
"""
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ install_requires =
gunicorn == 20.1.0
ftputil == 5.0.4
jawa == 2.2.0
markdown == 3.5.1
natsort == 8.2.0
packageurl-python == 0.11.2
psycopg2-binary == 2.9.3
Expand Down

0 comments on commit 4a5c54e

Please sign in to comment.