Sha256: ec77d69848e1e00f7df8b720590e550b265401223f92d8c49d5cd8aa4f177b41

Contents?: true

Size: 704 Bytes

Versions: 9

Compression:

Stored size: 704 Bytes

Contents

module NightcrawlerSwift
  class List < Command

    def execute args = {}
      headers = { accept: :json }

      # http://docs.openstack.org/api/openstack-object-storage/1.0/content/GET_showContainerDetails__v1__account___container__storage_container_services.html#GET_showContainerDetails__v1__account___container__storage_container_services-Request
      params = {}
      [:limit, :marker, :end_marker, :prefix, :format, :delimiter, :path].each do |accepted_parameter|
        params[accepted_parameter] = args[accepted_parameter] if args[accepted_parameter]
      end

      response = get connection.upload_url, headers: headers, params: params
      JSON.parse(response.body)
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
nightcrawler_swift-1.0.0 lib/nightcrawler_swift/commands/list.rb
nightcrawler_swift-0.11.1 lib/nightcrawler_swift/commands/list.rb
nightcrawler_swift-0.11.0 lib/nightcrawler_swift/commands/list.rb
nightcrawler_swift-0.10.0 lib/nightcrawler_swift/commands/list.rb
nightcrawler_swift-0.9.0 lib/nightcrawler_swift/commands/list.rb
nightcrawler_swift-0.8.1 lib/nightcrawler_swift/commands/list.rb
nightcrawler_swift-0.8.0 lib/nightcrawler_swift/commands/list.rb
nightcrawler_swift-0.7.0 lib/nightcrawler_swift/commands/list.rb
nightcrawler_swift-0.6.0 lib/nightcrawler_swift/commands/list.rb