This website works better with JavaScript.
Home
Explore
Help
Sign In
brettlangdon
/
pypihub
mirror of
https://github.com/brettlangdon/pypihub.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Projects
0
Releases
1
Wiki
Activity
Browse Source
update repos example to use RateLimits
The RateLimit() func is deprecated, and should not appear in the official example.
Yicheng Qin
10 years ago
committed by
Will Norris
parent
7715d059dc
commit
3ec5f1a72f
2 changed files
with
2 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
examples/repos/main.go
+1
-1
github/github.go
+ 1
- 1
examples/repos/main.go
View File
@ -24,7 +24,7 @@ func main() {
fmt
.
Printf
(
"%v\n\n"
,
github
.
Stringify
(
repos
)
)
}
rate
,
_
,
err
:=
client
.
RateLimit
(
)
rate
,
_
,
err
:=
client
.
RateLimit
s
(
)
if
err
!=
nil
{
fmt
.
Printf
(
"Error fetching rate limit: %#v\n\n"
,
err
)
}
else
{
+ 1
- 1
github/github.go
View File
@ -66,7 +66,7 @@ type Client struct {
// Rate specifies the current rate limit for the client as determined by the
// most recent API call. If the client is used in a multi-user application,
// this rate may not always be up-to-date. Call RateLimit() to check the
// this rate may not always be up-to-date. Call RateLimit
s
() to check the
// current rate.
Rate
Rate
Write
Preview
Loading…
Cancel
Save