Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider having update methods return a boolean of the call's success #134

Open
ImperatorRuscal opened this issue Aug 28, 2019 · 1 comment

Comments

@ImperatorRuscal
Copy link

If you call VimeoClient.UpdateVideoMetadataAsync you don't have a positive indicator that the operation succeeded. You know the call was made, but you don't know that the update happened. This is especially important if what you are updating isn't a property returned with a GetVideoAsync call (such as "password" to get the string of the currently set access password on the video -- if you update the password right now, I haven't found a way within this library to verify that it changed as expected.).

I'd like to suggest that the various Update/Edit methods be modified to return a boolean value that represents the result of the underlying web api call. This should be non-breaking on existing implementations (calling a function as a method will simply discard the result), but should also provide benefit for future implementation (the coder can check if the request succeeded).

@ImperatorRuscal
Copy link
Author

It's late (for me) and I apologize for missing that a non-success will THROW for you. I guess wrapping the update calls in a try-catch (with the catch handling the same as the "if it didn't succeed" logic) could work.

At the very least I think you're down to preference and how you were trained at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant