Stingray Photos is an api service, written on Django. It is used for uploading pictures in app for TV platform called Stingray.
Use the package manager pip3 to install. Python version should be at least 3.8.
$ pip3 install -r requirements.txt
$ python3 manage.py runserver 0:8000
$ python3 manage.py test
Returns random code
-
URL
/get_key
-
Method:
GET
-
Success Response:
- Code: 200
Content:{ key : "8537" }
- Code: 200
Sign in with code, given by app
View and select files to upload
-
URL
/upload/:key
-
Method:
GET
-
URL Params
Required:
key=[integer]
-
Success Response:
Upload selected files
-
URL
/upload/:key
-
Method:
POST
-
URL Params
Required:
key=[integer]
-
Success Response:
- Code: 200
- Code: 200
-
Error Response:
-
Code: 400 Bad Request
Content:Expected key in request
-
Code: 422 UNPROCESSABLE_ENTITY
Content:Uploading file size limit exceeded. Try to compress your image
-
Upload selected files
-
URL
/upload/
-
Method:
PUT
|DELETE
-
Error Response:
- Code: 405 METHOD_NOT_ALLOWED
Content:GET or POST request expected
- Code: 405 METHOD_NOT_ALLOWED
Get uploaded images by your code. Returns one of the uploaded images. If multiple images where uploaded, they will be returned following round-robin strategy.