Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.