d-pollard / Pokemon-GO-node-api

Pokemon Go! Node API library
MIT License
16 stars 4 forks source link

PokeGo

Pokemon GO api node.js library, still WIP
Check ExamplePromises.js, example.js, and exampleFort.js for examples

Installation & Usage:

$ git clone git@github.com:d-pollard/Pokemon-GO-node-api.git .
var Pokeio = require('./poke.io.js'); // when using poke.io.js
var Pokego = require('./pokego.js'); // when using pokego.js

Check ExamplePromises.js for the result showed in the demo or check the documentation below.

Demo:

alt tag

Documentation:

Pokeio.init(username, password, location, provider, callback)

Initializes Pokeio with either pokemon trainer club credentials or google account. Accepts locations by name or coordinates

Parameters

Pokeio.GetAccessToken(username, password, callback)

Will save the access token to the Pokeio internal state.

Parameters

Pokeio.GetApiEndpoint(callback)

Will save the api endpoint to the Pokeio internal state.

Parameters

Pokeio.GetProfile(callback)

Parameters

Pokeio.GetLocation(callback)

Reads current latitude and longitude and returns a human readable address using the google maps api.

Parameters

Pokeio.GetLocationCoords()

Returns

Pokeio.SetLocation(location, callback)

Will save cooridinates to the Pokeio internal state. Accepts raw coordinates or location name based on the type property.

Parameters

Thanks to:

Python demo: tejado
ES5 demo: Armax

Contact me

@Derek Feel free to contact me for help or anything else