Skip to content
Enom API - Ruby Wrapper
Branch: master
Clone or download
Latest commit a5f493a Jan 16, 2013
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib update httparty to deal with CVE-2013-0156 Jan 15, 2013
test fix issues with SynchAuthInfo Dec 3, 2012
.gitignore Don't check in Gemfile.lock Sep 10, 2011
.travis.yml
Gemfile Fix JRuby build Sep 10, 2011
LICENSE Update license date and test against more rubies Jan 2, 2013
README.md Update license date and test against more rubies Jan 2, 2013
Rakefile Rakefile fix, take 2 Sep 10, 2011
enom.gemspec update httparty to deal with CVE-2013-0156 Jan 15, 2013

README.md

Enom

A ruby wrapper for the Enom Domain Registrar's API for checking domain name availability, domain contact information, name server settings, etc.

gem install enom

Build Status

Enom provides an API for all of their services, unfortunately it's got hundreds of commands and it's pretty tough to test. This library aims to make calls to their API trivial and also makes it simple to continually add API commands without much effort.

Here are the basics that it covers so far:

Account Operations

# Set some initial values to allow connections to your account
Enom::Client.username = "foo"
Enom::Client.password = "bar"
Enom::Client.test = true
# Declaring test mode is optional, defaults to false (production)
# Test mode will run commands on Enom's reseller test platform

Once these are set, subsequent commands will make calls to the API using your credentials (HTTPS). Any methods in the library that charge or refund the account in any way end with a bang (!).

# Get account balance
Enom::Account.balance
# => 12.34

# Find a domain in your account
d = Enom::Domain.find("example.com")
# => #<Enom::Domain:0x1019f3b78...

# Check domain availability
Enom::Domain.check("example.com")
# => 'available'
Enom::Domain.check("google.com")
# => 'unavailable'

# Another way to check availability (boolean)
Enom::Domain.available?("example.com")
# => true

# Register a domain
d = Enom::Domain.register!("example.com")
# => #<Enom::Domain:0x1019f3b78...

# Delete a registration (domain must be less than 5 days old and your account
# must be on Enom's DeleteRegistration whitelist - your Enom account rep can
# enable it for you)
Enom::Domain.delete!("example.com")

Domain Operations

# Return the domain name
d.name
# => 'example.com'

# Check if domain is locked
d.locked?
# => true

# Check if domain is unlocked
d.unlocked?
# => false

# Unlock the domain for transfer
d.unlock

# Lock the domain to the registrar
d.lock

# Get name servers
d.nameservers
# => ['ns1.example.com', 'ns2.example.com', 'ns3.example.com']

# Update name servers
d.update_nameservers(['ns1.example.com', 'ns2.example.com', 'ns3.example.com'])

# Get expiration date
d.expiration_date
# => Returns a Date object

# Check if domain is expired
d.expired?
# => true

# Get registration status
d.registration_status
# => 'Registered' or 'Expired'

# Renew domain (defaults to 1 year)
d.renew!

# Renew domain for specific number of years
d.renew!(:years => 3)

Copyright

Copyright (c) 2011-2013 James Miller

You can’t perform that action at this time.