Created
April 16, 2015 19:22
-
-
Save kochd/c5d2bc9f38b3761bc1fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'net/https' | |
stats = Hash.new(0) | |
nodes = JSON.parse(Net::HTTP.get(URI("https://map.luebeck.freifunk.net/nodes.json")))["nodes"] | |
nodes.each{ |a| stats["clients"] += a["clientcount"].to_i } | |
stats["nodes"] = nodes.count | |
puts stats |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment