Net::Zemanta::Preferences - Perl interface to Zemanta user preferences


Net-Zemanta documentation Contained in the Net-Zemanta distribution.

Index


Code Index:

NAME

Top

Net::Zemanta::Preferences - Perl interface to Zemanta user preferences

SYNOPSIS

Top

	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}

METHODS

Top

new()
	Net::Zemanta::Preferences->new(PARAM => ...);

Acceptable parameters:

APIKEY

The API key used for authentication with the service.

USER_AGENT

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.

get()

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.

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.

SEE ALSO

Top

* http://zemanta.com
* http://developer.zemanta.com

AUTHOR

Top

Tomaz Solc <tomaz@zemanta.com>

COPYRIGHT AND LICENSE

Top


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();
}