diff --git a/ratelimit.go b/ratelimit.go index c3d553c..dc48c92 100644 --- a/ratelimit.go +++ b/ratelimit.go @@ -67,6 +67,8 @@ func (r *RateLimiter) GetBucket(key string) *Bucket { r.buckets[key] = b return b } + +// GetWaitTime returns the duration you should wait for a Bucket func (r *RateLimiter) GetWaitTime(b *Bucket, minRemaining int) time.Duration { // If we ran out of calls and the reset time is still ahead of us // then we need to take it easy and relax a little diff --git a/structs.go b/structs.go index 83e5089..87ebe1d 100644 --- a/structs.go +++ b/structs.go @@ -313,9 +313,10 @@ type Presence struct { Since *int `json:"since"` } -// A game type +// GameType is the type of "game" (see GameType* consts) in the Game struct type GameType int +// Valid GameType values const ( GameTypeGame GameType = iota GameTypeStreaming