Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit408b52c

Browse files
committed
Add GitHub#rate_limit
1 parente70370f commit408b52c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎github3/github.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,17 @@ def pull_request(self, owner, repository, number):
946946
r=self.repository(owner,repository)
947947
returnr.pull_request(number)ifrelseNone
948948

949+
defrate_limit(self):
950+
"""Returns a dictionary with information from /rate_limit.
951+
952+
The dictionary has two keys: ``resources`` and ``rate``. In
953+
``resources`` you can access information about ``core`` or ``search``.
954+
955+
:returns: dict
956+
"""
957+
url=self._build_url('rate_limit')
958+
returnself._json(self._get(url),200)
959+
949960
defrepository(self,owner,repository):
950961
"""Returns a Repository object for the specified combination of
951962
owner and repository

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp