youtube-dl-fe/plan

37 lines
1.6 KiB
Plaintext

pup.cloud Download
components
- web frontend (Flask)
- message queue + k/v store (redis)
- task processor(s) (Flask-RQ2 workers)
web frontend:
? python+flask+rq+openid or saml
? perl+dancer+minion+openid or saml
public routes:
- GET / -> 302 pup.cloud Identify
- POST /callback/auth -> finish authorising user session
private routes:
- GET / -> 200 index
- GET /add -> 200 add_page
- GET /.rq -> rq-dashboard
api routes:
- GET /api/v1/queue -> 200 queue_list (application/json) (list queue)
- PUT /api/v1/queue -> 200 queue_list (application/json) (add item to queue, return ID)
- GET /api/v1/queue/{:id} -> 200 item_info (application/json) (list information about a specific job)
- DELETE /api/v1/queue/{:id} -> 200 success_deleted (application/json) (delete a specific task)
- GET /api/v1/queue/state -> 200 queue_state (application/json) (current state of the application)
- PUT /api/v1/queue/state -> 200 transition_state (application/json) (set a new state for the application)
- GET /api/v1/id/logout -> 302 pup.cloud Identify SLO
- GET /api/v1/id/user -> 200 userdata (application/json) (list basic user information)
documentation references:
rq: https://github.com/rq/rq
flask example project: https://realpython.com/flask-by-example-part-1-project-setup/
flask mega-tutorial (one chapter goes into flask-rq2 usage): https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
flask-rq2 usage and reference: https://flask-rq2.readthedocs.io/en/latest/
youtube-dl emedded usage: https://github.com/ytdl-org/youtube-dl/blob/master/README.md#embedding-youtube-dl