Module: Whuffiebank

Defined in:
lib/whuffiebank.rb,
lib/whuffiebank/client.rb,
lib/whuffiebank/balance.rb,
lib/whuffiebank/whuffie.rb,
lib/whuffiebank/give_response.rb

Defined Under Namespace

Classes: Balance, Client, General, GiveResponse, InformWhuffiebank, NotFound, RateLimitExceeded, Unauthorized, Unavailable, Whuffie, WhuffieError

Constant Summary collapse

VERSION =
'0.0.1'

Class Method Summary collapse

Class Method Details

.balance(username, password) ⇒ Whuffiebank::Balance

Returns the balance for a combination of username and password

Parameters:

  • username (String)
  • password (String)

Returns:



36
37
38
# File 'lib/whuffiebank.rb', line 36

def self.balance(username,password)
  Whuffiebank::Client.new.balance(username,password)
end

.give_whuffie(username, password, to_username, amount, options = {}) ⇒ Whuffiebank::GiveResponse

Returns the balance for a combination of username and password

Parameters:

  • username (String)
  • password (String)
  • to_username (String)
  • amount (String)
  • options (Hash) (defaults to: {})

    method options :reason - Why are you giving whuffie to that user? :alert - Send a messages using Twitter just after the payment.

Returns:



50
51
52
# File 'lib/whuffiebank.rb', line 50

def self.give_whuffie(username,password,to_username,amount,options={})
  Whuffiebank::Client.new.give_whuffie(username,password,to_username,amount,options)      
end

.whuffie(username) ⇒ Whuffiebank::Whuffie

Returns the whuffie information for a username

Parameters:

  • username (String)

Returns:



58
59
60
# File 'lib/whuffiebank.rb', line 58

def self.whuffie(username)
  Whuffiebank::Client.new.whuffie(username)      
end