-
-
17 May 2022 16:09:53 UTC
- Distribution: Net-DynDNS-GoDaddy
- Module version: 0.02
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (212 / 0 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: artistic_2
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (6.68KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Addr::MyIP
- File::HomeDir
- HTTP::Tiny
- IO::Socket::SSL
- JSON
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Net::DynDNS::GoDaddy - Provides Dynamic DNS functionality for your GoDaddy domains
SYNOPSIS
use Net::DynDNS::GoDaddy; use Addr::MyIP; my $hostname = 'home'; my $domain = 'example.com'; my $current_host_ip = host_ip_get($host, $domain); my $my_ip = myip(); if ($current_host_ip ne $my_ip) { host_ip_set($host, $domain, $my_ip); }
DESCRIPTION
For end-users, see the documentation for the update-ip binary.
Provides an interface to allow dynamically updating your GoDaddy domain's DNS name to IP mapping.
You must have a
~/godaddy_api.json
file containing your GoDaddy API key and secret, in the following format:{ "api_key": "KEY DATA", "api_secret": "API SECRET" }
The update-ip binary binary will do this for you automatically on first run.
FUNCTIONS
host_ip_get($host, $domain)
Returns the currently set IP address of the DNS A record for the host/domain pair.
Parameters:
$host
Mandatory, String: The name of the host, eg.
www
.$domain
Mandatory, String: The name of the domain, eg.
example.com
.Returns: String, the IP address that's currently set for the record.
host_ip_set($host, $domain, $ip)
Updates the DNS A record for the host/domain pair.
Parameters:
$host
Mandatory, String: The name of the host, eg.
www
.$domain
Mandatory, String: The name of the domain, eg.
example.com
.$ip
Mandatory, String: The IP address to set the record to eg.
192.168.10.10
.Returns: Bool,
1
on success,0
on failure.api_key_get
Fetch your GoDaddy API key and secret from the previously created
godaddy_api.json
in your home directory.Not exported by default, use the
qw(:all)
tag to access it.Croaks if the file can't be read.
Returns: A list of two scalars, the API key and the API secret.
api_key_set($key, $secret)
Creates the
godaddy_api.json
file in your home directory that contains your GoDaddy API key and secret.Not exported by default, use the
qw(:all)
tag to access it.Parameters:
$key
Mandatory, String: Your GoDaddy API key
$secret
Mandatory, String: Your GoDaddy API secret
Returns:
1
upon success.AUTHOR
Steve Bertrand,
<steveb at cpan.org>
LICENSE AND COPYRIGHT
Copyright 2022 Steve Bertrand.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
Module Install Instructions
To install Net::DynDNS::GoDaddy, copy and paste the appropriate command in to your terminal.
cpanm Net::DynDNS::GoDaddy
perl -MCPAN -e shell install Net::DynDNS::GoDaddy
For more information on module installation, please visit the detailed CPAN module installation guide.