I'd like to propose a change where refresh_tokens can be called from within the
library's request calls. The following code will watch for an ExpiredTokenError.
If this exception is seen the request call will kick the refresh_tokens and try the
request again. If the second call fails the exception will be passed up the stack.
This is handled by a wrapper function around the _request call. This way the
authentication and token handling can still use the existing logic.
This PR also bumps up the requests version in the install_requires list.
I'd like to propose a change where refresh_tokens can be called from within the library's request calls. The following code will watch for an ExpiredTokenError. If this exception is seen the request call will kick the refresh_tokens and try the request again. If the second call fails the exception will be passed up the stack. This is handled by a wrapper function around the _request call. This way the authentication and token handling can still use the existing logic. This PR also bumps up the requests version in the install_requires list.