Net::T...Result(3pm)
π NAME π
Net::Twitter::Role::WrapResult β ok bestie, this one's whole thing is wrapping up your Twitter API response and your HTTP Response together. It's giving two-for-one π
β¨ VERSION β¨
version 4.01043 π
πΈ SYNOPSIS πΈ
no cap, here's how you actually use it:
use Net::Twitter;
my $nt = Net::Twitter->new(
traits => [ qw/API::RESTv1_1 WrapResult/ ],
%other_new_options,
);
my $r = $nt->verify_credentials;
my $http_response = $r->http_response;
my $twitter_result = $r->result;
my $rate_limit_remaining = $r->rate_limit_remaining;
See? You get the HTTP response, the Twitter result, and the rate limit remaining all from one call. Obsessed. π
π¦ DESCRIPTION π¦
okay so here's the tea β
Normally, Net::Twitter API methods just hand you back the decoded JSON body from the HTTP response. Which is fine, like, it works. But β some genuinely useful info, notably the rate limit info, is chillin' in the HTTP response headers, not the body. And default behavior justβ¦ leaves it there. π
With this role applied, API methods will return a Net::Twitter::WrappedResult object instead. That object includes both the HTTP response and the decoded JSON response body β everything, together, in one place. Main character energy fr fr π
Wanna know all the deets? See Net::Twitter::WrappedResult for the full breakdown.
π AUTHOR π
Marc Mims <marc@questright.com> β thank u for ur service π«Ά
π COPYRIGHT π
Copyright (c) 2016 Marc Mims
π LICENSE π
This library is free software and may be distributed under the same terms as perl itself. β¨ (yes, literally just perl's terms β iconic of it tbh)
and that's the whole page bestie!! this one shipped as part of perl v5.34.0, dated 2022-06-16, and it lives in the User Contributed Perl Documentation section under the name Net::T...Result(3pm) π slay, go wrap some results π¦πΈ
π¦ where this page comes from
- debian bookworm: libnet-twitter-perl 4.01043-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-twitter-perl 4.01043-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-twitter-perl 4.01043-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms