Skip to content

Instantly share code, notes, and snippets.

@txus
Created February 27, 2012 10:39
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 txus/1923029 to your computer and use it in GitHub Desktop.
Save txus/1923029 to your computer and use it in GitHub Desktop.
Springpad API test
require 'rest-client'
require 'json'
require 'yaml'
config = YAML.load(File.read(File.expand_path("~/.springpad")))
user, password = config['user'], config['password']
#
response = RestClient.get(
"http://springpadit.com/api/users/txus",
"X-Spring-Username" => user,
"X-Spring-Password" => password,
content = JSON.parse(response)
require 'pp'
pp content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment