Skip to content

Instantly share code, notes, and snippets.

@cbmeeks
Created April 27, 2010 18:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbmeeks/381105 to your computer and use it in GitHub Desktop.
Save cbmeeks/381105 to your computer and use it in GitHub Desktop.
# how to save a record
# console...
key = "your key"
secret = "your secret"
# Chattanooga lat/lon = 35.0456297 / -85.3096801
client = Simplegeo.new( key, secret, "yourlayer" )
records = Simplegeo::Records.new( client )
data = { :type => "object", :lat => 35.0456297, :lon => -85.3096801, :created => Time.now.to_i, :layer => "yourlayer", :data => { :user_id => "user001", :name => "Larry Fine", :type => "checkin", :note => "Well I recon' this is the place, and I recon' he's not at this place, so I recon' he must be some other place I recon'" } }
records.put( "someuniqueid", data )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment