Class Api
In: api.rb
Parent: ApiCore

Methods

Public Class methods

Initizlize the Ruby Linode API

Parameters:

  APIKEY         - Unique key generated by Linode to access the commands
  DEBUG          - Set to true for debugging to be turned on
  BATCH          - This will be set to false, due to the methods included
                   with this library not being compatible with batching

Returns nothing

[Source]

# File api.rb, line 45
  def initialize(key, debug=false, batching=false)
    super
    @batching=false
  end

Public Instance methods

Retrieve the domain id of a domain

Parameters:

  DOMAIN         - The domain name you want the id for

RETURNS:

  The id of the domain you requested

[Source]

# File api.rb, line 58
  def getDomainIdByName domain
    domainList.find do |dom| 
      return dom["DOMAINID"] if dom["DOMAIN"].downcase == domain.downcase
    end
  end

[Validate]