Module: TaprootCLI

Defined in:
lib/cli.rb

Class Method Summary collapse

Class Method Details

.client_tokenObject



14
15
16
# File 'lib/cli.rb', line 14

def self.client_token
  JSON.parse(open(url("client_token")).read)
end

.configObject



18
19
20
# File 'lib/cli.rb', line 18

def self.config
  JSON.parse(open(url("config")).read)
end

.config_currentObject



22
23
24
# File 'lib/cli.rb', line 22

def self.config_current
  JSON.parse(open(url("config/current")).read)
end

.config_merchant_accountObject



26
27
28
# File 'lib/cli.rb', line 26

def self.
  JSON.parse(open(url("config/merchant_account")).read)
end

.indexObject



10
11
12
# File 'lib/cli.rb', line 10

def self.index
  JSON.parse(open(url).read)
end

.url(path = "") ⇒ Object



6
7
8
# File 'lib/cli.rb', line 6

def self.url(path="")
  URI.join("http://localhost:3132", path)
end