projects
/
grackle
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29e7825
)
Handle API 1.1 rate limit header names
author
Hayes Davis
<hayes@unionmetrics.com>
Sun, 31 Mar 2013 21:33:24 +0000
(14:33 -0700)
committer
Hayes Davis
<hayes@unionmetrics.com>
Sun, 31 Mar 2013 21:55:17 +0000
(14:55 -0700)
lib/grackle/client.rb
patch
|
blob
|
history
diff --git
a/lib/grackle/client.rb
b/lib/grackle/client.rb
index 2b5b7de2874ea85f733c41d85568b3e74cb48cdb..cff958b470ed2da07086f476d5f50279b037699d 100644
(file)
--- a/
lib/grackle/client.rb
+++ b/
lib/grackle/client.rb
@@
-95,10
+95,15
@@
module Grackle
DEFAULT_API_HOST = :v1_1
# Contains the response headers from twitter
- DEFAULT_RESPONSE_HEADERS =[
+ DEFAULT_RESPONSE_HEADERS = [
+ # These are API 1 rate limit header names
'x-ratelimit-limit',
'x-ratelimit-remaining',
- 'x-ratelimit-reset'
+ 'x-ratelimit-reset',
+ # These are API 1.1 rate limit header names
+ 'x-rate-limit-limit',
+ 'x-rate-limit-remaining',
+ 'x-rate-limit-reset'
]
#Basic OAuth information needed to communicate with Twitter