Changeset View
Changeset View
Standalone View
Standalone View
swh/web/api/views/content.py
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | @api_route(r'/content/(?P<q>[0-9a-z_:]*[0-9a-f]+)/language/', | ||||
'api-content-language', checksum_args=['q']) | 'api-content-language', checksum_args=['q']) | ||||
@api_doc('/content/language/') | @api_doc('/content/language/') | ||||
def api_content_language(request, q): | def api_content_language(request, q): | ||||
""" | """ | ||||
.. http:get:: /api/1/content/[(hash_type):](hash)/language/ | .. http:get:: /api/1/content/[(hash_type):](hash)/language/ | ||||
Get information about the programming language used in a content object. | Get information about the programming language used in a content object. | ||||
Note: this endpoint currently returns no data. | |||||
:param string hash_type: optional parameter specifying which hashing algorithm has been used | :param string hash_type: optional parameter specifying which hashing algorithm has been used | ||||
to compute the content checksum. It can be either ``sha1``, ``sha1_git``, ``sha256`` | to compute the content checksum. It can be either ``sha1``, ``sha1_git``, ``sha256`` | ||||
or ``blake2s256``. If that parameter is not provided, it is assumed that the | or ``blake2s256``. If that parameter is not provided, it is assumed that the | ||||
hashing algorithm used is ``sha1``. | hashing algorithm used is ``sha1``. | ||||
:param string hash: hexadecimal representation of the checksum value computed with | :param string hash: hexadecimal representation of the checksum value computed with | ||||
the specified hashing algorithm. | the specified hashing algorithm. | ||||
:>json object content_url: link to :http:get:`/api/1/content/[(hash_type):](hash)/` for | :>json object content_url: link to :http:get:`/api/1/content/[(hash_type):](hash)/` for | ||||
▲ Show 20 Lines • Show All 299 Lines • Show Last 20 Lines |