xdevplatform / twitter-python-ads-sdk

A Twitter supported and maintained Ads API SDK for Python.
https://twitterdev.github.io/twitter-python-ads-sdk/
MIT License
189 stars 106 forks source link

Expose rate limit headers into instance variables #202

Closed smaeda-ks closed 5 years ago

smaeda-ks commented 5 years ago

re: APE-537

Adding a few lines in def __from_response() (cursor.py) and def from_response() (resource.py) to set rate limit instance varialbes.

With this change, a caller who invokes Cursor class will be able to access rate limit headers through its instance variables. A caller who invokes from_response() from Resource class will be able to access rate limit headers by passing an additional argument (optional).

smaeda-ks commented 5 years ago

@tushdante It would be great to get your insights too if possible before I merge this, thanks!

tushdante commented 5 years ago

@tushdante It would be great to get your insights too if possible before I merge this, thanks!

Yep! I'll take a look at this today!

smaeda-ks commented 5 years ago

ping