Readme Typo in Tokens Refresh Section
Closed this issue · 2 comments
adorsett commented
Found another one. Looks like you're using the same code as the persistence section for a non-persistence example.
if now_utc > ecobee_service.refresh_token_expires_on:
authorize(ecobee_service)
request_tokens(ecobee_service)
elif now_utc > ecobee_service.access_token_expires_on:
token_response = ecobee_service.refresh_tokens()
I believe it should be:
if now_utc > ecobee_service.refresh_token_expires_on:
ecobee_service.authorize()
ecobee_service.request_tokens()
elif now_utc > ecobee_service.access_token_expires_on:
token_response = ecobee_service.refresh_tokens()
sherif-fanous commented
Thanks again.
I'll actually fix it similar to #8 as my assumption is that the reader reads it it is excerpt making use of the Persistence example
adorsett commented
I assumed it was part of the persistence section and used it in my code but then when you didn't fix it too I went back and read closely and it seemed like a new section. But you're right my initial assumption is it was a continuance of the prior section so I agree with your assessment. Appreciate the examples!