Skip to content

Instantly share code, notes, and snippets.

Created September 16, 2016 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/89c6c38cbeb8ec84d70eda46d51ac943 to your computer and use it in GitHub Desktop.
Save anonymous/89c6c38cbeb8ec84d70eda46d51ac943 to your computer and use it in GitHub Desktop.
require 'httparty'
url = 'https://statsapi.web.nhl.com/api/v1/schedule?startDate=2016-05-09&endDate=2016-05-09&expand=schedule.teams,schedule.linescore,schedule.broadcasts.all'
response = HTTParty.get(url)
data = response.parsed_response
data['dates'][0]['games'].each do puts ['teams']['away']['team']['name']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment