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) ⇒ API
constructor
A new instance of API.
-
#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) ⇒ API
Returns a new instance of API.
6 7 8 |
# File 'lib/bondora/api.rb', line 6 def initialize(auth_code) self.class.headers 'Authorization' => "Bearer #{auth_code}" end |
Instance Method Details
#auction(auction_id) ⇒ String
Get auction for specified auction
21 22 23 |
# File 'lib/bondora/api.rb', line 21 def auction(auction_id) self.class.get("/auction/#{auction_id}").to_json end |
#auctions ⇒ String
Get all auctions
14 15 16 |
# File 'lib/bondora/api.rb', line 14 def auctions self.class.get('/auctions').to_json end |
#balance ⇒ String
Get account balance details
49 50 51 |
# File 'lib/bondora/api.rb', line 49 def balance self.class.get('/account/balance').to_json end |
#bid(bid_id) ⇒ String
Get bid details
88 89 90 |
# File 'lib/bondora/api.rb', line 88 def bid(bid_id) self.class.get("/bid/#{bid_id}").to_json end |
#bids ⇒ String
Get bids
81 82 83 |
# File 'lib/bondora/api.rb', line 81 def bids self.class.get('/bids').to_json end |
#investments ⇒ String
Get account investments
56 57 58 |
# File 'lib/bondora/api.rb', line 56 def investments self.class.get('/account/investments').to_json end |
#loandataset ⇒ String
Get loandatasets
95 96 97 |
# File 'lib/bondora/api.rb', line 95 def loandataset self.class.get('/loandataset').to_json end |
#loanpart(loanpart_id) ⇒ String
Get loanpart details
42 43 44 |
# File 'lib/bondora/api.rb', line 42 def loanpart(loanpart_id) self.class.get("/loanpart/#{loanpart_id}").to_json end |
#report(report_id) ⇒ String
Get report details
109 110 111 |
# File 'lib/bondora/api.rb', line 109 def report(report_id) self.class.get("/report/#{report_id}").to_json end |
#reports ⇒ String
Get reports
102 103 104 |
# File 'lib/bondora/api.rb', line 102 def reports self.class.get('/reports').to_json end |
#secondarymarket ⇒ String
Get all secondary market offers
28 29 30 |
# File 'lib/bondora/api.rb', line 28 def secondarymarket self.class.get('/secondarymarket').to_json end |
#secondarymarket_item(item_id) ⇒ String
Get secondary market item details
35 36 37 |
# File 'lib/bondora/api.rb', line 35 def secondarymarket_item(item_id) self.class.get("/secondarymarket/#{item_id}").to_json end |