GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  WWW::OPENSEARCH::RESPONSE (3)

.ds Aq ’

NAME

WWW::OpenSearch::Response - Encapsulate a response received from an A9 OpenSearch compatible engine

CONTENTS

SYNOPSIS



    use WWW::OpenSearch;
   
    my $url = "http://bulkfeeds.net/opensearch.xml";
    my $engine = WWW::OpenSearch->new($url);
   
    # Retrieve page 4 of search results for "iPod"
    my $response = $engine->search("iPod",{ startPage => 4 });
    for my $item (@{$response->feed->items}) {
        print $item->{description};
    }
   
    # Retrieve page 3 of results
    $response = $response->previous_page;
   
    # Retrieve page 5 of results
    $response = $response->next_page;



DESCRIPTION

WWW::OpenSearch::Response is a module designed to encapsulate a response received from an A9 OpenSearch compatible engine. See http://opensearch.a9.com/spec/1.1/response/ for details.

CONSTRUCTOR

new( CW$response )

Constructs a new instance of WWW::OpenSearch::Response from the WWWW::OpenSearch:Response returned by the search request.

METHODS

    parse_response( )

Parses the content of the HTTP response using XML::Feed. If successful, parse_feed( ) is also called.

    parse_feed( )

Parses the XML::Feed originally parsed from the HTTP response content. Sets the pager object appropriately.

    previous_page( ) / next_page( )

Performs another search on the parent object, returning a WWW::OpenSearch::Response instance containing the previous/next page of results. If the current response includes a <link rel=previous/next href=... /> tag, the page will simply be the parsed content of the URL specified by the tag’s href attribute. However, if the current response does not include the appropriate link, a new query is constructed using the startPage or startIndex query arguments.

_get_link( CW$type )

Gets the href attribute of the first link whose rel attribute is equal to $type.

ACCESSORS

    feed( )

    pager( )

AUTHOR

o Tatsuhiko Miyagawa <miyagawa@bulknews.net>
o Brian Cassidy <bricas@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2005-2013 by Tatsuhiko Miyagawa and Brian Cassidy

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WWW::OPENSEARCH::RESPONSE (3) 2013-01-18

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.