Module: Bixby::Repository
- Extended by:
- Log
- Defined in:
- lib/bixby-client/modules/repository.rb
Class Method Summary collapse
-
.fetch_file(cmd, file, dest) ⇒ Object
Download the given command file.
-
.list_files(cmd) ⇒ Array<Hash>
Retrieve a file listing for the given Bundle.
Class Method Details
.fetch_file(cmd, file, dest) ⇒ Object
Download the given command file
27 28 29 30 31 32 |
# File 'lib/bixby-client/modules/repository.rb', line 27 def self.fetch_file(cmd, file, dest) params = cmd.to_hash params.delete(:digest) req = JsonRequest.new("provisioning:fetch_file", [params, file]) Bixby.client.exec_api_download(req, dest) end |
.list_files(cmd) ⇒ Array<Hash>
Retrieve a file listing for the given Bundle
16 17 18 19 20 21 |
# File 'lib/bixby-client/modules/repository.rb', line 16 def self.list_files(cmd) debug { "listing files for bundle: #{cmd.bundle}"} req = JsonRequest.new("provisioning:list_files", cmd.to_hash) res = Bixby.client.exec_api(req) return res.data end |