Class: Lumberg::Cpanel::RandomData
- Defined in:
 - lib/lumberg/cpanel/random_data.rb
 
Overview
Public: Allows you to create random data
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Whm::Base
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #show(options = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Public: Retrieve a random string.
 
Methods inherited from Base
Methods inherited from Whm::Base
Constructor Details
This class inherits a constructor from Lumberg::Cpanel::Base
Class Method Details
.api_module ⇒ Object
      5  | 
    
      # File 'lib/lumberg/cpanel/random_data.rb', line 5 def self.api_module; "Rand" ; end  | 
  
Instance Method Details
#show(options = {}) ⇒ Object
Public: Retrieve a random string
options - Hash options for API call params (default: {})
:length - Integer length of the random string you wish to receive
Examples
api_args = { host: "x.x.x.x", hash: "pass", api_username: "user" }
random_data = Lumberg::Cpanel::RandomData.new(api_args.dup)
random_data.show
Returns Hash API response
      19 20 21  | 
    
      # File 'lib/lumberg/cpanel/random_data.rb', line 19 def show( = {}) perform_request({ api_function: 'getranddata' }.merge()) end  |