1Net::Twitter::Role::WraUpsReersuClotn(t3r)ibuted Perl DoNceutm:e:nTtwaittitoenr::Role::WrapResult(3)
2
3
4
6 Net::Twitter::Role::WrapResult - Wrap Twitter API response and HTTP
7 Response
8
10 version 4.01043
11
13 use Net::Twitter;
14
15 my $nt = Net::Twitter->new(
16 traits => [ qw/API::RESTv1_1 WrapResult/ ],
17 %other_new_options,
18 );
19
20 my $r = $nt->verify_credentials;
21
22 my $http_response = $r->http_response;
23 my $twitter_result = $r->result;
24 my $rate_limit_remaining = $r->rate_limit_remaining;
25
27 Normally, Net::Twitter API methods return the decoded JSON body from
28 the HTTP response. Some useful information, notably rate limit
29 information, is included in HTTP response headers. With this role
30 applied, API methods will return a Net::Twitter::WrappedResult object
31 that includes both the HTTP response and the decoded JSON response
32 body. See Net::Twitter::WrappedResult for details.
33
35 Marc Mims <marc@questright.com>
36
38 Copyright (c) 2016 Marc Mims
39
41 This library is free software and may be distributed under the same
42 terms as perl itself.
43
44
45
46perl v5.32.0 2020-07-28 Net::Twitter::Role::WrapResult(3)