The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::Safari::Response::Book - Book object returned by Safari

SYNOPSIS

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

  print $book->title;

  my @sections = $book->sections

DESCRIPTION

See Net::Safari for general usage info.

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

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

title()

Book title.

isbn()

Unformatted ISBN, i.e. there's no dashes, just numbers and occassionally an X.

edition()

A text description of the edition, i.e. "First," "Second" ...

authors()

Returns an array of Net::Safari::Response::Author objects.

pagenums()

Number of pages in book.

pubdate()

String representation of the pubdate. There's no guarantees about the format of the date. At the very least expect "July 14, 2004" and "April 1978." If you need a consistent format, use pub_timepiece().

pub_timepiece

Time::Piece object representing the publish date. Module tries to be smart about parsing the date so that you can rely on a consistent format.

subjects()

An array of subject classification. TODO: get some more info on what these are.

imprint()

The name of the division publishing the book. This is what's on the cover. For some books, like Programming Perl, imprint() and publisher() are the same (O'Reilly). For other books, like Mac OS X: The Missing Manual, they're different (publisher=O'Reilly and imprint=Pogue Press).

publisher()

The parent company publishing the book. Normally you want imprint().

description()

paragraph describing the book.

msrp()

Suggested retail price in the United States.

slots()

The number of slots that this book occupies in a Safari subscription.

imagesmall()

URL to small cover image.

imagemedium()

URL to medium cover image.

imagelarge()

URL to large cover image. TODO: do these images have consistent sizes.

buyprint()

URL to buy a print copy of the book.

sections()

An array of Net::Safari::Response::Section objects.

toc()

TODO: not sure what this looks like.

url()

URL to the book on Safari. This isn't documented in the API, so I can't guarantee that it will always work.

METHODS

new()

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

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

BUGS

None yet.

SUPPORT

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

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

    Tony Stubblebine    
    tonys@oreilly.com

COPYRIGHT

Copyright 2004 by Tony Stubblebine (tonys@oreilly.com)

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

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

perl(1).