Add countdown
This commit is contained in:
parent
a15b5ffda0
commit
5c4fb60ff2
@ -56,8 +56,7 @@ class GitHubApi:
|
|||||||
"""Parse headers to update rate limits."""
|
"""Parse headers to update rate limits."""
|
||||||
self.rate_reset = datetime.fromtimestamp(int(headers['x-ratelimit-reset']))
|
self.rate_reset = datetime.fromtimestamp(int(headers['x-ratelimit-reset']))
|
||||||
self.rate_remaining = int(headers['x-ratelimit-remaining'])
|
self.rate_remaining = int(headers['x-ratelimit-remaining'])
|
||||||
logger.info(f'{self.rate_remaining} calls remaining until {self.rate_reset}')
|
logger.info(f'{self.rate_remaining} calls remaining until {self.rate_reset} ({self.rate_reset - datetime.now()})')
|
||||||
|
|
||||||
|
|
||||||
def get_events(self, page=None):
|
def get_events(self, page=None):
|
||||||
"""Fetch GitHub events."""
|
"""Fetch GitHub events."""
|
||||||
|
Loading…
Reference in New Issue
Block a user