Class: Ipfs::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/client.rb,
lib/ipfs_api.rb

Constant Summary collapse

VERSION =
'0.4.1'

Instance Method Summary collapse

Constructor Details

#initialize(server = {}) ⇒ Client

Returns a new instance of Client.



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

def initialize(server = {})
  @http_api = HttpApi.new server
end

Instance Method Details

#cat(multi_hash) ⇒ Object



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

def cat(multi_hash)
  execute Command::Cat, Multihash.new(multi_hash)
end

#idObject



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

def id
  execute Command::Id
end

#ls(multi_hash) ⇒ Object



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

def ls(multi_hash)
  execute Command::Ls, Multihash.new(multi_hash)
end

#versionObject



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

def version
  execute Command::Version
end