Hostrado API for Ruby
This is the official Hostrado API Ruby Gem to work with Hostrado's API endpoint.
Getting Started
Install the Library
Just install the library on your system by running:
gem install hostrado-api
Generate an API Token
You will now need an API key that can be generated for every Hostrado account on https://www.hostrado.com. Log in to the Customer Center
and navigate to the API Tokens page.
The instructions in the customer center should make it clear what to do next. In case you need assistance, please contact our support and we will assist you on this.
Basic Usage of this Library
Now that you have installed the library and obtained an API token, you can start using the library. Please check our Wiki page for all available methods in this gem.
Let's make a simple API call to list your domains you're owning on hostrado.com:
require 'hostrado-api'
hostrado_api_token = 'REPLACE_WITH_YOUR_API_TOKEN'
api = HostradoAPI::V1::Connection.new(hostrado_api_token)
api.domains.list.each do |domain|
puts "ID: #{domain.id}, Name: #{domain.name}, TLD: #{domain.tld}, Expires On: #{domain.expires_on}"
end
The output can look like this:
ID: 3, Name: hostrado.com, TLD: com, Expires On: 2020-01-28
ID: 4, Name: hostrado.net, TLD: net, Expires On: 2019-09-07
See how it easy it is? Have fun playing around and don't hesitate reaching out to us by opening a new GitHub issue or using our Forums.
Please also checkout our examples.
Contributions
Contributions are highly appreciated! Just fork this repository, do your changes and open a new pull request. We also very appreciate bug reports via the issue tracking tool here on GitHub ;-)