GithubHelp home page GithubHelp logo

awesome-archive / pokemongo-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rubenvereecken/pokemongo-api

0.0 0.0 0.0 701 KB

Pokemon Go API for Python

License: Other

Python 99.89% Shell 0.11%

pokemongo-api's Introduction

Pokemon Go API for Python

Installation

We do not yet have this installable as a pip package, though some headway has been made. Clone this or use this however you like.

Important note: libencrypt.so or encrypt.dll is needed in order for this to work.

Features

Our current implementaion covers most of the basics of gameplay. The following methods are availible:

# Get profile
def getProfile(self):

# Get Location
def getMapObjects(self, radius=10):

# Spin a pokestop
def getFortSearch(self, fort):

# Get encounter
def encounterPokemon(self, pokemon):

# Upon Encounter, try and catch
def catchPokemon(self, pokemon, pokeball=1):

# Evolve Pokemon
def evolvePokemon(self, pokemon):

# Transfer Pokemon
def releasePokemon(self, pokemon):

# Throw away items
def recycleItem(self, item_id, count):

# set an Egg into an incubator
def setEgg(self, item, pokemon):

# Get Eggs
def getEggs(self):

# Get Inventory
def getInventory(self):

# Get Badges
def getBadges(self):

# Get Settings
def getDownloadSettings(self):

Every method has been tested. Pull requests are encouraged.

Demo

demo.py includes a demo of the API.

โžœ  python demo.py -a "google" -u "[email protected]" -p "thepassword" -l "The Atlantic Ocean"

2016-07-17 16:26:59,947 - INFO - Creating Google session for [email protected]
2016-07-17 16:26:59,953 - INFO - Starting new HTTPS connection (1): android.clients.google.com
2016-07-17 16:27:00,362 - INFO - Starting new HTTPS connection (1): android.clients.google.com
2016-07-17 16:27:00,789 - INFO - Location: The Atlantic Ocean
2016-07-17 16:27:00,789 - INFO - Coordinates: 51.01 7.12 0.0
2016-07-17 16:27:00,793 - INFO - Starting new HTTPS connection (1): pgorelease.nianticlabs.com
2016-07-17 16:27:01,633 - INFO - creation_time: 3341800000
team: 3
avatar {
  hair: 1
  shirt: 1
  pants: 1
  hat: 1
  shoes: 1
  eyes: 1
  backpack: 1
}
max_pokemon_storage: 250
max_item_storage: 400
daily_bonus {
  next_defender_bonus_collect_timestamp_ms: 4106877052
}
currency {
  type: "STARDUST"
  quantity: 9001
}

This is achieved with minimal coding effort on the client's part (extract from demo.py):

  # ... Blabla define the parser
  if args.auth == 'ptc':
      session = api.createPTCSession(args.username, args.password, args.location)
  elif args.auth == 'google':
      session = api.createGoogleSession(args.username, args.password, args.location)

  if session: # do stuff
      profile = session.getProfile()
      logging.info(profile)

Contribution

Hell yeah! I'm on Slack too (want an invite?) if you want to have a quick chat.

I welcome all PRs but for big changes it'd be best to open an issue so I have some idea of what's going on. This thing is under heavy development after all.

Protocol

We currently use AeonLucid's Pokemon Go Protobuf protocol.

Contributors

Thanks @dmadisetti for keeping this baby up and giving it the love it deserves, along with everybody else who took the time to set up a PR!

pokemongo-api's People

Contributors

adithyaphilip avatar dmadisetti avatar dnsblah avatar dracoblue avatar egguy avatar hilburn avatar iamcarbonman avatar kazukionodera avatar mcteo avatar p0psicles avatar qazbnm456 avatar rubenvereecken avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.