Skip to content

Commit

Permalink
VT-8411:record_participant_track_added
Browse files Browse the repository at this point in the history
  • Loading branch information
ajay-plivo committed Nov 8, 2024
1 parent fbaf8de commit f24cb15
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## [7.55.0](https://github.com/plivo/plivo-go/tree/v7.55.0) (2024-11-05)
**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` and `transcript` parameter in MPC Add Participant.
- Support for the `transcription_url`, `transcript` and `record_participant_track` parameter in MPC Add Participant.

## [7.54.0](https://github.com/plivo/plivo-go/tree/v7.54.0) (2024-10-30)
**Feature - GetRecordingTranscription feature to get transcription**
Expand Down
4 changes: 4 additions & 0 deletions fixtures/deleteRecordingTranscription.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"api_id": "47ab0f0d-a7db-4f56-8200-6555cd3194e8",
"message": "request accepted"
}
1 change: 1 addition & 0 deletions multipartycall.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ type MultiPartyCallAddParticipantParams struct {
SendOnPreanswer bool `json:"send_on_preanswer,omitempty" url:"send_on_preanswer,omitempty"`
TranscriptionUrl string `json:"transcription_url,omitempty" url:"transcription_url,omitempty"`
Transcript bool `json:"transcript,omitempty" url:"transcript,omitempty"`
RecordParticipantTrack bool `json:"record_participant_track" url:"record_participant_track"`
}

type MultiPartyCallListParams struct {
Expand Down
2 changes: 1 addition & 1 deletion transcription.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ func (service *TranscriptionService) DeleteRecordingTranscription(request Delete
return
}
response = make(map[string]interface{})
err = service.client.ExecuteRequest(req, response, isVoiceRequest())
err = service.client.ExecuteRequest(req, &response, isVoiceRequest())
return
}
22 changes: 22 additions & 0 deletions transcription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,25 @@ func TestTranscriptionService_CreateRecordingTranscription(t *testing.T) {
}
client.httpClient = cl
}

func TestTranscriptionService_DeleteRecordingTranscription(t *testing.T) {
expectResponse("deleteRecordingTranscription.json", 202)
var response map[string]interface{}
if err := json.Unmarshal([]byte(expectedResponse), &response); err != nil {
t.Fatalf("failed to unmarshal expected response: %v", err)
}
if _, err := client.Transcription.DeleteRecordingTranscription(DeleteRecordingTranscriptionRequest{
TranscriptionID: "e12d05fe-6979-485c-83dc-9276114dba3b",
}); err != nil {
panic(err)
}

cl := client.httpClient
client.httpClient = nil
_, err := client.Transcription.DeleteRecordingTranscription(DeleteRecordingTranscriptionRequest{})
if err == nil {
client.httpClient = cl
panic(errors.New("error expected"))
}
client.httpClient = cl
}

0 comments on commit f24cb15

Please sign in to comment.