thibaudgg / video_info

Get video info from Dailymotion, Vimeo, Wistia, and YouTube URLs.

Home Page:https://rubygems.org/gems/video_info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with getting started documentation

dguardio opened this issue · comments

For newbies to rails like me, it is unclear where the API keys go and if there are other requirements to get this gem working in our apps. Questions like does the gem require a column on the db in which am going to use it or does it work standalone? comes to mind.
Thanks for your speedy response.

Well, first off, this gem has nothing to do with Rails. It is pure Ruby. You are free to use it with Rails if you desire. It does not have any concept of a database. It simply returns a Ruby object containing the info for the video. You can use this information to populate a database if you so desire.

As for the API keys, I'm not sure I understand the confusion. You would simply do:
VideoInfo.provider_api_keys = { youtube: 'YOUR_YOUTUBE_API_KEY', vimeo: 'YOUR_VIMEO_API_KEY' }

Never knew it was pure ruby. Thanks for the heads up. So setting the API keys is purely console based.

So setting the API keys is purely console based.

No, you can do it anywhere in the code. Where in the code depends on your codebase.

Closing this issue as this isn't really about the gem.