30
30
import github .GithubObject
31
31
import github .Rate
32
32
33
+ from deprecated import deprecated
34
+
33
35
34
36
class RateLimit (github .GithubObject .NonCompletableGithubObject ):
35
37
"""
@@ -39,10 +41,25 @@ class RateLimit(github.GithubObject.NonCompletableGithubObject):
39
41
def __repr__ (self ):
40
42
return self .get__repr__ ({"core" : self ._core .value })
41
43
44
+ @property
45
+ @deprecated (reason = """
46
+ The rate object is deprecated. If you're writing new API client code
47
+ or updating existing code, you should use the core object instead of
48
+ the rate object. The core object contains the same information that
49
+ is present in the rate object.
50
+ """ )
51
+ def rate (self ):
52
+ """
53
+ (Deprecated) Rate limit for non-search-related API, use `core` instead
54
+
55
+ :type: class:`github.Rate.Rate`
56
+ """
57
+ return self ._core .value
58
+
42
59
@property
43
60
def core (self ):
44
61
"""
45
- Rate limit for rest of the API.
62
+ Rate limit for the non-search-related API
46
63
47
64
:type: class:`github.Rate.Rate`
48
65
"""
@@ -51,7 +68,7 @@ def core(self):
51
68
@property
52
69
def search (self ):
53
70
"""
54
- Rate limit for Search API.
71
+ Rate limit for the Search API.
55
72
56
73
:type: class:`github.Rate.Rate`
57
74
"""
@@ -60,7 +77,7 @@ def search(self):
60
77
@property
61
78
def graphql (self ):
62
79
"""
63
- Experimental rate limit for GraphQL, use with caution.
80
+ ( Experimental) Rate limit for GraphQL API , use with caution.
64
81
65
82
:type: class:`github.Rate.Rate`
66
83
"""
0 commit comments