++ed by:
OALDERS

1 PAUSE user

Neil Bowers

NAME

WebService::HackerNews::Item - a HackerNews story, job, comment, poll or pollopt

SYNOPSIS

 use WebService::HackerNews::Item;
 my $item = WebService::HackerNews::Item->new(
                id   => 123,
                type => 'story',
                # more attributes
            );

DESCRIPTION

This module is a class for data objects returned by the item() method of WebService::HackerNews.

The objects have the following attributes, which are named after properties listed in the Item documentation:

  • id - The item's unique id. Required.

  • deleted - true if the item is deleted.

  • type - The type of item. One of "job", "story", "comment", "poll", or "pollopt".

  • by - The username of the item's author.

  • time - Creation date of the item, in Unix Time.

  • text - The comment, Ask HN, or poll text. HTML.

  • dead - true if the item is dead.

  • parent - The item's parent. For comments, either another comment or the relevant story. For pollopts, the relevant poll.

  • kids - The ids of the item's comments, in ranked display order.

  • url - The URL of the story.

  • score - The story's score, or the votes for a pollopt.

  • title - The title of the story or poll.

  • parts - A list of related pollopts, in display order.

SEE ALSO

WebService::HackerNews

REPOSITORY

https://github.com/neilbowers/WebService-HackerNews

AUTHOR

Neil Bowers <neilb@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Neil Bowers <neilb@cpan.org>.

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