mutewinter / Showbot

🤖 An IRC Bot and Website for 5by5.tv written with the Cinch and Sinatra frameworks
MIT License
90 stars 31 forks source link

Live json data request change #61

Closed MikeBeasterfeld closed 11 years ago

MikeBeasterfeld commented 11 years ago

Showbot is pointing to http://5by5.tv/live/data.json. I ran this while the Incomparable was running.

vagrant@precise32:/vagrant/sample_app$ curl http://5by5.tv/live/data.json {"live":false}

However drop the '.json' and it comes back with the correct data. So I guess Showbot needs to be updated to point to the new resource. I'll submit a pull request as soon as I can if nobody else gets to it.

vagrant@precise32:/vagrant/sample_app$ curl http://5by5.tv/live/data {"live":true,"broadcast":{"title":"The Incomparable","slug":"incomparable","show_art":"http://icebox.5by5.tv/images/broa dcasts/30/cover.jpg","show_art_half":"http://icebox.5by5.tv/images/broadcasts/30/cover_half.jpg","show_art_quarter":"htt p://icebox.5by5.tv/images/broadcasts/30/cover_quarter.jpg","audioURL":"http://feeds.5by5.tv/incomparable","videoURL":"", "webURL":"http://5by5.tv/incomparable","hasVideo":"YES","showDescription":"An award-winning weekly show about geeky cult ural topics in numerous media, including books, movies, TV, comics, and games. Jason Snell talks with a rotating panel o f regular guests including John Siracusa, Dan Moren, Glenn Fleishman, Serenity Caldwell, and Scott McNulty.","hostedBy": "Jason Snell"}}

mutewinter commented 11 years ago

That's interesting. It seems to still be working on the live site. Maybe a caching problem?

MikeBeasterfeld commented 11 years ago

Inhatko Almanac is live right now. Here is what I am getting.

vagrant@precise32:/vagrant/sample_app$ date && curl http://5by5.tv/live/data.json && echo '' && curl http://5by5.tv/live/data && echo '' Thu Jun 6 15:19:29 UTC 2013 {"live":false} {"live":true,"broadcast":{"title":"The Ihnatko lmanac","slug":"ia","show_art":"http://icebox.5by5.tv/images/broadcasts/28/cover.jpg","show_art_half":"http://icebox.5by5.tv/images/broadcasts/28/cover_half.jpg","show_art_quarter":"http://icebox.5by5.tv/images/broadcasts/28/cover_quarter.jpg","audioURL":"http://feeds.5by5.tv/ia","videoURL":"","webURL":"http://5by5.tv/ia","hasVideo":"NO","showDescription":"The Ihnatko Almanac is a weekly discussion that mostly focuses on the Clickable Arts: the movies, music, books, comics, articles, and other bits of entertainment and news that Andy and Dan have been reaching through a mouse click recently. \r\n\r\nWarning: the Almanac is a designated meme-free zone. We prefer our pianos to be played by expert human artists, not by poorly-Photoshopped cats.\r\n","hostedBy":"Andy Ihnatko & Dan Benjamin"}}

MikeBeasterfeld commented 11 years ago

Headers

vagrant@precise32:/vagrant/sample_app$ date && curl -I http://5by5.tv/live/data.json && echo '' && curl -I http://5by5.tv/live/data && echo '' Thu Jun 6 15:25:08 UTC 2013 HTTP/1.1 200 OK Server: nginx/1.4.0 Date: Thu, 06 Jun 2013 15:25:08 GMT Content-Type: application/octet-stream Content-Length: 847 Last-Modified: Thu, 06 Jun 2013 15:24:25 GMT Connection: keep-alive ETag: "51b0a9a9-34f" Accept-Ranges: bytes

HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Connection: keep-alive Status: 200 X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.19 X-UA-Compatible: IE=Edge,chrome=1 ETag: "12698b36bd99ca1a03b09cbc93716029" Cache-Control: max-age=0, private, must-revalidate X-Request-Id: b76369eba8a91e4d82103a11419ce2de X-Runtime: 0.048779 Date: Thu, 06 Jun 2013 15:25:09 GMT X-Rack-Cache: miss Server: nginx/1.4.0 + Phusion Passenger 3.0.19

MikeBeasterfeld commented 11 years ago

Now in sync

MikeBeasterfeld commented 11 years ago

I got a response and 5by5 staff is looking into the issue.