Changeset View
Changeset View
Standalone View
Standalone View
swh/web/api/views/content.py
Show First 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | def api_content_ctags(request, q): | ||||
) | ) | ||||
@api_route( | @api_route( | ||||
r"/content/(?P<q>[0-9a-z_:]*[0-9a-f]+)/raw/", | r"/content/(?P<q>[0-9a-z_:]*[0-9a-f]+)/raw/", | ||||
"api-1-content-raw", | "api-1-content-raw", | ||||
checksum_args=["q"], | checksum_args=["q"], | ||||
) | ) | ||||
@api_doc("/content/raw/", handle_response=True) | @api_doc("/content/raw/") | ||||
def api_content_raw(request, q): | def api_content_raw(request, q): | ||||
""" | """ | ||||
.. http:get:: /api/1/content/[(hash_type):](hash)/raw/ | .. http:get:: /api/1/content/[(hash_type):](hash)/raw/ | ||||
Get the raw content of a content object (aka a "blob"), as a byte sequence. | Get the raw content of a content object (aka a "blob"), as a byte sequence. | ||||
:param string hash_type: optional parameter specifying which hashing algorithm | :param string hash_type: optional parameter specifying which hashing algorithm | ||||
has been used to compute the content checksum. It can be either ``sha1``, | has been used to compute the content checksum. It can be either ``sha1``, | ||||
▲ Show 20 Lines • Show All 212 Lines • Show Last 20 Lines |