GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Twitter::API::Context(3) User Contributed Perl Documentation Twitter::API::Context(3)

Twitter::API::Context - Encapsulated state for a request/response

version 1.0006

    my ( $r, $c ) = $client->verify_credentials;

    say sprintf '%d verify_credentials calls remaining unitl %s',
        $c->rate_limit_remaining,
        scalar localtime $c->rate_limit_reset;

    # output:
    74 verify_credentials_calls remaining until Sat Dec  3 22:05:41 2016

The state for every API call is stored in a context object. It is automatically created when a request is initiated and is returned to the caller as the second value in list context. The context includes the HTTP::Request and HTTP::Response objects, a reference to the API return data, and accessor for rate limit information.

A reference to the context is also included in a Twitter::API::Error exception.

Returns the HTTP::Request object for the API call.

Returns the HTTP::Response object for the API call.

Returns the result data for the API call.

Every API endpoint has a rate limit. This method returns the rate limit for the endpoint of the API call. See <https://developer.twitter.com/en/docs/basics/rate-limiting> for details.

Returns the number of API calls remaining for the endpoint in the current rate limit window.

Returns the time of the next rate limit window in UTC epoch seconds.

Marc Mims <marc@questright.com>

This software is copyright (c) 2015-2021 by Marc Mims.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2021-04-01 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.