class Bitcoin::Fees::Client
Public Class Methods
new(config)
click to toggle source
# File lib/bitcoin/fees/client.rb, line 9 def initialize(config) @config = config end
Public Instance Methods
list()
click to toggle source
# File lib/bitcoin/fees/client.rb, line 17 def list make_request('/api/v1/fees/list') end
recommended()
click to toggle source
# File lib/bitcoin/fees/client.rb, line 13 def recommended make_request('/api/v1/fees/recommended') end
Private Instance Methods
make_request(path)
click to toggle source
# File lib/bitcoin/fees/client.rb, line 27 def make_request(path) endpoint = url(path) response = RestClient.get(endpoint) JSON.parse(response) end
url(path)
click to toggle source
# File lib/bitcoin/fees/client.rb, line 23 def url(path) "#{@config.host}#{path}" end