root/WWW-OpenSearch/trunk/README

Revision 1823 (checked in by bricas, 14 years ago)

bump version
update dist files
added pod/pod_coverage tests

Line 
1 NAME
2     WWW::OpenSearch - Search A9 OpenSearch compatible engines
3
4 SYNOPSIS
5         use WWW::OpenSearch;
6    
7         my $url = "http://bulkfeeds.net/opensearch.xml";
8         my $engine = WWW::OpenSearch->new($url);
9    
10         my $name = $engine->description->ShortName;
11         my $tags = $engine->description->Tags;
12    
13         # Perform search for "iPod"
14         my $response = $engine->search("iPod");
15         for my $item (@{$response->feed->items}) {
16             print $item->{description};
17         }
18    
19         # Retrieve the next page of results
20         my $next_page = $response->next_page;
21         for my $item (@{$next_page->feed->items}) {
22             print $item->{description};
23         }
24
25 DESCRIPTION
26     WWW::OpenSearch is a module to search A9's OpenSearch compatible search
27     engines. See http://opensearch.a9.com/ for details.
28
29 CONSTRUCTOR
30   new( $url )
31     Constructs a new instance of WWW::OpenSearch using the given URL as the
32     location of the engine's OpenSearch Description document (retrievable
33     via the description_url accessor).
34
35 METHODS
36   fetch_description( [ $url ] )
37     Fetches the OpenSearch Descsription found either at the given URL or at
38     the URL specified by the description_url accessor. Fetched description
39     may be accessed via the description accessor.
40
41   search( $query [, \%params] )
42     Searches the engine for the given query using the given search
43     parameters. Valid search parameters include:
44
45     * startPage
46     * totalResults
47     * startIndex
48     * itemsPerPage
49
50     See http://opensearch.a9.com/spec/1.1/response/#elements for details.
51
52   do_search( $url [, $method] )
53     Performs a request for the given URL and returns a
54     WWW::OpenSearch::Response object. Method defaults to 'GET'.
55
56 ACCESSORS
57   description_url( [$description_url] )
58   agent( [$agent] )
59   description( [$description] )
60 AUTHOR
61     * Tatsuhiko Miyagawa <miyagawa@bulknews.net>
62     * Brian Cassidy <bricas@cpan.org>
63
64 COPYRIGHT AND LICENSE
65     Copyright 2006 by Tatsuhiko Miyagawa and Brian Cassidy
66
67     This library is free software; you can redistribute it and/or modify it
68     under the same terms as Perl itself.
69
Note: See TracBrowser for help on using the browser.