Thought I would go ahead and create a separate issue to discuss and model API calls for this particular moment viewer
I break it into parts based on what we agreed weeks ago. From here, I'm expecting to set up the routes for front-end to make API call and request data.
The preview image can be updated as we go along.
II. Part 1 - Transcripts
We decided to have a separate end-point for transcript where the request takes 3 arguments: momentID, startTime and endTime. API server will respond with all transcripts of all channels fall within this time interval in (hopefully) chronological order
Expected messages return for each api call: "Success", "Error connecting to database", "Incorrect metadata. Please try again", "At least one param is empty or mising. Please try again".
Im hoping that the order of the objects within the array will be the order of the speaker transcript being appended to the chat box as well. Though, this question should be something I have to discuss with the DB module
Sample API call and response:
Questions??
III. Part 2 - Moment Player
Simply the front end provides momentID. API server will respond with data as described below
Expected messages return for each api call: "Success", "Error connecting to database", "Empty momentID. Please try again", "Incorrect momentID. Please try again".
Sample API call and response:
Questions?
IV. Part 3 - Body
Not sure what kind of data fron-end will need, or actually what kinda of data is available to a given moment beside transcripts. So I'm just going to leave it here for now.
I. Intro
Thought I would go ahead and create a separate issue to discuss and model API calls for this particular moment viewer
I break it into parts based on what we agreed weeks ago. From here, I'm expecting to set up the routes for front-end to make API call and request data.
The preview image can be updated as we go along.
II. Part 1 - Transcripts
We decided to have a separate end-point for transcript where the request takes 3 arguments: momentID, startTime and endTime. API server will respond with all transcripts of all channels fall within this time interval in (hopefully) chronological order
Front-end
API server
Return all transcripts of all channels in chronological order, with following data
Expected messages return for each api call: "Success", "Error connecting to database", "Incorrect metadata. Please try again", "At least one param is empty or mising. Please try again".
Im hoping that the order of the objects within the array will be the order of the speaker transcript being appended to the chat box as well. Though, this question should be something I have to discuss with the DB module
Sample API call and response:
III. Part 2 - Moment Player
Simply the front end provides momentID. API server will respond with data as described below
Front-end
API Server
Expected messages return for each api call: "Success", "Error connecting to database", "Empty momentID. Please try again", "Incorrect momentID. Please try again".
Sample API call and response:
IV. Part 3 - Body
Not sure what kind of data fron-end will need, or actually what kinda of data is available to a given moment beside transcripts. So I'm just going to leave it here for now.