Browse Source

Renamed RateLimited to RateLimit

This is more consistant with other event names.
Bruce Marriner 9 years ago
parent
commit
38c51ce788
2 changed files with 3 additions and 3 deletions
  1. 2 2
      events.go
  2. 1 1
      restapi.go

+ 2 - 2
events.go

@@ -50,8 +50,8 @@ type Connect struct{}
 // Disconnect is an empty struct for an event.
 type Disconnect struct{}
 
-// RateLimited is a struct for the RateLimited event
-type RateLimited struct {
+// RateLimit is a struct for the RateLimited event
+type RateLimit struct {
 	*TooManyRequests
 	URL string
 }

+ 1 - 1
restapi.go

@@ -143,7 +143,7 @@ func (s *Session) request(method, urlStr, contentType string, b []byte) (respons
 			return
 		}
 		s.log(LogInformational, "Rate Limiting %s, retry in %d", urlStr, rl.RetryAfter)
-		s.handle(RateLimited{TooManyRequests: &rl, URL: urlStr})
+		s.handle(RateLimit{TooManyRequests: &rl, URL: urlStr})
 
 		mu.Lock()
 		time.Sleep(rl.RetryAfter)