Skip to content

Instantly share code, notes, and snippets.

@kochd
Created April 16, 2015 19:22
Show Gist options
  • Save kochd/c5d2bc9f38b3761bc1fe to your computer and use it in GitHub Desktop.
Save kochd/c5d2bc9f38b3761bc1fe to your computer and use it in GitHub Desktop.
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