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

The Youtube API v3 sample for uploading a video using Ruby is outdated #63

Open
fearnowrath opened this issue Apr 8, 2016 · 6 comments

Comments

@fearnowrath
Copy link

The file https://github.com/youtube/api-samples/blob/master/ruby/upload_video.rb is outdated. It doesn't work with the current version and says cannot require 'google/api_client' as there is no file in the current version.

Also, when i use the version 0.8.2, it can require the above file but it doesn't work in other ways and gives an internal server error on the redirect_uri (i am currently testing on my localhost - i have already set the address http://localhost:8080/ in the allowed domains list on developer console). I thought it would have something to do with the Thin gem but the gem is working fine when i tested on another file.
is there any solution to this?
Thanks.

@jeffrade
Copy link

@fearnowrath Did you ever get the sample code running? If so, what version did you end up using?

@fearnowrath
Copy link
Author

@jeffrade i ended up not using the gem and directly calling the Youtube API using httparty. it is much simpler and straightforward. let me know if you want the code.

@jeffrade
Copy link

@fearnowrath If you have any code snippets that you think would be helpful, I will gladly take them :)

I haven't implemented yet, but I found code samples in google/google-api-ruby-client. I assume that might be the preferred client and is more up-to-date.

@fearnowrath
Copy link
Author

@jeffrade here is the code i used. However be warned that it doesn't use the google api library at all. If you are just looking for a video upload, this should work fine. http://pastebin.com/gjAqYu28

@mattlindsey
Copy link

I agree that the ruby samples really should be updated.

@jhirbour
Copy link

jhirbour commented Nov 7, 2018

@google-admin any updates on this issue?

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

4 participants