Add resources for fetching blobs & blob info
Review Request #8923 — Created May 5, 2017 and submitted
This patch adds two new resources:
GetBlobInfo
andGetBlobContent
.
The former returns whether or not a blob with the given ID exists and
the latter returns the content of a blob with the given ID as base64-
encoded data.
Retrieved a file via the API.
Verified invalid blob IDs, etc. resulted in a 404.
- Change Summary:
-
Judicious use of
final
.
Checks run (3 succeeded)
JSHint
passed.
PEP8 Style Checker
passed.
Pyflakes
passed.
- Summary:
-
Add a resource for fetching blobsAdd resources for fetching blobs & blob info
- Description:
-
~ The
GetFileContent
resource, available via~ a/projects/<projectName>/files/<blobId>/content
, returns the content~ of a blob with the given ID as base64 encoded data. If the given ID ~ does not correspond to an object in the index, or the object it refers ~ This patch adds two new resources:
GetBlobInfo
andGetBlobContent
.~ The former returns whether or not a blob with the given ID exists and ~ the latter returns the content of a blob with the given ID as base64- ~ encoded data. - to is not a blob, it will return a 404 Not Found. - Testing Done:
-
~ Retrieved a file via the API.
~ Retrieved a file via the API.
+ Verified invalid blob IDs, etc. resulted in a 404. - Diff:
-
Revision 4 (+268)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
- Change Summary:
-
Formatting & logging
- Diff:
-
Revision 5 (+286)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
- Change Summary:
-
final final final final final
- Diff:
-
Revision 6 (+286)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.