whuffiebank 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  .loadpath
2
2
  .project
3
+ *.gem
@@ -9,6 +9,9 @@ This gem implements the thewhuffiebank.org API.
9
9
 
10
10
  == FEATURES:
11
11
 
12
+ >> require 'whuffiebank'
13
+ => ["Whuffiebank"]
14
+
12
15
  >> Whuffiebank.give_whuffie('rtopsy','a_password','etagwerker',10)
13
16
  => <#Whuffiebank::GiveResponse result="success">
14
17
 
@@ -21,6 +24,10 @@ This gem implements the thewhuffiebank.org API.
21
24
  == INSTALL:
22
25
 
23
26
  sudo gem install whuffiebank
27
+
28
+ == DOCUMENTATION:
29
+
30
+ * http://etagwerker.github.com/whuffiebank
24
31
 
25
32
  == LICENSE:
26
33
 
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.2.0
@@ -44,8 +44,8 @@ module Whuffiebank
44
44
  # @param [String] to_username
45
45
  # @param [String] amount
46
46
  # @param [Hash] options method options
47
- # :reason - Why are you giving whuffie to that user?
48
- # :alert - Send a messages using Twitter just after the payment.
47
+ # :reason - Why are you giving whuffie to that user? (String)
48
+ # :alert - Send a messages using Twitter just after the payment. (1 or 0)
49
49
  # @return [Whuffiebank::GiveResponse]
50
50
  def self.give_whuffie(username,password,to_username,amount,options={})
51
51
  Whuffiebank::Client.new.give_whuffie(username,password,to_username,amount,options)
@@ -2,15 +2,11 @@ module Whuffiebank
2
2
 
3
3
  # This is the Balance class for the whuffiebank library.
4
4
  #
5
-
6
5
  # result - 'success' or 'failure'
7
- #
8
6
  # reason - if the result is 'failure', the reason why the request failed.
9
- #
10
7
  # balance - if the result is 'success', this is the Whuffie Bank user's balance.
11
-
12
-
13
- # According to the Whuffiebank API doc: http://www.thewhuffiebank.org/static/api
8
+ #
9
+ # According to the Whuffiebank API doc: http://www.thewhuffiebank.org/static/api
14
10
  #
15
11
  class Balance < Hashie::Mash
16
12
  def to_s
@@ -11,7 +11,7 @@ module Whuffiebank
11
11
  end
12
12
 
13
13
  def give_whuffie(username,password,to_username,amount,options={})
14
- response = handle_response(self.class.post("/give/", :body => {:username => username, :password => password, :to => to_username, :amount => amount}))
14
+ response = handle_response(self.class.post("/give/", :body => {:username => username, :password => password, :to => to_username, :amount => amount}.merge(options)))
15
15
  Whuffiebank::GiveResponse.new(response)
16
16
  end
17
17
 
@@ -1,11 +1,10 @@
1
1
  module Whuffiebank
2
2
 
3
- # This is the url_info class for the topsy library.
4
-
3
+ # This is the url_info class for the topsy library.
4
+ #
5
5
  # result - 'success' or 'failure'
6
-
7
6
  # reason - if the result is 'failure', the reason why the request failed.
8
-
7
+ #
9
8
  # According to the Whuffiebank API doc: http://www.thewhuffiebank.org/static/api
10
9
  #
11
10
  class GiveResponse < Hashie::Mash
@@ -2,15 +2,11 @@ module Whuffiebank
2
2
 
3
3
  # This is the Whuffie class for the whuffiebank library.
4
4
  #
5
-
6
5
  # result - 'success' or 'failure'
7
- #
8
6
  # reason - if the result is 'failure', the reason why the request failed.
9
- #
10
7
  # whuffie - if the result is 'success', this is the whuffie rate per month.
11
- #
12
8
  # ranking - if the result is 'success', this is the global ranking position.
13
-
9
+ #
14
10
  # According to the Whuffiebank API doc: http://www.thewhuffiebank.org/static/api
15
11
  #
16
12
  class Whuffie < Hashie::Mash
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{whuffiebank}
8
- s.version = "0.1.0"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ernesto Tagwerker"]
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
24
24
  "README",
25
25
  "README.rdoc",
26
26
  "Rakefile",
27
+ "VERSION",
27
28
  "lib/whuffiebank.rb",
28
29
  "lib/whuffiebank/balance.rb",
29
30
  "lib/whuffiebank/client.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whuffiebank
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernesto Tagwerker
@@ -89,6 +89,7 @@ files:
89
89
  - README
90
90
  - README.rdoc
91
91
  - Rakefile
92
+ - VERSION
92
93
  - lib/whuffiebank.rb
93
94
  - lib/whuffiebank/balance.rb
94
95
  - lib/whuffiebank/client.rb