Skip to content

Instantly share code, notes, and snippets.

@tigershen23
Created September 24, 2015 03:39
Show Gist options
  • Save tigershen23/df0e5c80e811c275dac3 to your computer and use it in GitHub Desktop.
Save tigershen23/df0e5c80e811c275dac3 to your computer and use it in GitHub Desktop.
require 'stats_llc'
require 'pp'
api = StatsLLC::API.new(
api_key: 'NBA_API_KEY',
secret: 'NBA_API_SECRET'
)
puts "fetching 2014-2015 Lakers team information..."
puts
lakers_path = '/stats/basketball/nba/teams/:teamId'
response = api.get(
path: lakers_path,
rest_params: { teamId: 13 }
)
json_response = JSON.parse(response, symbolize_names: true)
pp json_response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment