Closed raman325 closed 3 years ago
I like the user info addition, but it seems to be static information so it would seem best to pull that once during setup rather than with the update user call since that pulls dynamic info about the user bed side and as a result gets called on a regular interval.
One of the original goals with this library was to minimize api calls as much as possible since it's not officially available for 3rd party use. I don't want to give Eight a reason to want to block things.
That is a great point, I will be sure to do that. I also found another issue that sometimes occurs in my testing with the atexit call which I have just fixed.
Looks good. Thanks!
your understanding is correct. I don't think anyone has identified how a refresh works (assuming it works at all). I tried sniffing around their API endpoint, you can make an OPTIONS request on valid endpoints and it will return the available methods for the endpoint. I tried /refresh and /token/refresh and those don't appear to be valid endpoints. Doesn't mean one doesn't exist, I just haven't found it yet.
When I tried to fix the issue with fetching the token I didn't realize the refresh token process followed a similar code path. So now, I believe the initial token request and the refresh token request both use the
fetch_token
function so I have updated that token to pass a new parameter into the post call to prevent the token from getting added to the request.I also:
side
with the name of the person on that side in the entity namesofflineView=true
parameter from the call to get device information because I found that we get more information back that way