Closed apocaliss92 closed 1 month ago
there's too much copy pasting happening here with getAbility, think it can be cleaned up. the parameters contain the token information. im not sure why you need another storage for it.
I think what you want is a client mode that only operates with tokens and thus always fetches a token from login. Trying to change the behavior throughout is going to be very messy.
I think what you want is a client mode that only operates with tokens and thus always fetches a token from login. Trying to change the behavior throughout is going to be very messy.
Yes I didn't want to change to much the current logic, I think I will just fork out this and trying out on my system, thanks for the comments!
yeah, I think adding a token mode to the client would be trivial and also non instrusive. existing API calls work work as is. it would simply be changing token usage from fallback to always.
More recent Reolink devices fail on using some call using the GET endpoint + username/password comination as authentication. This PR extract the api to get the token in a separated token data, to not collide with the other methods, and is used by an alternative getAbility method as documented in the official Reolink API documentation