| Net-Zemanta documentation | Contained in the Net-Zemanta distribution. |
Net::Zemanta::Preferences - Perl interface to Zemanta user preferences
use Net::Zemanta::Preferences;
my $zemanta = Net::Zemanta::Preferences->new(
APIKEY => 'your-API-key'
);
my $preferences = $zemanta->get();
# URL of the web page for setting preferences
$preferences->{config_url}
# User's Amazon affiliate ID
$preferences->{config_url}
Net::Zemanta::Preferences->new(PARAM => ...);
Acceptable parameters:
The API key used for authentication with the service.
If supplied the value is prepended to this module's identification string to become something like:
your-killer-app/0.042 Perl-Net-Zemanta/0.1 libwww-perl/5.8
Otherwise just Net::Zemanta's user agent string will be sent.
new() returns undef on error.
Returns current settings for the specified API key in form of a hash reference.
See http://developer.zemanta.com for a list of all available settings.
Returns undef on error.
If the last call to suggest() returned an error, this function returns a
string containing a short description of the error. Otherwise it returns
undef.
Tomaz Solc <tomaz@zemanta.com>
Copyright (C) 2008 by Zemanta ltd.
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.7 or, at your option, any later version of Perl 5 you may have available.
| Net-Zemanta documentation | Contained in the Net-Zemanta distribution. |
package Net::Zemanta::Preferences;
use warnings; use strict; use Net::Zemanta::Method; our @ISA = qw(Net::Zemanta::Method);
sub new { my $class = shift; my %params = @_; $params{METHOD} = "zemanta.preferences"; my $self = $class->SUPER::new(%params); return unless $self; bless ($self, $class); return $self; }
sub get { my $self = shift; return $self->execute(); }