Sha256: eaca9b9b84e88173bda4b1bff72b38a4d741836f1d188020fa909310e46abaf9

Contents?: true

Size: 378 Bytes

Versions: 7

Compression:

Stored size: 378 Bytes

Contents

module NightcrawlerSwift
  class Delete < Command

    def execute path
      response = delete "#{connection.upload_url}/#{path}", headers: {accept: :json }
      JSON.parse(response.body)

    rescue RestClient::ResourceNotFound => e
      raise Exceptions::NotFoundError.new(e)

    rescue StandardError => e
      raise Exceptions::ConnectionError.new(e)
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nightcrawler_swift-0.3.0 lib/nightcrawler_swift/delete.rb
nightcrawler_swift-0.2.3 lib/nightcrawler_swift/delete.rb
nightcrawler_swift-0.2.2 lib/nightcrawler_swift/delete.rb
nightcrawler_swift-0.2.1 lib/nightcrawler_swift/delete.rb
nightcrawler_swift-0.2.0 lib/nightcrawler_swift/delete.rb
nightcrawler_swift-0.1.1 lib/nightcrawler_swift/delete.rb
nightcrawler_swift-0.1.0 lib/nightcrawler_swift/delete.rb