-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Validation - Killswitch on API Change #5826
Conversation
Validate if Official API has changed
@ElliotRobot1, thanks for your PR! By analyzing the history of the files in this pull request, we identified @douglascamata, @TheSavior and @rawgni to be potential reviewers. |
Valid api is 0.45.0, not 0.43.0 |
@houkop correct. Sorry, was testing. Corrected. |
I believe the safe approach would be to check the current version on every login. The bot will have to login every time the session becomes stale. If Niantic changes the api version mid-botting, they will probably flag the account immediately. Instead of prompting if the user wants to take a risk a flag should be added to the config.json with the default value being false. EDIT: Also, in order to support higher versions in the future, we should actually check if our version is the same of bigger than Niantic's minimum version. Just in case we start going faster than Niantic one day :) By the way, Niantic just changed the minimum API version to 0.47.0 |
should be better if we can add this on the config file...
also, I think the better place for this is on api_wrapper.py. We could add another def check_niantic_api. And use it inside def login... this way, it would always check every time it logs in. But yes, there's should be an option to turn this off.. then maybe add a warning when this is off... Anyway, just a suggestion... I'm not a python programmer.. 😄 |
@reigelgallarde I have a bash script wrapping run.sh to check api version and switch accounts every hour, not sure if it's a better place to hold it. |
@tiagoAnon @reigelgallarde Took your advice. Added logic to API Wrapper to handle to re-loggin on stale session. Added flag to config as well to override API check. |
@ChaosMarc can you merge this? |
link = "https://pgorelease.nianticlabs.com/plfe/version" | ||
f = urllib.urlopen(link) | ||
myfile = f.read() | ||
self.config.check_niantic_api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is line 100 an extra?
Why kill switch was merged into master but no dev? |
Short Description:
Check if Niantic API is equal to current API. If not, warn and prompt user .
Fixes/Resolves/Closes (please use correct syntax):
Validate if Official API has changed