Net::Safari::Response::Section - Section node returned by Safari


Net-Safari documentation  | view source Contained in the Net-Safari distribution.

Index


NAME

Top

Net::Safari::Response::Section - Section node returned by Safari

SYNOPSIS

Top

  use Net::Safari::Response::Section;
  my $book = Net::Safari::Response::Section->new(%book_ref);

  my @sections = $response->book->sections;

  print $section->title;

DESCRIPTION

Top

See Net::Safari for general usage info.

In most cases this object is created for you by Net::Safari::Response after a Net::Safari->search() call.

ACCESSORS The accessor descriptions are mostly pulled from the official spec: http://safari.oreilly.com/affiliates/?p=response

Top

title()

Section title.

heading()

Name of the section's heading, i.e. "Chapter 2"

extract()

Text preview of the area surrounding the match.

search_term_matches()

Terms that matched in this node. Corresponds to h1hit in the spec.

preview()

HTML preview of the requested section. Only available on by "id" matches.

url()

URL to this section on Safari.

type()

Section type. Not documented. Ex: "chapter." Not sure what other possibilities are.

METHODS

Top

new()

$book = Net::Safari::Response::Section->new($ref);

Takes a hash represenation of the XML returned by Safari. Normally this is taken care of by Net::Safari::Response::Book.

BUGS

Top

None yet.

SUPPORT

Top

If you find a bug in the code or find that the code doesn't match Safari API, please send me a line.

If the Safari API is down or has bugs, please contact Safari directly: affiliates@safaribooksonline.com

ACKNOWLEDGMENTS

Top

Adapted from the design of Net::Amazon by Mike Schilli.

Some documentation based on the source Safari documentation: http://safari.oreilly.com/affiliates/?p=web_services

AUTHOR

Top

    Tony Stubblebine	
    tonys@oreilly.com

COPYRIGHT

Top

SEE ALSO

Top

perl(1).


Net-Safari documentation  | view source Contained in the Net-Safari distribution.