classtranscribe / classtranscribe/WebAPI

Request for a new API: Update captions by transcription ID

Open
#134 5 comments 0 reactions 1 assignee Claimed by @aiB0ld View on GitHub
Dominant language
C#
Stars
16
Forks
4
PR merge metrics
No merged PRs in 30d

Description

The current caption updating API in `/api/Captions` can only update a single caption line with one API call, which is insufficient for frontend issue [#103](https://github.com/classtranscribe/FrontEnd/issues/103) for two reasons.

1. Bulk editing of captions needs to update multiple caption lines (text, start time and end time) by transcription ID, with a single API call.
2. User should be able to upload new caption document by transcription ID.

Therefore, it would be great to have a new API that can do PUT requests by transcription ID, to update/create captions efficiently.

Specification:
- The API should take a transcription ID, an index of caption array in the transcription array (for instance, currently, index 0 is for English caption array in a transcription array), and an array of caption object. In the frontend, the form of the caption objects in the caption array should be:
`
{
begin: "00:00:00.0400000",
end: "00:00:03.2400000",
index: 1,
id: "4d5a6020-2fb1-4dc3-93f8-4845bbc2c131",
text: "Reflecting on what makes an activity or hobby or what"
}
`

- Frontend will provide a complete array of caption object, including the objects that are not modified. Backend should modify the captions according to the input. For captions that are deleted, the index should be -1, and the backend should handle the change of index accordingly. For new insertion, an id for the caption line should be generated.

More spec will be added...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.