{"action":"opened","issue":{"url":"https://api.github.com/repos/Fullscreen/yt/issues/134","labels_url":"https://api.github.com/repos/Fullscreen/yt/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/Fullscreen/yt/issues/134/comments","events_url":"https://api.github.com/repos/Fullscreen/yt/issues/134/events","html_url":"https://github.com/Fullscreen/yt/issues/134","id":66221072,"number":134,"title":"Is there a way to automatically eager-load a video on initialization?","user":{"login":"lukevmorris","id":1438089,"avatar_url":"https://avatars.githubusercontent.com/u/1438089?v=3","gravatar_id":"","url":"https://api.github.com/users/lukevmorris","html_url":"https://github.com/lukevmorris","followers_url":"https://api.github.com/users/lukevmorris/followers","following_url":"https://api.github.com/users/lukevmorris/following{/other_user}","gists_url":"https://api.github.com/users/lukevmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/lukevmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukevmorris/subscriptions","organizations_url":"https://api.github.com/users/lukevmorris/orgs","repos_url":"https://api.github.com/users/lukevmorris/repos","events_url":"https://api.github.com/users/lukevmorris/events{/privacy}","received_events_url":"https://api.github.com/users/lukevmorris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-03T20:19:06Z","updated_at":"2015-04-03T20:19:06Z","closed_at":null,"body":"When a user provides a url to a Youtube video, I'd like to know immediately whether or not that url points to a valid id. As of right now, the gem will accept any url in the initialization phase, and create a video instance:\r\n```ruby\r\nvideo = Yt::Video.new(url: \"www.facebook.com\")\r\n=> #<Yt::Models::Video:0x007fe01dd56240 ...>\r\n```\r\nIt's only when I attempt to access data on that video later that an error is thrown:\r\n```ruby\r\nvideo.title\r\n=> NameError: uninitialized constant OpenSSL::SSL::SSLErrorWaitReadable\r\n```\r\nOr, for youtube urls with an invalid id:\r\n```ruby\r\nvideo = Yt::Video.new(url: \"https://www.youtube.com/watch?v=l_JMrETiwQV\")\r\n=> #<Yt::Models::Video:0x007fe0168a6530 ...>\r\nvideo.title\r\n=> Yt::Errors::NoItems: ...\r\n```\r\nIs there any way to configure the gem such that the resource be eager-loaded by default? Here's what I'm doing for the time being to get around the issue:\r\n```ruby\r\nvideo = Yt::Video.new(url: \"https://www.youtube.com/watch?v=l_JMrETiwQV\").tap(&:title)\r\n=> Yt::Errors::NoItems: ...\r\n```\r\n\r\nThanks!"}}