Subject: | Documentation |
Date: | Wed, 30 Sep 2015 11:58:31 +0200 |
To: | bug-net-twitter [...] rt.cpan.org |
From: | Dirk-Jan Faber <dfaber [...] gmail.com> |
Hello,
I noticed that the documentation on “Search API Methods” of Net::Twitter contains some minor faults. It accidentally states that the results are in “results”, but that should be “statuses”. There is also a little typo in “search_term”.
So http://search.cpan.org/dist/Net-Twitter/lib/Net/Twitter.pod#Search_API_Methods: <http://search.cpan.org/dist/Net-Twitter/lib/Net/Twitter.pod#Search_API_Methods:>
search <>
<>search(q) <>
<>Parameters: q, callback, lang, locale, rpp, page, since_id, until, geocode, show_user, result_type <>
<>Required: q <>
Returns a HASH reference with some meta-data about the query including the next_page, refresh_url, and max_id. The statuses are returned in results. To iterate over the results, use something similar to:
my $r = $nt->search($searh_term);
for my $status ( @{$r->{results}} ) {
print "$status->{text}\n";
}
Returns: HashRef
Should be:
search <>
<>search(q) <>
<>Parameters: q, callback, lang, locale, rpp, page, since_id, until, geocode, show_user, result_type <>
<>Required: q <>
Returns a HASH reference with some meta-data about the query including the next_page, refresh_url, and max_id. The statuses are returned in statuses. To iterate over the results, use something similar to:
my $r = $nt->search($search_term);
for my $status ( @{$r->{statuses}} ) {
print "$status->{text}\n";
}
Returns: HashRef
Best regards and lots of thanks for the module,
Dirk-Jan Faber
Message body not shown because it is not plain text.