mfilippov / vimeo-dot-net

A .NET wrapper for Vimeo API v3.0
MIT License
98 stars 88 forks source link

[3.2.0] : Error when setting ReviewLinkEnable in metdata when uploading video #188

Closed christophe-mommer closed 1 year ago

christophe-mommer commented 1 year ago

Hi there, After updates my project to 3.2.0 (the video upload is now blazing fast, I wanna keep that, congrats for good job!)

However, I do have the following error thrown back:

VimeoDotNet.Exceptions.VimeoApiException: 'Error updating user video metadata.
Code: BadRequest
Message: {"error":"The specified review type doesn't align with the request's API version.","link":null,"developer_message":"The review_link field is for API versions earlier than 3.3.6. The review_page field is for API versions 3.3.6 and greater.","error_code":2513}'

Here's my request:

await client.UpdateVideoMetadataAsync(upload.ClipId.Value, new VideoUpdateMetadata
                {
                    Name = arg.File.Name,
                    AllowDownloadVideo = false,
                    AllowAddToAlbumChannelGroup = false,
                    ReviewLinkEnabled = false, // this line throw
                    Comments = VideoCommentsEnum.Nobody,
                    EmbedPrivacy = VideoEmbedPrivacyEnum.Whitelist
                });

There's no property "reviewPage" on the object as of now. My current workaround:

var metadata = new VideoUpdateMetadata
                {
                    Name = arg.File.Name,
                    AllowDownloadVideo = false,
                    AllowAddToAlbumChannelGroup = false,
                    Comments = VideoCommentsEnum.Nobody,
                    EmbedPrivacy = VideoEmbedPrivacyEnum.Whitelist
                };
                metadata.GetParameterValues().Add("review_page", "false");

But I think this could be in the package directly ;-)

Thanks

mfilippov commented 1 year ago

@christophe-mommer Fixed in v3.2.3