ug-domain-checker
v1.0.2
Published
A simple way to add .ug domain search to your application
Readme
Domain Checker
A simple Node.js library to check the availability of .ug domains using the registry.co.ug API.
Features
- Check the availability of multiple domains at once.
- Easily integrate into your Node.js projects.
- Secure API usage with API key authentication.
Installation
NPM
To install the library, run the following command:
npm install ug-domain-checkerUsage
- Generate an API Key from registry.co.ug.
- Use the following code to check domain availability:
const checkDomainAvailability = require('ug-domain-checker');
const domains = ['example1.co.ug', 'example2.co.ug', 'example3.co.ug'];
const apiKey = 'your-api-key-here';
checkDomainAvailability(domains, apiKey)
.then(data => {
console.log('Domain availability:', data);
})
.catch(error => {
console.error('Error:', error);
});Parameters
domains: An array of domain names (e.g.,['example1.co.ug', 'example2.co.ug']).apiKey: Your API key generated from registry.co.ug.
Response Example
The response will be an object indicating the availability of each domain:
{
"status": "success",
"data": [
{
"domain": "example1.co.ug",
"available": 1
},
{
"domain": "example2.co.ug",
"available": 0
}
]
}available:1means the domain is available,0means it's not available.
License
MIT License. See LICENSE for more details.
Contribution
Feel free to open issues or submit pull requests to improve this library. Contributions are welcome!
Contact
For any issues or questions, open an issue on the GitHub Repository or reach out to me on X.
