Skip to content
Snippets Groups Projects
Commit 694f1c1b authored by Erik Johnston's avatar Erik Johnston
Browse files

Fix up comments

parent e21370ba
No related branches found
No related tags found
No related merge requests found
...@@ -136,8 +136,8 @@ def respond_with_responder(request, responder, media_type, file_size, upload_nam ...@@ -136,8 +136,8 @@ def respond_with_responder(request, responder, media_type, file_size, upload_nam
request (twisted.web.http.Request) request (twisted.web.http.Request)
responder (Responder|None) responder (Responder|None)
media_type (str): The media/content type. media_type (str): The media/content type.
file_size (int): Size in bytes of the media. If not known it should be None file_size (int|None): Size in bytes of the media. If not known it should be None
upload_name (str): The name of the requested file, if any. upload_name (str|None): The name of the requested file, if any.
""" """
if not responder: if not responder:
respond_404(request) respond_404(request)
......
...@@ -161,11 +161,12 @@ class MediaRepository(object): ...@@ -161,11 +161,12 @@ class MediaRepository(object):
Args: Args:
request(twisted.web.http.Request) request(twisted.web.http.Request)
media_id (str) media_id (str): The media ID of the content. (This is the same as
the file_id for local content.)
name (str|None): Optional name that, if specified, will be used as name (str|None): Optional name that, if specified, will be used as
the filename in the Content-Disposition header of the response. the filename in the Content-Disposition header of the response.
Retruns: Returns:
Deferred: Resolves once a response has successfully been written Deferred: Resolves once a response has successfully been written
to request to request
""" """
...@@ -196,11 +197,12 @@ class MediaRepository(object): ...@@ -196,11 +197,12 @@ class MediaRepository(object):
Args: Args:
request(twisted.web.http.Request) request(twisted.web.http.Request)
server_name (str): Remote server_name where the media originated. server_name (str): Remote server_name where the media originated.
media_id (str) media_id (str): The media ID of the content (as defined by the
remote server).
name (str|None): Optional name that, if specified, will be used as name (str|None): Optional name that, if specified, will be used as
the filename in the Content-Disposition header of the response. the filename in the Content-Disposition header of the response.
Retruns: Returns:
Deferred: Resolves once a response has successfully been written Deferred: Resolves once a response has successfully been written
to request to request
""" """
...@@ -230,6 +232,11 @@ class MediaRepository(object): ...@@ -230,6 +232,11 @@ class MediaRepository(object):
"""Looks for media in local cache, if not there then attempt to """Looks for media in local cache, if not there then attempt to
download from remote server. download from remote server.
Args:
server_name (str): Remote server_name where the media originated.
media_id (str): The media ID of the content (as defined by the
remote server).
Returns: Returns:
Deferred[(Responder, media_info)] Deferred[(Responder, media_info)]
""" """
...@@ -272,7 +279,9 @@ class MediaRepository(object): ...@@ -272,7 +279,9 @@ class MediaRepository(object):
Args: Args:
server_name (str): Originating server server_name (str): Originating server
media_id (str) media_id (str): The media ID of the content (as defined by the
remote server). This is different than the file_id, which is
locally generated.
file_id (str): Local file ID file_id (str): Local file ID
Returns: Returns:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment