made a script to check number of players playing quake champions
This commit is contained in:
parent
f7ddfdebe3
commit
a70f2e0987
1 changed files with 13 additions and 0 deletions
13
quake_player_count.rb
Executable file
13
quake_player_count.rb
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env ruby
|
||||
#
|
||||
|
||||
require 'net/http'
|
||||
require 'json'
|
||||
|
||||
quake_id = '611500'
|
||||
url = "https://api.steampowered.com/ISteamUserStats/GetNumberOfCurrentPlayers/v1/?appid=#{quake_id}"
|
||||
uri = URI(url)
|
||||
response = Net::HTTP.get(uri)
|
||||
json_data = JSON.parse(response)
|
||||
|
||||
puts json_data['response']['player_count']
|
Loading…
Add table
Reference in a new issue