Class: Lumberg::Cpanel::Mime

Inherits:
Base show all
Defined in:
lib/lumberg/cpanel/mime.rb

Overview

Public: Allows users to list mime types and handlers

Instance Attribute Summary

Attributes inherited from Base

#api_username

Attributes inherited from Whm::Base

#server

Instance Method Summary collapse

Methods inherited from Base

api_module, #initialize, #perform_request

Methods inherited from Whm::Base

#initialize, #setup_server

Constructor Details

This class inherits a constructor from Lumberg::Cpanel::Base

Instance Method Details

#handlers(options = {}) ⇒ Object

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



27
28
29
# File 'lib/lumberg/cpanel/mime.rb', line 27

def handlers(options = {})
  perform_request({ api_function: 'listhandlers' }.merge(options))
end

#list(options = {}) ⇒ Object

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



14
15
16
# File 'lib/lumberg/cpanel/mime.rb', line 14

def list(options = {})
  perform_request({ api_function: 'listmime' }.merge(options))
end