Class: JustGiving::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/just_giving/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.



3
4
5
# File 'lib/just_giving/client.rb', line 3

def initialize(options)
  @api_key = options[:api_key]
end

Instance Method Details

#donation(id) ⇒ Object



11
12
13
14
# File 'lib/just_giving/client.rb', line 11

def donation(id)
  response = http.get("/donation/#{id}")
  Donation.new(response)
end

#user(email) ⇒ Object



7
8
9
# File 'lib/just_giving/client.rb', line 7

def user(email)
  User.new(http, email)
end