Sha256: 64b7c9426f581d28b5a25729595d1013e144bd744df30de37e20a914cca95896

Contents?: true

Size: 353 Bytes

Versions: 8

Compression:

Stored size: 353 Bytes

Contents

module NightcrawlerSwift
  class Delete < Command

    def execute path
      if path.nil? or path.empty?
        raise Exceptions::ValidationError.new "Delete command requires a path parameter"
      end

      response = delete "#{connection.upload_url}/#{path}", headers: { accept: :json }
      [200, 201].include?(response.code)
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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