This repository has been archived by the owner on Dec 15, 2018. It is now read-only.
merge develop in master #218
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* new hash engine add HashEngine + update for 0.51 version * remove lib * add 0_45 lib * add 0_51 lib
fix libs install
some inits to avoid altitude = 0
Fix a bug which occurs when altitude isn't set. Fixes #171.
Added/edited two sections in the README: * Created a new section 'Use', describing how to use pgoapi either through setuptools/pip (via requirements.txt) or through manual installation. * Modified the 'Contribution' section to make it clear that in order to fetch the submodules you must perorm a recursive clone.
b64encode returns a bytes object which cannot be serialized by json so decode them to a string beforehand.
Retain the request proto in the RpcApi object so that it does not need to be regenerated after a ServerApiEndpointRedirectException thus saving CPU cycles and hash server calls.
Remove libniahash from the 0.51 submodule, do not check for its existence when using 0.51, a little refactoring.
Make some instance variables class variables since they can and should be shared among instances, remove unnecessary json.dumps and json import, use requests' json parsing, fix exception on Python 3 from using '+' with str and bytes objects by using string formatting and .text instead of .content, fix 'reponse' typo.
Retrieve the requests remaining, period timestamp, and requests allowed information from the headers and store them in a class variable dict, they can then be checked from `HashServer.status`. If using multiple keys in the same app, it will only retain the information of the most recently used key.
Created a PgoapiException parent class that all custom exceptions inherit, created a HashingServerException parent class that all hashing server exceptions inherit, added docstrings for all exceptions, added some new exception variants to distinguish between errors from communicating with Niantic and the hashing server, added InvalidCredentialsException to distinguish between errors from invalid user input and problems from the login process, added a BadRequestException for 400 errors, added MalformedResponseException for invalid and empty server responses, added HashingQuotaExceededException for when the hash key is exhausted, check for more HTTP status codes, change some `is not None` tests to plain truth tests in some cases where no valid values would fail, raised the level of some error logging, replaced some empty exception handlers with `except Exception` to prevent catching things like KeyboardInterrupts, remove unused EmptySubrequestChainException, added BannedAccountException.
As advised by Bossland guys in #api-hashing-announcement
# Conflicts: # pgoapi/auth_ptc.py # pgoapi/pgoapi.py
Changed ptr8 implementatio to the one used in aiopgoapi Refactored request list of dicts/ints to tuples
Added exception for Google Two Factor Auth (develop)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.