Class: Ipfs::Client
- Inherits:
-
Object
- Object
- Ipfs::Client
- Defined in:
- lib/client.rb,
lib/ipfs_api.rb
Constant Summary collapse
- VERSION =
'0.4.1'
Instance Method Summary collapse
- #cat(multi_hash) ⇒ Object
- #id ⇒ Object
-
#initialize(server = {}) ⇒ Client
constructor
A new instance of Client.
- #ls(multi_hash) ⇒ Object
- #version ⇒ Object
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 |
#id ⇒ Object
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 |
#version ⇒ Object
18 19 20 |
# File 'lib/client.rb', line 18 def version execute Command::Version end |