class Mobius::Client::FriendBot
Constants
- ENDPOINT
- MOBIUS_HOST
Public Instance Methods
call()
click to toggle source
# File lib/mobius/client/friend_bot.rb, line 9 def call response = http.post(ENDPOINT, addr: seed, amount: amount) return true if response.success? raise "FriendBot failed to respond: #{response.body}" end
Private Instance Methods
http()
click to toggle source
# File lib/mobius/client/friend_bot.rb, line 17 def http # Mobius::Client.mobius_host Faraday.new(MOBIUS_HOST) do |c| c.request :url_encoded c.response :json, content_type: /\bjson$/ c.adapter Faraday.default_adapter end end