class StellarBase::HorizonClient

Public Instance Methods

get_operation(operation_id) click to toggle source
# File lib/stellar_base/horizon_client.rb, line 3
def get_operation(operation_id)
  response = HTTParty.get(horizon_operations_path(operation_id))

  JSON.parse(response.body) if response.code == 200
end
get_transaction(transaction_id) click to toggle source
# File lib/stellar_base/horizon_client.rb, line 9
def get_transaction(transaction_id)
  response = HTTParty.get(horizon_transactions_path(transaction_id))

  JSON.parse(response.body) if response.code == 200
end

Private Instance Methods

base_url() click to toggle source
# File lib/stellar_base/horizon_client.rb, line 25
def base_url
  StellarBase.configuration.horizon_url
end
horizon_operations_path(operation_id) click to toggle source
# File lib/stellar_base/horizon_client.rb, line 21
def horizon_operations_path(operation_id)
  "#{base_url}/operations/#{operation_id}"
end
horizon_transactions_path(transaction_id) click to toggle source
# File lib/stellar_base/horizon_client.rb, line 17
def horizon_transactions_path(transaction_id)
  "#{base_url}/transactions/#{transaction_id}"
end