{"id":1773,"date":"2015-07-04T11:09:59","date_gmt":"2015-07-04T16:09:59","guid":{"rendered":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=1773"},"modified":"2015-07-04T11:09:59","modified_gmt":"2015-07-04T16:09:59","slug":"youtube-data-api","status":"publish","type":"post","link":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=1773","title":{"rendered":"YouTube Data API"},"content":{"rendered":"<p>Google has changed their YouTube Data API and broken my web pages; <a href=\"http:\/\/www.williamsportwebdeveloper.com\/FavBackUp.aspx\">YouTube Favorites Back Up<\/a> and <a href=\"http:\/\/www.williamsportwebdeveloper.com\/SubsBackUp.aspx\">YouTube Subscriptions Back Up<\/a>. I did manage to rewrite the YouTube favorites back up. It actually backs up a playlist and it can only do one playlist at a time. Instead of entering your YouTube username, you have to enter your playlist id which can be found at the end of the playlist url, for example, https:\/\/www.youtube.com\/playlist?list=<strong>FLqcux7OX-LWcqJvLcjFfjnQ<\/strong><\/p>\n<p>The<a href=\"http:\/\/www.williamsportwebdeveloper.com\/FavBackUp.aspx\"> YouTube Favorites Back Up<\/a> spreadsheet will now only include the Video Url, Channel, Title, and Description because I can get less information about a video. Just getting the Channel name requires a separate data request for every item in the playlist. I also made a few improvements to my original code. I added some error handling so I get an email when there is an error. Google limits the number of records it will return per data request and I finally added some code to get the next page of results.<\/p>\n<p>Backing up your list of YouTube subscriptions is proving to be more difficult. This requires an OAuth 2.0 token. I&#8217;ve made some progress using the Google API Client Library but the results are unexpected. I&#8217;m not getting the right number of records and the data does not exactly match the channel names I see for my subscriptions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google has changed their YouTube Data API and broken my web pages; YouTube Favorites Back Up and YouTube Subscriptions Back Up. I did manage to rewrite the YouTube favorites back up. It actually backs up a playlist and it can &hellip; <a href=\"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=1773\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,12,11],"tags":[497,1120,21,1119],"_links":{"self":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1773"}],"collection":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1773"}],"version-history":[{"count":1,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1773\/revisions"}],"predecessor-version":[{"id":1774,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1773\/revisions\/1774"}],"wp:attachment":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1773"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}