gist: 1489 Download_button fork
public
Public Clone URL: git://gist.github.com/1489.git
iphone.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env ruby
 
require 'net/http'
require 'uri'
require 'rubygems'
require 'json'
require 'pp'
 
url = 'http://www.apple.com/retail/iphone/feeds/3g_us_inv.json'
json = Net::HTTP.get_response(URI.parse(url)).body
 
feed = JSON.parse(json)
 
feed['locations']['VA'].each do |location|
  next if location['available']['black16'] == false
  p location['city']
  p location['name']
  p location['available']
end

Owner

jackdempsey

Revisions