Class: Ipfs::Client
- Inherits:
-
Object
- Object
- Ipfs::Client
- Defined in:
- lib/client.rb,
lib/ipfs_api.rb
Constant Summary collapse
- VERSION =
'0.5.0'
Instance Method Summary collapse
- #add(filepath) ⇒ Object
- #cat(multihash) ⇒ Object
- #id ⇒ Object
-
#initialize(server = {}) ⇒ Client
constructor
A new instance of Client.
- #ls(multihash) ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(server = {}) ⇒ Client
Returns a new instance of Client.
7 8 9 |
# File 'lib/client.rb', line 7 def initialize(server = {}) @http_api = HttpApi.new server end |
Instance Method Details
#add(filepath) ⇒ Object
27 28 29 |
# File 'lib/client.rb', line 27 def add(filepath) execute Command::Add, filepath end |
#cat(multihash) ⇒ Object
19 20 21 |
# File 'lib/client.rb', line 19 def cat(multihash) execute Command::Cat, multihash end |
#id ⇒ Object
11 12 13 |
# File 'lib/client.rb', line 11 def id execute Command::Id end |
#ls(multihash) ⇒ Object
23 24 25 |
# File 'lib/client.rb', line 23 def ls(multihash) execute Command::Ls, multihash end |
#version ⇒ Object
15 16 17 |
# File 'lib/client.rb', line 15 def version execute Command::Version end |