The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Build.PL 12
Changes 023
LICENSE 11
MANIFEST 11
META.json 77
META.yml 1111
README 1035
cpanfile 32
examples/dyndns.pl 815
lib/WebService/Linode/Base.pm 714
lib/WebService/Linode/DNS.pm 9818
lib/WebService/Linode.pm 148124
t/01-domains.t 31
t/pod-coverage.t 14
t/release-pod-syntax.t 31
15 files changed (This is a version diff) 302259
@@ -1,3 +1,4 @@
+# This Build.PL for WebService-Linode was generated by Dist::Zilla::Plugin::ModuleBuildTiny 0.006.
 use 5.008005;
-use Module::Build::Tiny 0.030;
+use Module::Build::Tiny 0.034;
 Build_PL();
@@ -1,5 +1,28 @@
 Revision history for Perl module WebService::Linode
 
+0.20  2014-03-13 11:42:49 EDT
+    - support for adding new private and public IPs to a Linode
+    - support for swapping/moving an IP between Linodes
+    - moar deprecated WebService::Linode::DNS
+      - all methods carp
+      - most of POD replaced, points to WebService::Linode
+    - add LWP to cpanfile for CPANTS
+
+0.19  2014-02-09 00:28:23 EST
+    - depend on just LWP::Protocol::https instead of LWP::UserAgent,
+      Crypt::SSLeay, & Mozilla::CA, thanks Christopher Meng (cicku)
+    - Update FSF mailing address in LICENSE, thanks Christopher Meng (cicku)
+
+0.18  2014-02-04 11:36:24 EST
+    - API 2 factor authentication support, see:
+    <https://blog.linode.com/2014/02/03/linode-api-multiple-keys-and-two-factor/>
+
+0.17  2014-01-24 09:30:48 EST
+    - remove deprecated getDomainIDbyName & getDomainResourceIDbyName
+    - allow setting API url via ENV var LINODE_API_URL
+    - paymentterm is optional for linode.create and linode.clone
+    - update examples/dyndns.pl to remove use of deprecated functions
+
 0.16  2014-01-06 09:59:02 EST
     - useragent arg to constructor for custom user agent header
 
@@ -22,7 +22,7 @@ This is free software, licensed under:
                      Version 1, February 1989
 
  Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Suite 500, Boston, MA  02110-1335  USA
+ 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.008.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.013.
 Build.PL
 Changes
 LICENSE
@@ -4,7 +4,7 @@
       "=over"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Milla version v1.0.4, Dist::Zilla version 5.008, CPAN::Meta::Converter version 2.120921",
+   "generated_by" : "Dist::Milla version v1.0.4, Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.120921",
    "license" : [
       "perl_5"
    ],
@@ -26,7 +26,7 @@
    "prereqs" : {
       "configure" : {
          "requires" : {
-            "Module::Build::Tiny" : "0.030"
+            "Module::Build::Tiny" : "0.034"
          }
       },
       "develop" : {
@@ -37,10 +37,9 @@
       },
       "runtime" : {
          "requires" : {
-            "Crypt::SSLeay" : "0",
             "JSON" : "2.00",
-            "LWP::UserAgent" : "0",
-            "Mozilla::CA" : "0",
+            "LWP" : "0",
+            "LWP::Protocol::https" : "0",
             "perl" : "5.008005"
          }
       },
@@ -62,11 +61,12 @@
          "web" : "https://github.com/mikegrb/WebService-Linode"
       }
    },
-   "version" : "0.16",
+   "version" : "0.20",
    "x_contributors" : [
       "Neil Bowers <neil@bowers.com>",
       "Stan Schwertly <stan@schwertly.com>",
-      "mikegrb <michael@thegrebs.com>"
+      "mikegrb <michael@thegrebs.com>",
+      "trevorparker <trevor@trevorparker.com>"
    ]
 }
 
@@ -1,17 +1,17 @@
 ---
 abstract: 'Perl Interface to the Linode.com API.'
 author:
-  - '=over'
+  - =over
 build_requires:
-  Test::More: 0.88
+  Test::More: '0.88'
 configure_requires:
-  Module::Build::Tiny: 0.030
+  Module::Build::Tiny: '0.034'
 dynamic_config: 0
-generated_by: 'Dist::Milla version v1.0.4, Dist::Zilla version 5.008, CPAN::Meta::Converter version 2.120921'
+generated_by: 'Dist::Milla version v1.0.4, Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.120921'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: WebService-Linode
 no_index:
   directory:
@@ -22,17 +22,17 @@ no_index:
     - eg
     - examples
 requires:
-  Crypt::SSLeay: 0
-  JSON: 2.00
-  LWP::UserAgent: 0
-  Mozilla::CA: 0
-  perl: 5.008005
+  JSON: '2.00'
+  LWP: '0'
+  LWP::Protocol::https: '0'
+  perl: '5.008005'
 resources:
   bugtracker: https://github.com/mikegrb/WebService-Linode/issues
   homepage: https://github.com/mikegrb/WebService-Linode
   repository: https://github.com/mikegrb/WebService-Linode.git
-version: 0.16
+version: '0.20'
 x_contributors:
   - 'Neil Bowers <neil@bowers.com>'
   - 'Stan Schwertly <stan@schwertly.com>'
   - 'mikegrb <michael@thegrebs.com>'
+  - 'trevorparker <trevor@trevorparker.com>'
@@ -12,6 +12,10 @@ SYNOPSIS
     otherwise the same. For additional information see
     <http://www.linode.com/api/>
 
+Constructor
+    For documentation of possible arguments to the constructor, see
+    WebService::Linode::Base.
+
 Methods from the Linode API
    avail_stackscripts
     Optional Parameters:
@@ -182,10 +186,12 @@ Methods from the Linode API
 
     *   datacenterid
 
-    *   paymentterm
-
     *   planid
 
+    Optional Parameters:
+
+    *   paymentterm
+
    linode_reboot
     Required Parameters:
 
@@ -223,10 +229,12 @@ Methods from the Linode API
 
     *   linodeid
 
-    *   paymentterm
-
     *   planid
 
+    Optional Parameters:
+
+    *   paymentterm
+
    linode_shutdown
     Required Parameters:
 
@@ -465,11 +473,27 @@ Methods from the Linode API
 
     *   diskid
 
+   linode_ip_swap
+    Required Parameters:
+
+    *   ipaddressid
+
+    Optional Parameters:
+
+    *   tolinodeid
+
+    *   withipaddressid
+
    linode_ip_addprivate
     Required Parameters:
 
     *   linodeid
 
+   linode_ip_addpublic
+    Required Parameters:
+
+    *   linodeid
+
    linode_ip_list
     Required Parameters:
 
@@ -572,6 +596,8 @@ Methods from the Linode API
 
     *   configid
 
+    *   nodebalancerid
+
    nodebalancer_config_update
     Required Parameters:
 
@@ -663,14 +689,13 @@ Methods from the Linode API
 
     *   username
 
-Additional Helper Methods
-    These methods are deprecated and will be going away.
+    Optional Parameters:
+
+    *   expires
 
-   getDomainIDbyName( domain => 'example.com' )
-    Returns the ID for a domain given the name.
+    *   label
 
-   getDomainResourceIDbyName( domainid => 242, name => 'www')
-    Takes a record name and domainid or domain and returns the resourceid.
+    *   token
 
 AUTHORS
     *   Michael Greb, "<mgreb@linode.com>"
@@ -1,8 +1,7 @@
 requires 'perl', '5.008005';
 requires 'JSON', '2.00';
-requires 'LWP::UserAgent';
-requires 'Crypt::SSLeay';
-requires 'Mozilla::CA';
+requires 'LWP::Protocol::https';
+requires 'LWP'; # for cpants :<
 
 on test => sub {
     requires 'Test::More', '0.88';
@@ -18,7 +18,7 @@ my $ipfile = '/home/username/.lastip';    # file to store last IP between runs
 my $pubip = get('http://ip.thegrebs.com/') or exit 1;
 my $oldip = `cat  $ipfile`;
 
-for ($pubip, $oldip) { chomp if $_ }
+for ( $pubip, $oldip ) { chomp if $_ }
 
 # exit if no change
 exit 0 if $oldip eq $pubip;
@@ -27,13 +27,20 @@ exit 0 if $oldip eq $pubip;
 # public ip
 my $api = WebService::Linode->new( apikey => $apikey );
 
-my $domainid = $api->getDomainIDbyName($domain);
-die "Couldn't find Domain ID for $domain\n" unless $domainid;
+my ($domainrec) = grep { $_->{domain} eq $domain } @{ $api->domain_list };
+die "Couldn't find domain $domain\n" unless $domainrec;
 
-my $resourceid = $api->getDomainResourceIDbyName(domainid => $domainid, name => $record);
-die "Couldn't find RR id for $record\n" unless $resourceid;
+my ($resourcerec)
+    = grep { $_->{name} eq $record }
+    @{ $api->domain_resource_list( domainid => $domainrec->{domainid} ) };
+die "Couldn't find resource for $record\n" unless $resourcerec;
 
-my $result = $api->domain_resource_update(domainid=> $domainid, resourceid => $resourceid, target => $pubip);
-die "Error updating RR :<" unless $result->{resourceid} == $resourceid;
+my $result = $api->domain_resource_update(
+    domainid   => $domainrec->{domainid},
+    resourceid => $resourcerec->{resourceid},
+    target     => $pubip
+);
+die "Error updating RR :<"
+    unless $result->{resourceid} == $resourcerec->{resourceid};
 
-system "echo '$pubip' > $ipfile";
\ No newline at end of file
+system "echo '$pubip' > $ipfile";
@@ -15,7 +15,7 @@ WebService::Linode::Base - Perl Interface to the Linode.com API.
 
 =cut
 
-our $VERSION = '0.16';
+our $VERSION = '0.20';
 our $err;
 our $errstr;
 
@@ -23,13 +23,16 @@ sub new {
     my ($package, %args) = @_;
     my $self;
 
-    $self->{_apikey}    = $args{apikey} if $args{apikey};
+    $self->{_apikey}  = $args{apikey} if $args{apikey};
 
-    $self->{_nocache}   = $args{nocache}    || 0;
-    $self->{_debug}     = $args{debug}      || 0;
-    $self->{_fatal}     = $args{fatal}      || 0;
-    $self->{_nowarn}    = $args{nowarn}     || 0;
-    $self->{_apiurl}    = $args{apiurl} || 'https://api.linode.com/api/';
+    $self->{_nocache} = $args{nocache} || 0;
+    $self->{_debug}   = $args{debug}   || 0;
+    $self->{_fatal}   = $args{fatal}   || 0;
+    $self->{_nowarn}  = $args{nowarn}  || 0;
+    $self->{_apiurl}  = $args{apiurl}  || 'https://api.linode.com/api/';
+
+    # env api url supercedes all
+    $self->{_apiurl}  = $ENV{LINODE_API_URL} if $ENV{LINODE_API_URL};
 
     $self->{_ua} = LWP::UserAgent->new;
     $self->{_ua}->agent("WebService::Linode::Base/$WebService::Linode::Base::VERSION ");
@@ -157,6 +160,10 @@ verbose is 0-10 with 10 being the most and 0 being none
 useragent if passed gets passed on to the LWP::UserAgent agent method to set
 a custom user agent header on HTTP requests.
 
+apiurl if passed overides the default URL for API requests.  You may also use
+the environment variable LINODE_API_URL.  If set, the environment variable
+supersedes any apiurl argument supplied to the constructor, useful for testing.
+
 =head2 send_request
 
 Sends a request to the API, takes a hash of name=>value pairs.  Returns an
@@ -8,14 +8,15 @@ use WebService::Linode::Base;
 
 =head1 NAME
 
-WebService::Linode::DNS - Perl Interface to the Linode.com API DNS methods.
+WebService::Linode::DNS - Deprecated Perl Interface to the Linode.com API DNS methods.
 
 =cut
 
-our $VERSION = '0.16';
+our $VERSION = '0.20';
 our @ISA = ("WebService::Linode::Base");
 
 sub getDomainIDbyName {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my $self = shift;
 	my $name = shift;
 	$self->_debug(10, 'getDomainIDbyName called for: ' . $name);
@@ -36,6 +37,7 @@ sub getDomainIDbyName {
 }
 
 sub domainList {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my $self = shift;
 	$self->_debug(10, 'domainList called');
 
@@ -56,6 +58,7 @@ sub domainList {
 }
 
 sub domainGet {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'domainGet called');
 	my $domainid;
@@ -82,6 +85,7 @@ sub domainGet {
 }
 
 sub domainCreate {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'domainCreate called');
 
@@ -92,12 +96,14 @@ sub domainCreate {
 }
 
 sub domainSave {
+    carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
     my ($self, %args) = @_;
     carp "Deprecated use of domainSave, use domainCreate";
     return $self->domainCreate(%args);
 }
 
 sub domainUpdate {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'domainUpdate called');
 
@@ -116,6 +122,7 @@ sub domainUpdate {
 }
 
 sub domainDelete {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'domainDelete called');
 
@@ -131,6 +138,7 @@ sub domainDelete {
 }
 
 sub domainResourceList {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'domainResourceList called');
 	my $domainid;
@@ -163,6 +171,7 @@ sub domainResourceList {
 }
 
 sub domainResourceGet {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'domainResourceGet called');
 
@@ -194,6 +203,7 @@ sub domainResourceGet {
 }
 
 sub getResourceIDbyName {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'getResourceIDbyName called');
 
@@ -214,6 +224,7 @@ sub getResourceIDbyName {
 }
 
 sub domainResourceCreate {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'domainResourceCreate called');
 
@@ -224,6 +235,7 @@ sub domainResourceCreate {
 }
 
 sub domainResourceSave {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'domainResourceCreate called');
 
@@ -233,6 +245,7 @@ sub domainResourceSave {
 }
 
 sub domainResourceUpdate {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'domainResourceUpdate called');
 
@@ -245,6 +258,7 @@ sub domainResourceUpdate {
 }
 
 sub domainResourceDelete {
+	carp "WebService::Linode::DNS is deprecated, use WebService::Linode instead!";
 	my ($self, %args) = @_;
 	$self->_debug(10, 'domainResourceDelete called');
 
@@ -261,106 +275,12 @@ sub domainResourceDelete {
 
 =head1 SYNOPSIS
 
-THIS MODULE IS DEPRECATED, DON'T USE IT, USE WebService::Linode
-
-This module provides a simple OOish interface to the Linode.com API.
-
-Example usage:
-
-	use WebService::Linode::DNS;
-
-	my $api = WebService::Linode::DNS->new(apikey => 'mmmcake');
-	for my $domain (@{$api->domainList}) {
-		print $domain->{domainid}, "\n";
-	}
+THIS MODULE IS DEPRECATED, DON'T USE IT, USE L<WebService::Linode>
 
 =head1 METHODS
 
-=head2 new
-
-All methods take the same parameters as the Linode API itself does.  Field
-names should be lower cased.  All caps fields from the Linode API will be
-lower cased before returning the data.
-
-Accepts a hash as an argument.  apikey is the only required parameter
-specifying your Linode API key.
-
-Errors mirror the perl DBI error handling method.
-$WebService::Linode::DNS::err and ::errstr will be populated with the last error
-number and string that occurred.  All errors generated within the module
-are currently error code -1.  By default, will warn on errors as well, pass
-a true value for fatal to die instead or nowarn to prevent the warnings.
-
-verbose is 0-10 with 10 being the most and 0 being none
-
-nocache disables some cacheing of domainname -> domainid
-
-=head2 domainList
-
-Returns a reference to an array.  The array contains one entry per domain
-containing a reference to a hash with the data for that domain.  Keys in the
-hash use the same names returned by the Linode API though the names have been
-converted to lower-case.
-
-=head2 domainSave
-
-=head2 domainGet
-
-Requires domainid or domain passed in as args.  'domain' is the name of the
-zone and will be mapped to domainid before executing the API method.
-Returns a reference to a hash.  The hash contains the data for the domain
-returned by the Linode API with the keys lower cased.
-
-=head2 getDomainIDbyName
-
-Returns the ID for a domain given the name.
-
-=head2 domainCreate
-
-Requires domainid, use 0 to create a domain.
-
-=head2 domainUpdate
-
-Requires domainid, grabs current data, overwrites passed values then calls
-domainSave for you.
-
-=head2 domainDelete
-
-Requires domainid, deletes the domain
-
-=head2 domainResourceCreate
-
-=head2 domainResourceList
-
-Requires domainid or domain passed in as args.  'domain' is the name of the
-zone and will be mapped to domainid before executing the API method. 
-Returns a reference to an array.  The array contains one entry per domain
-containing a reference to a hash with the data for that domain.  Keys in the
-hash use the same names returned by the Linode API though the names have been
-converted to lower-case.
-
-=head2 domainResourceGet
-
-Requires domainid and resourceid.
-Returns a reference to a hash.  The hash contains the data for the resource
-record returned by the Linode API with the keys lower cased.
-
-=head2 getResourceIDbyName
-
-Takes a record name and domainid or domain and returns the resourceid
-
-=head2 domainResourceSave
-
-Requires domainid and resourceid.  Use 0 for resourceid to create.
-
-=head2 domainResourceUpdate
-
-Requires resourceid, grabs current data, overwrites passed values then calls
-domainResourceSave for you.
-
-=head2 domainResourceDelete
+If you are still reading, you are doing it wrong! Go here L<WebService::Linode>
 
-Requires resourceid, deletes the resource record.
 
 =head1 AUTHOR
 
@@ -9,149 +9,107 @@ use Carp;
 use List::Util qw(first);
 use WebService::Linode::Base;
 
-our $VERSION = '0.16';
+our $VERSION = '0.20';
 our @ISA     = ("WebService::Linode::Base");
 our $AUTOLOAD;
 
 my %validation = (
     account => {
-        estimateinvoice => [ ['mode'], [qw( linodeid paymentterm planid )] ],
-        info            => [ [],       [] ],
-        paybalance      => [ [],       [] ],
+        estimateinvoice => [ [ 'mode' ], [qw( linodeid paymentterm planid )] ],
+        info => [ [], [] ],
+        paybalance => [ [], [] ],
         updatecard => [ [qw( ccexpmonth ccexpyear ccnumber )], [] ],
     },
-    api => { spec => [ [], [] ], },
+    api => {
+        spec => [ [], [] ],
+    },
     avail => {
-        datacenters   => [ [], [] ],
-        distributions => [ [], ['distributionid'] ],
-        kernels       => [ [], [ 'isxen', 'kernelid' ] ],
-        linodeplans   => [ [], ['planid'] ],
-        stackscripts =>
-            [ [], [qw( distributionid distributionvendor keywords )] ],
+        datacenters => [ [], [] ],
+        distributions => [ [], [ 'distributionid' ] ],
+        kernels => [ [], [ 'isxen', 'kernelid' ] ],
+        linodeplans => [ [], [ 'planid' ] ],
+        stackscripts => [ [], [qw( distributionid distributionvendor keywords )] ],
     },
     domain => {
-        create => [
-            [ 'domain', 'type' ],
-            [   qw( axfr_ips description expire_sec lpm_displaygroup master_ips refresh_sec retry_sec soa_email status ttl_sec )
-            ]
-        ],
-        delete => [ ['domainid'], [] ],
-        list   => [ [],           ['domainid'] ],
-        update => [
-            ['domainid'],
-            [   qw( axfr_ips description domain expire_sec lpm_displaygroup master_ips refresh_sec retry_sec soa_email status ttl_sec type )
-            ]
-        ],
+        create => [ [ 'domain', 'type' ], [qw( axfr_ips description expire_sec lpm_displaygroup master_ips refresh_sec retry_sec soa_email status ttl_sec )] ],
+        delete => [ [ 'domainid' ], [] ],
+        list => [ [], [ 'domainid' ] ],
+        update => [ [ 'domainid' ], [qw( axfr_ips description domain expire_sec lpm_displaygroup master_ips refresh_sec retry_sec soa_email status ttl_sec type )] ],
     },
     domain_resource => {
-        create => [
-            [qw( domainid type )],
-            [qw( name port priority protocol target ttl_sec weight )]
-        ],
+        create => [ [ 'domainid', 'type' ], [qw( name port priority protocol target ttl_sec weight )] ],
         delete => [ [ 'domainid', 'resourceid' ], [] ],
-        list => [ ['domainid'], ['resourceid'] ],
-        update => [
-            ['resourceid'],
-            [qw( domainid name port priority protocol target ttl_sec weight )]
-        ],
+        list => [ [ 'domainid' ], [ 'resourceid' ] ],
+        update => [ [ 'resourceid' ], [qw( domainid name port priority protocol target ttl_sec weight )] ],
     },
     linode => {
-        boot => [ ['linodeid'], ['configid'] ],
-        clone => [ [qw( datacenterid linodeid paymentterm planid )], [] ],
-        create => [ [qw( datacenterid paymentterm planid )], [] ],
-        delete => [ ['linodeid'], ['skipchecks'] ],
-        list   => [ [],           ['linodeid'] ],
-        mutate => [ ['linodeid'], [] ],
-        reboot => [ ['linodeid'], ['configid'] ],
+        boot => [ [ 'linodeid' ], [ 'configid' ] ],
+        clone => [ [qw( datacenterid linodeid planid )], [ 'paymentterm' ] ],
+        create => [ [ 'datacenterid', 'planid' ], [ 'paymentterm' ] ],
+        delete => [ [ 'linodeid' ], [ 'skipchecks' ] ],
+        list => [ [], [ 'linodeid' ] ],
+        mutate => [ [ 'linodeid' ], [] ],
+        reboot => [ [ 'linodeid' ], [ 'configid' ] ],
         resize => [ [ 'linodeid', 'planid' ], [] ],
-        shutdown => [ ['linodeid'], [] ],
-        update => [
-            ['linodeid'],
-            [   qw( alert_bwin_enabled alert_bwin_threshold alert_bwout_enabled alert_bwout_threshold alert_bwquota_enabled alert_bwquota_threshold alert_cpu_enabled alert_cpu_threshold alert_diskio_enabled alert_diskio_threshold backupweeklyday backupwindow label lpm_displaygroup ms_ssh_disabled ms_ssh_ip ms_ssh_port ms_ssh_user watchdog )
-            ]
-        ],
-        webconsoletoken => [ ['linodeid'], [] ],
+        shutdown => [ [ 'linodeid' ], [] ],
+        update => [ [ 'linodeid' ], [qw( alert_bwin_enabled alert_bwin_threshold alert_bwout_enabled alert_bwout_threshold alert_bwquota_enabled alert_bwquota_threshold alert_cpu_enabled alert_cpu_threshold alert_diskio_enabled alert_diskio_threshold backupweeklyday backupwindow label lpm_displaygroup ms_ssh_disabled ms_ssh_ip ms_ssh_port ms_ssh_user watchdog )] ],
+        webconsoletoken => [ [ 'linodeid' ], [] ],
     },
     linode_config => {
-        create => [
-            [qw( kernelid label linodeid )],
-            [   qw( comments devtmpfs_automount disklist helper_depmod helper_disableupdatedb helper_xen ramlimit rootdevicecustom rootdevicenum rootdevicero runlevel )
-            ]
-        ],
+        create => [ [qw( kernelid label linodeid )], [qw( comments devtmpfs_automount disklist helper_depmod helper_disableupdatedb helper_xen ramlimit rootdevicecustom rootdevicenum rootdevicero runlevel )] ],
         delete => [ [ 'configid', 'linodeid' ], [] ],
-        list => [ ['linodeid'], ['configid'] ],
-        update => [
-            ['configid'],
-            [   qw( comments devtmpfs_automount disklist helper_depmod helper_disableupdatedb helper_xen kernelid label linodeid ramlimit rootdevicecustom rootdevicenum rootdevicero runlevel )
-            ]
-        ],
+        list => [ [ 'linodeid' ], [ 'configid' ] ],
+        update => [ [ 'configid' ], [qw( comments devtmpfs_automount disklist helper_depmod helper_disableupdatedb helper_xen kernelid label linodeid ramlimit rootdevicecustom rootdevicenum rootdevicero runlevel )] ],
     },
     linode_disk => {
         create => [ [qw( label linodeid size type )], [] ],
-        createfromdistribution => [
-            [qw( distributionid label linodeid rootpass size )],
-            ['rootsshkey']
-        ],
-        createfromstackscript => [
-            [   qw( distributionid label linodeid rootpass size stackscriptid stackscriptudfresponses )
-            ],
-            []
-        ],
-        delete    => [ [ 'diskid', 'linodeid' ], [] ],
+        createfromdistribution => [ [qw( distributionid label linodeid rootpass size )], [ 'rootsshkey' ] ],
+        createfromstackscript => [ [qw( distributionid label linodeid rootpass size stackscriptid stackscriptudfresponses )], [] ],
+        delete => [ [ 'diskid', 'linodeid' ], [] ],
         duplicate => [ [ 'diskid', 'linodeid' ], [] ],
-        list => [ ['linodeid'], ['diskid'] ],
+        list => [ [ 'linodeid' ], [ 'diskid' ] ],
         resize => [ [qw( diskid linodeid size )], [] ],
-        update => [ ['diskid'], [qw( isreadonly label linodeid )] ],
+        update => [ [ 'diskid' ], [qw( isreadonly label linodeid )] ],
     },
     linode_ip => {
-        addprivate => [ ['linodeid'], [] ],
-        list       => [ ['linodeid'], ['ipaddressid'] ],
+        addprivate => [ [ 'linodeid' ], [] ],
+        addpublic => [ [ 'linodeid' ], [] ],
+        list => [ [ 'linodeid' ], [ 'ipaddressid' ] ],
+        swap => [ [ 'ipaddressid' ], [ 'tolinodeid', 'withipaddressid' ] ],
+    },
+    linode_job => {
+        list => [ [ 'linodeid' ], [ 'jobid', 'pendingonly' ] ],
     },
-    linode_job => { list => [ ['linodeid'], [ 'jobid', 'pendingonly' ] ], },
     nodebalancer => {
-        create => [
-            [ 'datacenterid',       'paymentterm' ],
-            [ 'clientconnthrottle', 'label' ]
-        ],
-        delete => [ ['nodebalancerid'], [] ],
-        list   => [ [],                 ['nodebalancerid'] ],
-        update => [ ['nodebalancerid'], [ 'clientconnthrottle', 'label' ] ],
+        create => [ [ 'datacenterid', 'paymentterm' ], [ 'clientconnthrottle', 'label' ] ],
+        delete => [ [ 'nodebalancerid' ], [] ],
+        list => [ [], [ 'nodebalancerid' ] ],
+        update => [ [ 'nodebalancerid' ], [ 'clientconnthrottle', 'label' ] ],
     },
     nodebalancer_config => {
-        create => [
-            ['nodebalancerid'],
-            [   qw( algorithm check check_attempts check_body check_interval check_path check_timeout port protocol ssl_cert ssl_key stickiness )
-            ]
-        ],
-        delete => [ ['configid'],       [] ],
-        list   => [ ['nodebalancerid'], ['configid'] ],
-        update => [
-            ['configid'],
-            [   qw( algorithm check check_attempts check_body check_interval check_path check_timeout port protocol ssl_cert ssl_key stickiness )
-            ]
-        ],
+        create => [ [ 'nodebalancerid' ], [qw( algorithm check check_attempts check_body check_interval check_path check_timeout port protocol ssl_cert ssl_key stickiness )] ],
+        delete => [ [ 'configid', 'nodebalancerid' ], [] ],
+        list => [ [ 'nodebalancerid' ], [ 'configid' ] ],
+        update => [ [ 'configid' ], [qw( algorithm check check_attempts check_body check_interval check_path check_timeout port protocol ssl_cert ssl_key stickiness )] ],
     },
     nodebalancer_node => {
         create => [ [qw( address configid label )], [ 'mode', 'weight' ] ],
-        delete => [ ['nodeid'],                     [] ],
-        list   => [ ['configid'],                   ['nodeid'] ],
-        update => [ ['nodeid'], [qw( address label mode weight )] ],
+        delete => [ [ 'nodeid' ], [] ],
+        list => [ [ 'configid' ], [ 'nodeid' ] ],
+        update => [ [ 'nodeid' ], [qw( address label mode weight )] ],
     },
     stackscript => {
-        create => [
-            [qw( distributionidlist label script )],
-            [qw( description ispublic rev_note )]
-        ],
-        delete => [ ['stackscriptid'], [] ],
-        list   => [ [],                ['stackscriptid'] ],
-        update => [
-            ['stackscriptid'],
-            [   qw( description distributionidlist ispublic label rev_note script )
-            ]
-        ],
+        create => [ [qw( distributionidlist label script )], [qw( description ispublic rev_note )] ],
+        delete => [ [ 'stackscriptid' ], [] ],
+        list => [ [], [ 'stackscriptid' ] ],
+        update => [ [ 'stackscriptid' ], [qw( description distributionidlist ispublic label rev_note script )] ],
+    },
+    test => {
+        echo => [ [], [] ],
+    },
+    user => {
+        getapikey => [ [ 'password', 'username' ], [qw( expires label token )] ],
     },
-    test => { echo => [ [], [] ], },
-    user => { getapikey => [ [ 'password', 'username' ], [] ], },
 );
 
 sub AUTOLOAD {
@@ -196,37 +154,6 @@ sub AUTOLOAD {
     croak "Undefined subroutine \&$AUTOLOAD called";
 }
 
-sub getDomainIDbyName {
-    carp "WebService::Linode::getDomainIDbyName() is deprecated and going away.";
-    my ( $self, $name ) = @_;
-    foreach my $domain ( @{ $self->domain_list() } ) {
-        return $domain->{domainid} if $domain->{domain} eq $name;
-    }
-    return;
-}
-
-sub getDomainResourceIDbyName {
-    carp "WebService::Linode::getDomainResourceIDbyName() is deprecated and going away.";
-    my ( $self, %args ) = @_;
-    $self->_debug( 10, 'getResourceIDbyName called' );
-
-    my $domainid = $args{domainid};
-    if ( !exists( $args{domainid} ) && exists( $args{domain} ) ) {
-        $domainid = $self->getDomainIDbyName( $args{domain} );
-    }
-
-    if ( !( defined($domainid) && exists( $args{name} ) ) ) {
-        $self->_error( -1,
-            'Must pass domain or domainid and (resource) name to getResourceIDbyName'
-        );
-        return;
-    }
-
-    for my $rr ( @{ $self->domain_resource_list( domainid => $domainid ) } ) {
-        return $rr->{resourceid} if $rr->{name} eq $args{name};
-    }
-}
-
 'mmm, cake';
 __END__
 
@@ -245,6 +172,11 @@ dots replaced with underscores to generate the perl method name.  All keys
 and parameters have been lower cased but returned data remains otherwise the
 same.  For additional information see L<http://www.linode.com/api/>
 
+=head1 Constructor
+
+For documentation of possible arguments to the constructor, see
+L<WebService::Linode::Base>.
+
 =head1 Methods from the Linode API
 
 =head3 avail_stackscripts
@@ -505,12 +437,18 @@ Required Parameters:
 
 =item * datacenterid
 
-=item * paymentterm
-
 =item * planid
 
 =back
 
+Optional Parameters:
+
+=over 4
+
+=item * paymentterm
+
+=back
+
 =head3 linode_reboot
 
 Required Parameters:
@@ -579,12 +517,18 @@ Required Parameters:
 
 =item * linodeid
 
-=item * paymentterm
-
 =item * planid
 
 =back
 
+Optional Parameters:
+
+=over 4
+
+=item * paymentterm
+
+=back
+
 =head3 linode_shutdown
 
 Required Parameters:
@@ -935,6 +879,26 @@ Optional Parameters:
 
 =back
 
+=head3 linode_ip_swap
+
+Required Parameters:
+
+=over 4
+
+=item * ipaddressid
+
+=back
+
+Optional Parameters:
+
+=over 4
+
+=item * tolinodeid
+
+=item * withipaddressid
+
+=back
+
 =head3 linode_ip_addprivate
 
 Required Parameters:
@@ -945,6 +909,16 @@ Required Parameters:
 
 =back
 
+=head3 linode_ip_addpublic
+
+Required Parameters:
+
+=over 4
+
+=item * linodeid
+
+=back
+
 =head3 linode_ip_list
 
 Required Parameters:
@@ -1105,6 +1079,8 @@ Required Parameters:
 
 =item * configid
 
+=item * nodebalancerid
+
 =back
 
 =head3 nodebalancer_config_update
@@ -1253,17 +1229,17 @@ Required Parameters:
 
 =back
 
-=head1 Additional Helper Methods
+Optional Parameters:
 
-These methods are deprecated and will be going away.
+=over 4
 
-=head3 getDomainIDbyName( domain => 'example.com' )
+=item * expires
 
-Returns the ID for a domain given the name.
+=item * label
 
-=head3 getDomainResourceIDbyName( domainid => 242, name => 'www')
+=item * token
 
-Takes a record name and domainid or domain and returns the resourceid.
+=back
 
 =head1 AUTHORS
 
@@ -9,7 +9,7 @@ if($@) {
 	plan skip_all => "Test::MockObject required for these tests" if $@;
 }
 else {
-	plan tests => 5
+	plan tests => 4
 }
 
 my $ua = Test::MockObject->new();
@@ -40,8 +40,6 @@ $response->set_always( 'content', scalar(<DATA>));
 $expected = eval scalar(<DATA>);
 is_deeply($api->domain_list(), $expected, 'domain_list');
 
-is ($api->getDomainIDbyName('apitest.com'), 5118, 'getDomainIDbyName');
-
 $response->set_always( 'content', scalar(<DATA>));
 $expected = eval scalar(<DATA>);
 is_deeply($api->domain_list(domainid=>5117), $expected, 'domain_list(domainid=>5117)');
@@ -15,4 +15,7 @@ eval "use Pod::Coverage $min_pc";
 plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
     if $@;
 
-all_pod_coverage_ok();
+pod_coverage_ok("WebService::Linode");
+pod_coverage_ok("WebService::Linode::Base");
+
+done_testing();
@@ -9,8 +9,6 @@ BEGIN {
 
 # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
 use Test::More;
-
-eval "use Test::Pod 1.41";
-plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
+use Test::Pod 1.41;
 
 all_pod_files_ok();