Sha256: 0a90659403d9c58487a470b7c94ec8b9b1ca3182a4cb442b963e658d6bba3908

Contents?: true

Size: 593 Bytes

Versions: 3

Compression:

Stored size: 593 Bytes

Contents

module PrestaShop
  class Requestor
    class Image < PrestaShop::Requestor
      undef_method :schema, :synopsis, :blank, :search

      def find(*path)
        Raise NotImplementedError
        # this one should raise exception if the response is not an image file
        get(*path)
      end

      def list(*path)
        Raise NotImplementedError
        get(*args)
        Nokogiri::XML(api.client[:images].get.body).xpath("/prestashop/image_types/*").collect(&:name)
      end

      private

      def get(*args)
        api.get(self.resource_name, *args)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
presta_shop-0.1.2 lib/presta_shop/requestor/image.rb
presta_shop-0.1.1 lib/presta_shop/requestor/image.rb
presta_shop-0.1.0 lib/presta_shop/requestor/image.rb