Class: Bondora::API
Instance Method Summary collapse
-
#auction(auction_id) ⇒ String
Get auction for specified auction.
-
#auctions ⇒ String
Get all auctions.
-
#balance ⇒ String
Get account balance details.
-
#bid(bid_id) ⇒ String
Get bid details.
-
#bids ⇒ String
Get bids.
-
#initialize(auth_code, *sandbox) ⇒ Object
constructor
Create new API client.
-
#investments ⇒ String
Get account investments.
-
#loandataset ⇒ String
Get loandatasets.
-
#loanpart(loanpart_id) ⇒ String
Get loanpart details.
-
#report(report_id) ⇒ String
Get report details.
-
#reports ⇒ String
Get reports.
-
#secondarymarket ⇒ String
Get all secondary market offers.
-
#secondarymarket_item(item_id) ⇒ String
Get secondary market item details.
Constructor Details
#initialize(auth_code, *sandbox) ⇒ Object
Create new API client
10 11 12 13 14 15 16 17 18 |
# File 'lib/bondora/api.rb', line 10 def initialize(auth_code, *sandbox) self.class.headers 'Authorization' => "Bearer #{auth_code}" if sandbox self.class.base_uri 'https://api-sandbox.bondora.com/api/v1' else self.class.base_uri 'https://api.bondora.com/api/v1' end end |
Instance Method Details
#auction(auction_id) ⇒ String
Get auction for specified auction
32 33 34 |
# File 'lib/bondora/api.rb', line 32 def auction(auction_id) self.class.get("/auction/#{auction_id}").to_json end |
#auctions ⇒ String
Get all auctions
24 25 26 |
# File 'lib/bondora/api.rb', line 24 def auctions self.class.get('/auctions').to_json end |
#balance ⇒ String
Get account balance details
62 63 64 |
# File 'lib/bondora/api.rb', line 62 def balance self.class.get('/account/balance').to_json end |
#bid(bid_id) ⇒ String
Get bid details
102 103 104 |
# File 'lib/bondora/api.rb', line 102 def bid(bid_id) self.class.get("/bid/#{bid_id}").to_json end |
#bids ⇒ String
Get bids
94 95 96 |
# File 'lib/bondora/api.rb', line 94 def bids self.class.get('/bids').to_json end |
#investments ⇒ String
Get account investments
69 70 71 |
# File 'lib/bondora/api.rb', line 69 def investments self.class.get('/account/investments').to_json end |
#loandataset ⇒ String
Get loandatasets
109 110 111 |
# File 'lib/bondora/api.rb', line 109 def loandataset self.class.get('/loandataset').to_json end |
#loanpart(loanpart_id) ⇒ String
Get loanpart details
55 56 57 |
# File 'lib/bondora/api.rb', line 55 def loanpart(loanpart_id) self.class.get("/loanpart/#{loanpart_id}").to_json end |
#report(report_id) ⇒ String
Get report details
124 125 126 |
# File 'lib/bondora/api.rb', line 124 def report(report_id) self.class.get("/report/#{report_id}").to_json end |
#reports ⇒ String
Get reports
116 117 118 |
# File 'lib/bondora/api.rb', line 116 def reports self.class.get('/reports').to_json end |
#secondarymarket ⇒ String
Get all secondary market offers
39 40 41 |
# File 'lib/bondora/api.rb', line 39 def secondarymarket self.class.get('/secondarymarket').to_json end |
#secondarymarket_item(item_id) ⇒ String
Get secondary market item details
47 48 49 |
# File 'lib/bondora/api.rb', line 47 def secondarymarket_item(item_id) self.class.get("/secondarymarket/#{item_id}").to_json end |