SeeAlso::Client - SeeAlso Linkserver Protocol Client
version 0.71
$response = seealso_request ( $baseurl, $identifier ); print $response->toJSON() . "\n" if ($response); $client = SeeAlso::Client->new( $baseurl, ShortName => "myClient" ); $response = $client->query( $identifier );
This class can be used to query a SeeAlso server. It can also be used as SeeAlso::Source to proxy another SeeAlso server, for instance to wrap a SeeAlso Simple server as a SeeAlso Full server.
Creates a new SeeAlso client. You must specify a BaseURL as string or URI object or this method will croak:
$client = new SeeAlso::Client( $BaseURL ); $client = new SeeAlso::Client( BaseURL => $BaseURL );
Given an identifier (either a SeeAlso::Identifier object or just a plain string) queries the SeeAlso Server of this client and returns a SeeAlso::Response object on success. On failure this method just croaks.
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.
Returns the URL as string.
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.
Try to retrieve a list of formats via unAPI (experimental).
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). This method is exportet by default.
Jakob Voss <jakob.voss@gbv.de>
<jakob.voss@gbv.de>
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.
Jakob Voss
This software is copyright (c) 2013 by Jakob Voss.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install SeeAlso::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SeeAlso::Server
CPAN shell
perl -MCPAN -e shell install SeeAlso::Server
For more information on module installation, please visit the detailed CPAN module installation guide.