Optional calls
Get Transcript by Agenda Item Id
Use this API to fetch transcript textsegments between a start and an end id. The response includes speaker metadata and timestamps for each textsegment.
export const GET_TRANSCRIPT_BY_AGENDA_ITEM_ID = `
fragment transcriptDetails on TranscriptSegment{
text
startTime
endTime
}
fragment apiSpeakerDetails on ApiSpeakerType{
slug
gender
givenName
familyName
preTitle
postTitle
posShort
posLong
systemId
}
query GetTranscriptByAgendaItemId($protocolSlug:String!, $agendaItemId:String!){
getTranscriptByAgendaItemId(protocolSlug:$protocolSlug, agendaItemId:$agendaItemId){
id
speakerObj{
...apiSpeakerDetails
}
textJson{
...transcriptDetails
}
pos
}
}
Usage notes:
protocolSlug(required): Identifier of the protocol. Get this from the core API calls.agendaItemId(required): ID of the agenda item where you want to see the connected textsegments.
JavaScript example
import axios from "axios";
async function getTranscriptByAgendaItemId(agendaItemId) {
const dataObj = {
query: GET_TRANSCRIPT_BY_AGENDA_ITEM_ID,
variables: { agendaItemId },
};
try {
const response = await axios({
method: "post",
url: process.env.VUE_APP_GRAPHQL_API,
data: JSON.stringify(dataObj),
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.VUE_APP_API_KEY,
},
});
return response.data.data.getTranscriptByAgendaItemId;
} catch (error) {
console.error(error);
throw error;
}
} Have questions?
Still have questions? Talk to support.