Skip to content

Instantly share code, notes, and snippets.

@satour
Created December 13, 2016 12:04
Show Gist options
  • Save satour/6567b7f2ff1c9fa2d15662e7f69f9458 to your computer and use it in GitHub Desktop.
Save satour/6567b7f2ff1c9fa2d15662e7f69f9458 to your computer and use it in GitHub Desktop.
require 'clockwork'
require 'faraday'
include Clockwork
BANGUMI_HYO_API_KEY = ENV['BANGUMI_HYO_API_KEY']
every(1.minutes, 'NHK_NOW_ON_AIR_API') {
res = Faraday.get "http://api.nhk.or.jp/v2/pg/now/130/g1.json", {key: BANGUMI_HYO_API_KEY }
puts res.status
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment