1Net::Twitter::Lite::WraUpsReersuClotn(t3rpimb)uted PerlNDeotc:u:mTewnittatteiro:n:Lite::WrapResult(3pm)
2
3
4

NAME

6       Net::Twitter::Lite::WrapResult - Wrap the HTTP response and Twitter
7       result
8

VERSION

10       version 0.12008
11

SYNOPSIS

13           use Net::Twitter::Lite::WithAPIv1_1;
14
15           my $nt = Net::Twitter::Lite::WithAPIv1_1->new(
16               consumer_key        => $consumer_key,
17               consumer_secret     => $consumer_secret,
18               access_token        => $access_token,
19               access_token_secret => $access_token_secret,
20               wrap_result         => 1,
21           );
22
23           my $r = $nt->verify_credentials;
24
25           my $http_response        = $r->http_response;
26           my $twitter_result       = $r->result;
27           my $rate_limit_remaining = $r->rate_limit_remaining;
28

DESCRIPTION

30       Often, the result of a Twitter API call, inflated from the JSON body of
31       the HTTP response does not contain all the information you need.
32       Twitter includes meta data, such as rate limiting information, in HTTP
33       response headers. This object wraps both the inflated Twitter result
34       and the HTTP response giving the caller full access to all the meta
35       data. It also provides accessors for the rate limit information.
36

METHODS

38       new($twitter_result, $http_response)
39           Constructs an object wrapping the Twitter result and HTTP response.
40
41       result
42           Returns the inflated Twitter API result.
43
44       http_response
45           Returns the HTTP::Response object for the API call.
46
47       rate_limit
48           Returns the rate limit, per 15 minute window, for the API endpoint
49           called.  Returns undef if no suitable rate limit header is
50           available.
51
52       rate_limit_remaining
53           Returns the calls remaining in the current 15 minute window for the
54           API endpoint called.  Returns undef if no suitable header is
55           available.
56
57       rate_limit_reset
58           Returns the unix epoch time time of the next 15 minute window,
59           i.e., when the rate limit will be reset, for the API endpoint
60           called.  Returns undef if no suitable header is available.
61

AUTHOR

63       Marc Mims <marc@questright.com>
64
66       Copyright (c) 2014 Marc Mims <marc@questright.com>
67
68       This program is free software; you can redistribute it and/or modify it
69       under the same terms as perl itself.
70
71
72
73perl v5.34.0                      2022-01-21Net::Twitter::Lite::WrapResult(3pm)
Impressum