Skip to content
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

Update to 0.69.1 #2

Merged
merged 3 commits into from
Aug 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pgoapi/auth_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import logging

from pgoapi.auth import Auth
from pgoapi.exceptions import AuthException, InvalidCredentialsException
from pgoapi.exceptions import AuthException, InvalidCredentialsException, AuthGoogleTwoFactorRequiredException
from gpsoauth import perform_master_login, perform_oauth
from six import string_types

Expand Down Expand Up @@ -57,6 +57,9 @@ def user_login(self, username, password):

user_login = perform_master_login(username, password, self.GOOGLE_LOGIN_ANDROID_ID, proxy=self._proxy)

if user_login and user_login.get('Error', None) == 'NeedsBrowser':
raise AuthGoogleTwoFactorRequiredException(user_login['Url'], user_login['ErrorDetail'])

try:
refresh_token = user_login.get('Token', None)
except ConnectionError as e:
Expand Down
8 changes: 8 additions & 0 deletions pgoapi/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ class InvalidCredentialsException(AuthException, ValueError):
class AuthTokenExpiredException(PgoapiError):
"""Raised when your auth token has expired (code 102)"""

class AuthGoogleTwoFactorRequiredException(Exception):
def __init__(self, redirectUrl, message):
self.redirectUrl = redirectUrl
self.message = message

def __str__(self):
return self.message


class BadRequestException(PgoapiError):
"""Raised when HTTP code 400 is returned"""
Expand Down
83 changes: 83 additions & 0 deletions pgoapi/protos/pogoprotos/data/raid/event_info_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions pgoapi/protos/pogoprotos/data/redeem_passcode_reward_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions pgoapi/protos/pogoprotos/enums/badge_type_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 8 additions & 15 deletions pgoapi/protos/pogoprotos/inventory/exclusive_ticket_info_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading