I am trying to build a Rails app that uses the YouTube data API provided through the YouTube_it gem. So far I have been successful in being able to pull the data from YouTube and list it on a webpage but its pretty slow. I would like to just make a request maybe once a day to the YouTube data and store it in my database so that my app would just use my database. Is this a good idea? Are there better ways to do this? And how do I do this? I know I need to build a model but without a form, how do I update the database, say once a day/once a week?
I know these are a lot of questions but any help is appreciated, thanks so much!
After looking around enough I found the answer to my question. Basically what I needed to do was use a rake task to connect to youtube_it and store the youtube data into my database and then use cron or the gem ‘whenever’ to run that task at certain time periods.