Skip to content

Instantly share code, notes, and snippets.

@kyleslattery
Created August 11, 2008 04:53
Show Gist options
  • Save kyleslattery/4810 to your computer and use it in GitHub Desktop.
Save kyleslattery/4810 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'activeresource'
class BrightkiteBase < ActiveResource::Base
self.site = 'http://brightkite.com'
self.user = USERNAME
self.password = PASSWORD
end
class Person < BrightkiteBase
end
class Note < BrightkiteBase
self.site += 'places/:place_id'
end
place_id = Person.find(BrightkiteBase.user).place.id
note = Note.new({:place_id => place_id})
note.body = "This is the note to post!"
note.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment