thanawat-toktik / toktik-backend

Backend
MIT License
0 stars 0 forks source link

Video related api #11

Open thanawinboon opened 1 year ago

thanawinboon commented 1 year ago

For frontend

From other services [Processing Service]

Not needed right now

thanawinboon commented 1 year ago

List Video (Feed) URL: api/video/feed Method: GET Payload: - Response:

[
   {
      id: int,
      uploader: User,
      upload_timestamp: DateTime,
      title: String,
      caption: String,
      views: int,
   }
]

Notes:

thanawinboon commented 1 year ago

List Video (My video) URL: api/video/my-video Method: GET Payload: (uses token to identify user) Response:

[
   {
      id: int,
      uploader: User,
      upload_timestamp: DateTime,
      title: String,
      caption: String,
      views: int,
      isProcessed: bool,
   },
   [...]
]

Notes:

thanawinboon commented 1 year ago

Get URL URL: api/video/get-url Method: GET Payload:

{
      video_ids: [int]
      bucket: string, (raw / converted / chunked / thumbnail)
}

Response:

{
      presigned_url: string,
}

Notes:

thanawinboon commented 1 year ago

Increase view URL: api/video/view?id=video_id Method: PATCH Payload: - Response:

{
   id: int,
   view: int,
},

Notes: