NicklasWallgren / ewelink

Ewelink SDK to control your eWelink smart devices.
MIT License
6 stars 8 forks source link

making APP_ID and APP_SECRET not hardcoded #3

Closed jacostaperu closed 2 years ago

jacostaperu commented 2 years ago

APP_ID and APP_SECRET expire after 1 year and those values should not be hardcoded into the library, I modified some of the types structures to make possible them to be defined outside of the code of the library. I have modified the example and added a comment to let the user know where to get the APP_ID and APP_secret from.

NicklasWallgren commented 2 years ago

Hey @jacostaperu, thanks for the contribution.

You got a point! What do you think of passing the AppID and AppSecret as a parameters too NewConfiguration, instead of exposing NewApplication?

Could you give me permission to commit to your Pull Request branch by checking the "Allow edits from maintainers".

jacostaperu commented 2 years ago

thanks for the response, yes NewConfoguration sounds more correct than exposing NewApplication.

I have activated "Allow edits by maintainers"

NicklasWallgren commented 2 years ago

@jacostaperu I have implemented the changes, and merged the PR. Have a look.