Sha256: 832bfee41755e22d335994d5a88c9d39908f9d71960c8aed9b392a0adc6a31e6

Contents?: true

Size: 804 Bytes

Versions: 15

Compression:

Stored size: 804 Bytes

Contents

module Hetzner
  class API
    module Rdns
      # queries the reverse mapping status of one IP address
      def rdns?(ip)
        path = "/rdns/#{ip}"
        perform_get path
      end
      
      # creates or updates a reverse mapping record.
      # ptr contains a hostname
      def rdns!(ip, ptr)
        path = "/rdns/#{ip}"
        perform_post path, :query => { :ptr => ptr }
      end
      
      # creates a reverse mapping record. fails if already one exists
      # ptr contains a hostname
      def initialize_rdns!(ip, ptr)
        path = "/rdns/#{ip}"
        perform_put path, :query => { :ptr => ptr }
      end
      
      # delete the reverse mapping of one IP address
      def delete_rdns!(ip)
        path = "/rdns/#{ip}"
        perform_delete path
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hetzner-api-1.2.0 lib/hetzner/api/rdns.rb
hetzner-api-1.1.0 lib/hetzner/api/rdns.rb
hetzner-api-1.0.6 lib/hetzner/api/rdns.rb
hetzner-api-1.0.5 lib/hetzner/api/rdns.rb
hetzner-api-1.0.4 lib/hetzner/api/rdns.rb
hetzner-api-1.0.3 lib/hetzner/api/rdns.rb
hetzner-api-1.0.2 lib/hetzner/api/rdns.rb
hetzner-api-1.0.1 lib/hetzner/api/rdns.rb
hetzner-api-1.0.0 lib/hetzner/api/rdns.rb
hetzner-api-1.0.0.beta.2 lib/hetzner/api/rdns.rb
hetzner-api-1.0.0.beta.1 lib/hetzner/api/rdns.rb
hetzner-api-1.0.0.alpha.3 lib/hetzner/api/rdns.rb
hetzner-api-1.0.0.alpha.2 lib/hetzner/api/rdns.rb
hetzner-api-1.0.0.alpha.1 lib/hetzner-api/api/rdns.rb
hetzner-api-0.0.2 lib/api/rdns.rb