Net::Twitter::Lite::WrapResult(3pm) | User Contributed Perl Documentation | Net::Twitter::Lite::WrapResult(3pm) |
Net::Twitter::Lite::WrapResult - Wrap the HTTP response and Twitter result
version 0.12008
use Net::Twitter::Lite::WithAPIv1_1; my $nt = Net::Twitter::Lite::WithAPIv1_1->new( consumer_key => $consumer_key, consumer_secret => $consumer_secret, access_token => $access_token, access_token_secret => $access_token_secret, wrap_result => 1, ); my $r = $nt->verify_credentials; my $http_response = $r->http_response; my $twitter_result = $r->result; my $rate_limit_remaining = $r->rate_limit_remaining;
Often, the result of a Twitter API call, inflated from the JSON body of the HTTP response does not contain all the information you need. Twitter includes meta data, such as rate limiting information, in HTTP response headers. This object wraps both the inflated Twitter result and the HTTP response giving the caller full access to all the meta data. It also provides accessors for the rate limit information.
Marc Mims <marc@questright.com>
Copyright (c) 2014 Marc Mims <marc@questright.com>
This program is free software; you can redistribute it and/or modify it under the same terms as perl itself.
2022-06-16 | perl v5.34.0 |