NAME

ZipTie::Client - Webservice client for the ZipTie server

VERSION

Version 0.9

SYNOPSIS

use ZipTie::Client;

my $client = ZipTie::Client->new(username => 'admin', password => 'password', host => 'localhost:8080', );

$client->discovery()->discover(addressSets => ['10.1.2.1', '10.1.1.0/24'], crawlNeighbors => 1);

DESCRIPTION

ZipTie::Client is a simple webservice client for a ZipTie server.

PUBLIC SUB-ROUTINES

$client = ZipTie::Client->new( %options ) Creates the client.
username:  The ZipTie server username
password:  The ZipTie server password
host:      The ZipTie server host and port.  (Defaults to 'localhost:8080')
scheme:    The protocol scheme to use to connect to the server.  (Defaults to 'https')
on_fault:  The method that will be called when there is an error from the server.  (Default will call C<die()>)

If no username is specified the ZipTie::Client will try to use $ENV{'ZIPTIE_AUTHENTICATION'} to authenticate. This environment variable is set by the ZipTie server when running script tools. Authors of script tools my simply create an instance of the ZipTie::Client with no options and the authentication will be handled automatically.

port Gets an instance of a webservice endpoint. As a shortcut ports can be accessed directly with a method named the same as the port name.
# These two lines do the same thing.
$port = $client->port("devices");
$port = $client->devices();

LICENSE

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is ZipTie.

The Initial Developer of the Original Code is AlterPoint. Portions created by AlterPoint are Copyright (C) 2007-2008, AlterPoint, Inc. All Rights Reserved.

AUTHOR

lbayer (lbayer@ziptie.org)

BUGS

Please report any bugs or feature requests through the ziptie bugzilla web interface at http://bugs.ziptie.org/.