Business-LiveDrive
view release on metacpan or search on metacpan
lib/Business/LiveDriveAPI.pm view on Meta::CPAN
# XXX - WARNING this has been altered.
# XXX tns data types changed to string
# XXX default_ns set
# Generated by SOAP::Lite (v0.710.10) for Perl -- soaplite.com
# Copyright (C) 2000-2006 Paul Kulchenko, Byrne Reese
# -- generated at [Tue Nov 16 19:22:52 2010]
# -- generated from http://www.livedrive.com/ResellersService/ResellerAPI.asmx?WSDL
my %methods = (
GetUsers => {
endpoint => 'http://www.livedrive.com/ResellersService/ResellerAPI.asmx',
soapaction => 'http://www.livedrive.com/GetUsers',
namespace => 'http://www.livedrive.com/',
parameters => [
SOAP::Data->new(name => 'apiKey', type => 's:string', attr => {}),
SOAP::Data->new(name => 'page', type => 's:int', attr => {}),
], # end parameters
}, # end GetUsers
UpgradeUser => {
endpoint => 'http://www.livedrive.com/ResellersService/ResellerAPI.asmx',
soapaction => 'http://www.livedrive.com/UpgradeUser',
namespace => 'http://www.livedrive.com/',
parameters => [
SOAP::Data->new(name => 'apiKey', type => 's:string', attr => {}),
SOAP::Data->new(name => 'userID', type => 's:int', attr => {}),
SOAP::Data->new(name => 'capacity', type => 's:string', attr => {}),
SOAP::Data->new(name => 'cardVerificationValue', type => 's:string', attr => {}),
], # end parameters
}, # end UpgradeUser
AddBackup => {
endpoint => 'http://www.livedrive.com/ResellersService/ResellerAPI.asmx',
soapaction => 'http://www.livedrive.com/AddBackup',
namespace => 'http://www.livedrive.com/',
parameters => [
SOAP::Data->new(name => 'apiKey', type => 's:string', attr => {}),
SOAP::Data->new(name => 'userID', type => 's:int', attr => {}),
], # end parameters
}, # end AddBackup
UpdateUser => {
endpoint => 'http://www.livedrive.com/ResellersService/ResellerAPI.asmx',
soapaction => 'http://www.livedrive.com/UpdateUser',
namespace => 'http://www.livedrive.com/',
parameters => [
SOAP::Data->new(name => 'apiKey', type => 's:string', attr => {}),
SOAP::Data->new(name => 'userID', type => 's:int', attr => {}),
SOAP::Data->new(name => 'firstName', type => 's:string', attr => {}),
SOAP::Data->new(name => 'lastName', type => 's:string', attr => {}),
SOAP::Data->new(name => 'email', type => 's:string', attr => {}),
SOAP::Data->new(name => 'password', type => 's:string', attr => {}),
SOAP::Data->new(name => 'confirmPassword', type => 's:string', attr => {}),
SOAP::Data->new(name => 'subDomain', type => 's:string', attr => {}),
SOAP::Data->new(name => 'isSharing', type => 's:boolean', attr => {}),
SOAP::Data->new(name => 'hasWebApps', type => 's:boolean', attr => {}),
], # end parameters
}, # end UpdateUser
AddUserWithLimit => {
endpoint => 'http://www.livedrive.com/ResellersService/ResellerAPI.asmx',
soapaction => 'http://www.livedrive.com/AddUserWithLimit',
namespace => 'http://www.livedrive.com/',
parameters => [
SOAP::Data->new(name => 'apiKey', type => 's:string', attr => {}),
SOAP::Data->new(name => 'email', type => 's:string', attr => {}),
SOAP::Data->new(name => 'password', type => 's:string', attr => {}),
SOAP::Data->new(name => 'confirmPassword', type => 's:string', attr => {}),
SOAP::Data->new(name => 'subDomain', type => 's:string', attr => {}),
SOAP::Data->new(name => 'BriefcaseCapacity', type => 's:string', attr => {}),
SOAP::Data->new(name => 'BackupCapacity', type => 's:string', attr => {}),
SOAP::Data->new(name => 'isSharing', type => 's:boolean', attr => {}),
SOAP::Data->new(name => 'hasWebApps', type => 's:boolean', attr => {}),
SOAP::Data->new(name => 'firstName', type => 's:string', attr => {}),
SOAP::Data->new(name => 'lastName', type => 's:string', attr => {}),
SOAP::Data->new(name => 'cardVerificationValue', type => 's:string', attr => {}),
SOAP::Data->new(name => 'productType', type => 's:string', attr => {}),
], # end parameters
}, # end AddUserWithLimit
AddUser => {
endpoint => 'http://www.livedrive.com/ResellersService/ResellerAPI.asmx',
soapaction => 'http://www.livedrive.com/AddUser',
namespace => 'http://www.livedrive.com/',
parameters => [
SOAP::Data->new(name => 'apiKey', type => 's:string', attr => {}),
SOAP::Data->new(name => 'email', type => 's:string', attr => {}),
SOAP::Data->new(name => 'password', type => 's:string', attr => {}),
SOAP::Data->new(name => 'confirmPassword', type => 's:string', attr => {}),
SOAP::Data->new(name => 'subDomain', type => 's:string', attr => {}),
SOAP::Data->new(name => 'capacity', type => 's:string', attr => {}),
SOAP::Data->new(name => 'isSharing', type => 's:boolean', attr => {}),
SOAP::Data->new(name => 'hasWebApps', type => 's:boolean', attr => {}),
SOAP::Data->new(name => 'firstName', type => 's:string', attr => {}),
SOAP::Data->new(name => 'lastName', type => 's:string', attr => {}),
SOAP::Data->new(name => 'cardVerificationValue', type => 's:string', attr => {}),
SOAP::Data->new(name => 'productType', type => 's:string', attr => {}),
], # end parameters
}, # end AddUser
AddBackupWithLimit => {
endpoint => 'http://www.livedrive.com/ResellersService/ResellerAPI.asmx',
soapaction => 'http://www.livedrive.com/AddBackupWithLimit',
namespace => 'http://www.livedrive.com/',
parameters => [
SOAP::Data->new(name => 'apiKey', type => 's:string', attr => {}),
SOAP::Data->new(name => 'userID', type => 's:int', attr => {}),
SOAP::Data->new(name => 'capacity', type => 's:string', attr => {}),
], # end parameters
}, # end AddBackupWithLimit
GetUser => {
endpoint => 'http://www.livedrive.com/ResellersService/ResellerAPI.asmx',
soapaction => 'http://www.livedrive.com/GetUser',
namespace => 'http://www.livedrive.com/',
parameters => [
SOAP::Data->new(name => 'apiKey', type => 's:string', attr => {}),
SOAP::Data->new(name => 'userID', type => 's:int', attr => {}),
], # end parameters
}, # end GetUser
); # end my %methods
use SOAP::Lite;
lib/Business/LiveDriveAPI.pm view on Meta::CPAN
use vars qw(@ISA $AUTOLOAD @EXPORT_OK %EXPORT_TAGS);
@ISA = qw(Exporter SOAP::Lite);
@EXPORT_OK = (keys %methods);
%EXPORT_TAGS = ('all' => [@EXPORT_OK]);
sub _call {
my ($self, $method) = (shift, shift);
my $name = UNIVERSAL::isa($method => 'SOAP::Data') ? $method->name : $method;
my %method = %{$methods{$name}};
$self->proxy($method{endpoint} || Carp::croak "No server address (proxy) specified")
unless $self->proxy;
my @templates = @{$method{parameters}};
my @parameters = ();
foreach my $param (@_) {
if (@templates) {
my $template = shift @templates;
my ($prefix,$typename) = SOAP::Utils::splitqname($template->type);
my $method = 'as_'.$typename;
# TODO - if can('as_'.$typename) {...}
my $result = $self->serializer->$method($param, $template->name, $template->type, $template->attr);
push(@parameters, $template->value($result->[2]));
}
else {
push(@parameters, $param);
}
}
$self->endpoint($method{endpoint})
->ns($method{namespace})
->on_action(sub{qq!"$method{soapaction}"!});
$self->default_ns('http://www.livedrive.com/');
$self->serializer->register_ns("http://microsoft.com/wsdl/mime/textMatching/","tm");
$self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/soap12/","soap12");
$self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/mime/","mime");
$self->serializer->register_ns("http://www.w3.org/2001/XMLSchema","s");
# $self->serializer->register_ns("http://schemas.xmlsoap.org/wsdl/soap/","soap");
( run in 0.258 second using v1.01-cache-2.11-cpan-b61123c0432 )