NAME
SeeAlso::Client - SeeAlso Linkserver Protocol Client
DESCRIPTION
This class can be used to query a SeeAlso server. It can also be used as SeeAlso::Source to proxy another SeeAlso server.
METHODS
new ( $baseurl )
Creates a new SeeAlso client. You must specify a base URL as string or URI object. If the URL is not valid, this method returns undef.
query ( $identifier )
Given an identifier (either a SeeAlso::Identifier object or just a plain string) queries the SeeAlso Server that is specified with its base URL and returns a SeeAlso::Response object on success.
baseURL ( [ $url ] )
Get or set the base URL of the SeeAlso server to query by this client. You can specify a string or a URI/URI::http/URI::https object. If the URL contains a 'format' parameter, it is treated as a SeeAlso Simple server (plain JSON response), otherwise it is a SeeAlso Full server (unAPI support and OpenSearch description). This method may croak on invalid URLs.
queryURL ( $identifier [, $callback ] )
Get the query URL with a given identifier and optionally callback parameter. The query parameter can be a simple string or a SeeAlso::Identifier object (its normalized representation is used). If no identifier is given, an empty string is used. This method may croak if the callback name is invalid.
ADDITIONAL FUNCTIONS
seealso_request ( $baseurl, $identifier )
Quickly query a SeeAlso server an return the SeeAlso::Response. This is almost equivalent to
SeeAlso::Client->new($baseurl)->query($identifier)
but in contrast seealso_request never croaks on errors but may return undef.
AUTHOR
Jakob Voss <jakob.voss@gbv.de>
LICENSE
Copyright (C) 2007-2009 by Verbundzentrale Goettingen (VZG) and Jakob Voss
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.