Jericho / ZoomNet

.NET client library for the Zoom.us REST API v2
MIT License
68 stars 48 forks source link

Add missing RecordingContentType enum values #246

Closed BrianWhiting closed 1 year ago

BrianWhiting commented 1 year ago

I am currently getting the following exception when trying to call the client.CloudRecordings.GetRecordingsForUserAsync method due to one of the recording files having a recording type that is not listed in the RecordingContentType enum.

Exception Text: There is no value in the RecordingContentType enum that corresponds to 'closed_caption'.

Stack Trace:
   at ZoomNet.Internal.ToEnum[T](String str)
   at ZoomNet.Json.StringEnumConverter`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.Converters.JsonMetadataServicesConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
   at System.Text.Json.Serialization.Converters.JsonMetadataServicesConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.Converters.JsonMetadataServicesConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
   at System.Text.Json.Serialization.Converters.JsonMetadataServicesConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadUsingMetadata[TValue](JsonElement element, JsonTypeInfo jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](JsonElement element, JsonSerializerOptions options)
   at ZoomNet.Internal.AsPaginatedResponseWithTokenAndDateRange[T](HttpContent httpContent, String propertyName, JsonSerializerOptions options, CancellationToken cancellationToken)
   at ZoomNet.Internal.AsPaginatedResponseWithTokenAndDateRange[T](IRequest request, String propertyName, JsonSerializerOptions options)

There are currently 6 values missing in the enum that are defined in the Zoom API documentation here: https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/recordingsList.

Here is a json object of the recording file that is causing the issue:

image

Jericho commented 1 year ago

First of all, let me thank you for proactively providing all the necessary information including stack trace, the JSON you receive from Zoom, links to relevant documentation, etc. This is so helpful! Allows me to easily understand, also helps me to reproduce the problem and it also shows that you made a serious effort to research and understand the problem before raising this issue. All this makes me so much more motivated to resolve the problem.

<rant>It's so frustrating when people raise issues with ambiguous description, no indication how I can reproduce, no JSON that I could potentially use to write a unit test, etc. It leads to wasting so much time asking for additional information. </rant>

Having said that, Zoom's API changes so rapidly and I can't ever keep up. Evidently, they added new recording content types that, as you point out, are missing from ZoomNet. I'll add the missing values and push a new release either tomorrow or Friday.

BrianWhiting commented 1 year ago

Thanks for the quick turnaround on this!

As a fellow developer who gets way too many issue reports without enough detail, I feel your pain. I'm happy to have made your life a little easier, even though my request was pretty simple and straightforward to begin with. :)

Jericho commented 1 year ago

Update is being published right now. It should be available on Nuget within the next 30 minutes or so.

Jericho commented 1 year ago

:tada: This issue has been resolved in version 0.52.0 :tada:

The release is available on:

Your GitReleaseManager bot :package::rocket: