Sha256: f267774814dc4e05be4d47bf589119363807858271c20570a2592d35323f4fbf

Contents?: true

Size: 1.25 KB

Versions: 2

Compression:

Stored size: 1.25 KB

Contents

module Lumberg
  module Cpanel
    # Public: Allows users to list mime types and handlers
    class Mime < Base
      # Public: List mime types associated with Apache
      #
      # options - Hash options for API call params (default: {})
      #   :system - String parameter allows you to specify whether or not to
      #             only return system wide mime types (default: '')
      #   :user - String parameter allows you to specify whether or not to
      #             only return user defined mime types (default: '')
      #
      # Returns Hash API response
      def list(options = {})
        perform_request({ :api_function => 'listmime' }.merge(options))
      end

      # Public: List handlers associated with Apache
      #
      # options - Hash options for API call params (default: {})
      #   :system - String parameter allows you to specify whether or not to
      #             only return system wide handlers (default: '')
      #   :user - String parameter allows you to specify whether or not to
      #             only return user defined handlers (default: '')
      #
      # Returns Hash API response
      def handlers(options = {})
        perform_request({ :api_function => 'listhandlers' }.merge(options))
      end
    end
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lumberg-2.0.0.pre4 lib/lumberg/cpanel/mime.rb
lumberg-2.0.0.pre3 lib/lumberg/cpanel/mime.rb