witnessmenow/spotify-api-arduino

Method for setting access keys/bearer token needed

Acorn221 opened this issue · 1 comments

Hi, is there a reason there's no method to set access keys / _bearerToken (along with the time they were acquired)?

I'm using the ESP-32 Deep Sleep 'RTC_DATA_ATTR' variables, and that has a limit of 8kb ram as it is persistent through deep sleep. My problem is that I would rather not refresh the access key every time the ESP-32 wakes up from deep sleep if I can avoid it, as it causes the ESP32 to draw more power and creates some unnecessary requests. I could store the whole instance of the class in the 'RTC_DATA_ATTR' ram but that might be too much for it and it's not very efficient.

I was wondering whether or not I have missed something and if this was an intentional decision, otherwise I can make a PR to add this!