Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-Twitter CPAN distribution.

Report information
The Basics
Id: 107421
Status: resolved
Priority: 0/
Queue: Net-Twitter

People
Owner: Nobody in particular
Requestors: dfaber [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Download signature.asc
application/pgp-signature 496b

Message body not shown because it is not plain text.

I've ignored this long enough the typo has been fixed, perhaps via a pull request on Github. I'm leaving the example as is, since the Search API role it appears in is for Twitter API version 1—long since history. If I'm not mistaken "results" was, indeed the key for that API. Search was moved to the REST API in API version 1.1.