| WebService-Technorati documentation | Contained in the WebService-Technorati distribution. |
WebService::Technorati - a Perl interface to the Technorati web services interface
use WebService::Technorati;
my $apiKey = 'myverylongstringofcharacters';
my $url = 'http://www.arachna.com/roller/page/spidaman';
my $t = WebService::Technorati->new(key => $apiKey);
my $q = $t->getCosmosApiQuery($url);
$q->execute;
my $linkedUrl = $q->getLinkQuerySubject();
# do something with the linkedUrl
my $links = $q->getInboundLinks();
for my $link (@$links) {
# do something with the link
}
The Technorati web services interfaces use REST wire protocol with a format described at http://developers.technorati.com/
Please see the test files in t/ and samples in eg/ for examples on how to use WebServices::Technorati
No bugs currently open
Join the Technorati developers mailing list at http://mail.technorati.com/mailman/listinfo/developers
Ian Kallen
ikallen _at_ technorati.com
http://developers.technorati.com
This program is free software; you can redistribute it and/or modify it under the terms of the following Creative Commons License: http://creativecommons.org/licenses/by/2.0 as well as the indemnification provisions of the Apache 2.0 style license, the full text of which can be found in the LICENSE file included with this module.
perl(1).
Usage : getCosmosApiQuery('http://developers.technorati.com')
Purpose : Instantiates a CosmosApiQuery with the given url
Returns : WebService::Technorati::CosmosApiQuery
Argument : a URL
Throws : WebService::Technorati::InstantiationException when called
: without an api key
Comments : WebService::Technorati::CosmosApiQuery is a Perl interface to the Technorati
: web services 'cosmos' interface
See Also : WebService::Technorati::CosmosApiQuery
Usage : getSearchApiQuery('keyword')
Purpose : Instantiates a SearchApiQuery with the given keyword
Returns : a WebService::Technorati::SearchApiQuery that may be executed
Argument : a keyword search term
Throws : WebService::Technorati::InstantiationException when called
: without an api key
Comments : WebService::Technorati::SearchApiQuery is a Perl interface to the Technorati
: web services 'search' interface
See Also : WebService::Technorati::SearchApiQuery
Usage : getOutboundApiQuery('http://developers.technorati.com')
Purpose : Instantiates a OutboundApiQuery with the given url
Returns : WebService::Technorati::OutboundApiQuery
Argument : a url
Throws : WebService::Technorati::InstantiationException when called
: without an api key
Comments : WebService::Technorati::OutboundApiQuery is a Perl interface to the Technorati
: web services 'outbound' interface
See Also : WebService::Technorati::OutboundApiQuery
Usage : getAuthorinfoApiQuery('username')
Purpose : Instantiates a AuthorinfoApiQuery with the given username
Returns : WebService::Technorati::AuthorinfoApiQuery
Argument : a url
Throws : WebService::Technorati::InstantiationException when called
: without an api key
Comments : WebService::Technorati::AuthorinfoApiQuery is a Perl interface to the Technorati
: web services 'getinfo' interface
See Also : WebService::Technorati::AuthorinfoApiQuery
Usage : getBloginfoApiQuery('http://developers.technorati.com')
Purpose : Instantiates a BloginfoApiQuery with the given url
Returns : WebService::Technorati::BloginfoApiQuery
Argument : a url
Throws : WebService::Technorati::InstantiationException when called
: without an api key
Comments : WebService::Technorati::BloginfoApiQuery is a Perl interface to the Technorati
: web services 'bloginfo' interface
See Also : WebService::Technorati::BloginfoApiQuery
| WebService-Technorati documentation | Contained in the WebService-Technorati distribution. |
package WebService::Technorati; use strict; use utf8; use WebService::Technorati::SearchApiQuery; use WebService::Technorati::CosmosApiQuery; use WebService::Technorati::OutboundApiQuery; use WebService::Technorati::AuthorinfoApiQuery; use WebService::Technorati::BloginfoApiQuery; BEGIN { use vars qw ($VERSION); $VERSION = 0.04; } # $Id: Technorati.pm,v 1.4 2004/12/30 23:10:47 ikallen Exp $ ########################################### main pod documentation begin ##
############################################# main pod documentation end ## ################################################ subroutine header begin ##
sub getCosmosApiQuery { my $self = shift; my $url = shift; my $q = WebService::Technorati::CosmosApiQuery->new(key => $self->{'key'}, url => $url); return $q; }
sub getSearchApiQuery { my $self = shift; my $keyword = shift; my $q = WebService::Technorati::SearchApiQuery->new(key => $self->{'key'}, url => $keyword); return $q; }
sub getOutboundApiQuery { my $self = shift; my $url = shift; my $q = WebService::Technorati::OutboundApiQuery->new(key => $self->{'key'}, url => $url); return $q; }
sub getAuthorinfoApiQuery { my $self = shift; my $url = shift; my $q = WebService::Technorati::AuthorinfoApiQuery->new(key => $self->{'key'}, url => $url); return $q; }
sub getBloginfoApiQuery { my $self = shift; my $url = shift; my $q = WebService::Technorati::BloginfoApiQuery->new(key => $self->{'key'}, url => $url); return $q; } ################################################## subroutine header end ## sub new { my ($class, %params) = @_; if (! exists $params{'key'}) { WebService::Technorati::InstantiationException->throw( "WebService::Technorati must be instantiated with at " . "least 'key => theverylongkeystring'"); } my $self = bless (\%params, ref ($class) || $class); return $self; } 1; #this line is important and will help the module return a true value __END__