A Ruby wrapper for the BullionVault XML API
Ruby
Switch branches/tags
Nothing to show
Latest commit 75c34c7 Mar 31, 2011 wtn initial release
Permalink
Failed to load latest commit information.
lib initial release Mar 31, 2011
spec initial release Mar 31, 2011
Gemfile initial release Mar 31, 2011
Gemfile.lock initial release Mar 31, 2011
MIT-LICENSE change license to credit twitter gem contributors Mar 19, 2011
README.mkd
Rakefile initial release Mar 31, 2011
bullion_vault.gemspec initial release Mar 31, 2011

README.mkd

BullionVault Ruby Gem

A Ruby wrapper for the BullionVault XML API

Installation

gem install bullion_vault

Usage Examples

require 'rubygems'
require 'bullion_vault'
require 'pp'

# Get current market data
pp BullionVault.view_market

# Certain methods require authentication. To get BullionVault credentials,
# sign up at https://live.bullionvault.com/secure/registration.do

BullionVault \
  .configure {|c| c.user_login, c.user_password = USERNAME, PASSWORD } \
  .authenticate
 => true

# Check your account
pp BullionVault.view_balance

# You only need a valid session id to be authenticated
BullionVault.cookie
 => "JSESSIONID=1D034E46B78C47C17005478B6537CABD; Path=/secure; Secure,
logintest=\"Thu Mar 31 09:17:26 UTC 2011\"; Version=1; Max-Age=60000;
Expires=Fri, 01-Apr-2011 01:57:26 GMT"
cookie = 'JSESSIONID=1D034E46B78C47C17005478B6537CABD'
BullionVault.cookie = cookie
BullionVault.view_balance

# Use two accounts at once
BullionVault.reset
c0 = BullionVault::Client.new(:user_login => 'sara_birton')
c1 = BullionVault::Client.new(:user_login => 'bonepoppy')

Documentation

Copyright

Copyright (c) 2010-2011 William T Nelson, John Nunemaker, Wynn Netherland, Erik Michaels-Ober, Steve Richert. See MIT-LICENSE for details.