Skip to content

Commit 79810de

Browse files
authored
Merge pull request #53 from Bandwidth/DX-2611
DX-2611 Fix GetDownloadCallRecordingAsync Response Type Bug
2 parents 453786b + f5e5171 commit 79810de

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Bandwidth.Standard/Bandwidth.Standard.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PropertyGroup>
1010
<TargetFramework>netstandard1.3</TargetFramework>
1111
<AssemblyName>Bandwidth.Sdk</AssemblyName>
12-
<Version>1.0.0.0</Version>
12+
<Version>2.0.0.0</Version>
1313
<Authors></Authors>
1414
<Owners></Owners>
1515
<Product>Bandwidth.Standard</Product>

Bandwidth.Standard/Messaging/Controllers/APIController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,4 +712,4 @@ public async Task DeleteMediaAsync(
712712
return apiResponse;
713713
}
714714
}
715-
}
715+
}

Bandwidth.Standard/Voice/Controllers/APIController.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -817,12 +817,12 @@ public async Task DeleteRecordingAsync(
817817
/// <param name="callId">Required parameter: Example: .</param>
818818
/// <param name="recordingId">Required parameter: Example: .</param>
819819
/// <returns>Returns the ApiResponse of dynamic response from the API call.</returns>
820-
public ApiResponse<dynamic> GetDownloadCallRecording(
820+
public ApiResponse<Stream> GetDownloadCallRecording(
821821
string accountId,
822822
string callId,
823823
string recordingId)
824824
{
825-
Task<ApiResponse<dynamic>> t = this.GetDownloadCallRecordingAsync(accountId, callId, recordingId);
825+
Task<ApiResponse<Stream>> t = this.GetDownloadCallRecordingAsync(accountId, callId, recordingId);
826826
ApiHelper.RunTaskSynchronously(t);
827827
return t.Result;
828828
}
@@ -835,7 +835,7 @@ public ApiResponse<dynamic> GetDownloadCallRecording(
835835
/// <param name="recordingId">Required parameter: Example: .</param>
836836
/// <param name="cancellationToken"> cancellationToken. </param>
837837
/// <returns>Returns the ApiResponse of dynamic response from the API call.</returns>
838-
public async Task<ApiResponse<dynamic>> GetDownloadCallRecordingAsync(
838+
public async Task<ApiResponse<Stream>> GetDownloadCallRecordingAsync(
839839
string accountId,
840840
string callId,
841841
string recordingId,
@@ -919,8 +919,8 @@ public async Task<ApiResponse<dynamic>> GetDownloadCallRecordingAsync(
919919
// handle errors defined at the API level.
920920
this.ValidateResponse(response, context);
921921

922-
var result = ApiHelper.JsonDeserialize<dynamic>(response.Body);
923-
ApiResponse<dynamic> apiResponse = new ApiResponse<dynamic>(response.StatusCode, response.Headers, result);
922+
var result = response.RawBody;
923+
ApiResponse<Stream> apiResponse = new ApiResponse<Stream>(response.StatusCode, response.Headers, result);
924924
return apiResponse;
925925
}
926926

@@ -2420,4 +2420,4 @@ public async Task<ApiResponse<dynamic>> GetDownloadConferenceRecordingAsync(
24202420
return apiResponse;
24212421
}
24222422
}
2423-
}
2423+
}

0 commit comments

Comments
 (0)