Skip to content

Commit

Permalink
Swap over to Aeon
Browse files Browse the repository at this point in the history
  • Loading branch information
dmadisetti committed Jul 18, 2016
1 parent 53db6e0 commit 9b84d68
Show file tree
Hide file tree
Showing 74 changed files with 6,193 additions and 11,892 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "proto"]
path = proto
url = https://github.com/rubenvereecken/protocol.git
url = https://github.com/AeonLucid/POGOProtos
Empty file added __init__.py
Empty file.
7 changes: 5 additions & 2 deletions compile.sh
Expand Up @@ -2,5 +2,8 @@

mkdir -p pogo/proto
rm -rf pogo/proto/*
protoc --proto_path=proto --python_out=pogo/proto `find proto -name "*proto"`
touch pogo/proto/__init__.py
cd ./proto/
./compile.py -l python -o ../pogo/proto
cd ../
find ./pogo/proto/ -type d -exec touch {}/__init__.py \;
echo "'Generated'; import os; import sys; sys.path.append(os.path.dirname(os.path.realpath(__file__)))" > ./pogo/proto/__init__.py
7 changes: 3 additions & 4 deletions pogo/api.py
Expand Up @@ -6,8 +6,6 @@
import random
import logging

from proto import request_pb2

from session import PogoSession
import location

Expand Down Expand Up @@ -83,8 +81,7 @@ def createPTCSession(username, pw, startLocation):
try:
ticket = re.sub('.*ticket=', '', authResponse.history[0].headers['Location'])
except Exception as e:
if DEBUG:
print(authResponse.json()['errors'][0])
logging.error(authResponse.json()['errors'][0])
return None

data1 = {
Expand All @@ -99,3 +96,5 @@ def createPTCSession(username, pw, startLocation):
access_token = re.sub('.*access_token=', '', access_token)

return createPogoSession(session, 'ptc', access_token, startLocation)


Binary file added pogo/api.pyc
Binary file not shown.
5 changes: 2 additions & 3 deletions pogo/demo.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/python
import argparse
import logging
import sys
Expand All @@ -11,7 +12,7 @@ def setupLogger():
logger.setLevel(logging.INFO)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
formatter = logging.Formatter('Line %(lineno)d,%(filename)s - %(asctime)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)

Expand All @@ -26,9 +27,7 @@ def setupLogger():
parser.add_argument("-u", "--username", help="Username", required=True)
parser.add_argument("-p", "--password", help="Password", required=True)
parser.add_argument("-l", "--location", help="Location", required=True)
# parser.add_argument("-d", "--debug", help="Debug Mode", action='store_true')
parser.add_argument("-s", "--client_secret", help="PTC Client Secret")
# parser.set_defaults(DEBUG=True)
args = parser.parse_args()

if args.auth not in ['ptc', 'google']:
Expand Down
Binary file added pogo/location.pyc
Binary file not shown.
272 changes: 272 additions & 0 deletions pogo/proto/Data/Pokemon_pb2.py

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

Empty file added pogo/proto/Data/__init__.py
Empty file.

0 comments on commit 9b84d68

Please sign in to comment.