Skip to content

Commit

Permalink
VT-8411
Browse files Browse the repository at this point in the history
  • Loading branch information
ajay-plivo committed Nov 12, 2024
1 parent f24cb15 commit 4c59a75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## [7.55.0](https://github.com/plivo/plivo-go/tree/v7.55.0) (2024-11-05)
## [7.55.0](https://github.com/plivo/plivo-go/tree/v7.55.0) (2024-11-12)
**Feature - CreateRecordingTranscription and DeleteRecordingTranscription feature added**
- This API would help in creating transcription for recorded calls for which transcription is not available and delete API to delete.
- Support for the `transcription_url`, `transcript` and `record_participant_track` parameter in MPC Add Participant.
Expand Down
8 changes: 7 additions & 1 deletion transcription.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ type GetRecordingTranscriptionRequest struct {
TranscriptionType string `json:"type"`
}

type CallBackUrlStruct struct {
CallbackUrl string `json:"callback_url,omitempty" url:"callback_url,omitempty"`
}

type RecordingTranscriptionRequest struct {
RecordingID string `json:"recording_id"`
CallbackUrl string `json:"callback_url,omitempty" url:"callback_url,omitempty"`
}

type DeleteRecordingTranscriptionRequest struct {
Expand All @@ -32,7 +37,8 @@ type GetRecordingTranscriptionResponse struct {
}

func (service *TranscriptionService) CreateRecordingTranscription(request RecordingTranscriptionRequest) (response map[string]interface{}, err error) {
req, err := service.client.NewRequest("POST", nil, "Transcription/%s", request.RecordingID)
param := CallBackUrlStruct{CallbackUrl: request.CallbackUrl}
req, err := service.client.NewRequest("POST", param, "Transcription/%s", request.RecordingID)
if err != nil {
return
}
Expand Down

0 comments on commit 4c59a75

Please sign in to comment.