Class: BrickFTP::RESTfulAPI::ListBundles

Inherits:
Object
  • Object
show all
Includes:
Command
Defined in:
lib/brick_ftp/restful_api/list_bundles.rb

Overview

List all bundles

See Also:

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

#callArray<BrickFTP::Types::Bundle>

Returns a list of all bundles on the current site.

Returns:



17
18
19
20
21
# File 'lib/brick_ftp/restful_api/list_bundles.rb', line 17

def call
  res = client.get('/api/rest/v1/bundles.json')

  res.map { |i| BrickFTP::Types::Bundle.new(**i.symbolize_keys) }
end