1## Domain Registry Interface, Gandi Registry Driver
2##
3## Copyright (c) 2005,2008,2009 Patrick Mevzek <netdri@dotandco.com>. All rights reserved.
4##
5## This file is part of Net::DRI
6##
7## Net::DRI is free software; you can redistribute it and/or modify
8## it under the terms of the GNU General Public License as published by
9## the Free Software Foundation; either version 2 of the License, or
10## (at your option) any later version.
11##
12## See the LICENSE file that comes with this distribution for more details.
13#
14#
15#
16####################################################################################################
17
18package Net::DRI::DRD::Gandi;
19
20use strict;
21use warnings;
22
23use base qw/Net::DRI::DRD/;
24
25our $VERSION=do { my @r=(q$Revision: 1.6 $=~/\d+/g); sprintf("%d".".%02d" x $#r, @r); };
26
27=pod
28
29=head1 NAME
30
31Net::DRI::DRD::Gandi - Gandi Registry driver for Net::DRI
32
33=head1 DESCRIPTION
34
35Please see the README file for details.
36
37=head1 CURRENT LIMITATIONS
38
39Only domain_info and account_list_domains are implemented for now
40
41=head1 SUPPORT
42
43For now, support questions should be sent to:
44
45E<lt>netdri@dotandco.comE<gt>
46
47Please also see the SUPPORT file in the distribution.
48
49=head1 SEE ALSO
50
51E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
52
53=head1 AUTHOR
54
55Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
56
57=head1 COPYRIGHT
58
59Copyright (c) 2005,2008,2009 Patrick Mevzek <netdri@dotandco.com>.
60All rights reserved.
61
62This program is free software; you can redistribute it and/or modify
63it under the terms of the GNU General Public License as published by
64the Free Software Foundation; either version 2 of the License, or
65(at your option) any later version.
66
67See the LICENSE file that comes with this distribution for more details.
68
69=cut
70
71#####################################################################################
72
73sub name         { return 'Gandi'; }
74sub tlds         { return ('com','net','org','biz','info','name','be'); }
75sub object_types { return ('domain','contact'); }
76sub profile_types { return qw/ws/; }
77
78sub transport_protocol_default
79{
80 my ($self,$type)=@_;
81
82 return ('Net::DRI::Transport::HTTP::XMLRPCLite',{proxy_uri=>'https://api.gandi.net/xmlrpc/'},'Net::DRI::Protocol::Gandi::WS',{}) if $type eq 'ws';
83 return;
84}
85
86####################################################################################################
87
88sub domain_operation_needs_is_mine
89{
90 my ($self,$ndr,$domain,$op)=@_;
91 return;
92}
93
94sub account_list_domains
95{
96 my ($self,$ndr)=@_;
97 my $rc=$ndr->try_restore_from_cache('account','domains','list');
98 if (! defined $rc) { $rc=$ndr->process('account','list_domains'); }
99 return $rc;
100}
101
102####################################################################################################
1031;
104