Class: Ipfs::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/ipfs-api.rb

Instance Method Summary collapse

Constructor Details

#initialize(server = {}) ⇒ Client

Returns a new instance of Client.



8
9
10
# File 'lib/ipfs-api.rb', line 8

def initialize server = {}
  @request = Request.new server
end

Instance Method Details

#cat(multi_hash) ⇒ Object



20
21
22
# File 'lib/ipfs-api.rb', line 20

def cat multi_hash
  execute Command::Cat, multi_hash
end

#idObject



12
13
14
# File 'lib/ipfs-api.rb', line 12

def id
  execute Command::Id
end

#versionObject



16
17
18
# File 'lib/ipfs-api.rb', line 16

def version
  execute Command::Version
end