This is an open-source Pokemon GO server, written in Golang.
Fetch dependencies using govendor sync
. The server, by default, runs on port 8080
.
An incoming request is first unmarshaled from ProtoBufs. A handler function is selected from the handlers
package and is used to handle the response.
Right now, only a few handlers are implemented. Here's how to write your own.
- Create your file in the
handlers
directory, namedyour_request.go
where YourRequest is the name of the request type, as seen inPokeProtos.NetworkingEnvelopes.RequestEnvelope
. For example, a handler for theGetPlayer
request would be namedhandlers/get_player.go
. - Declare a function named
YourRequest
in the file you just created. It must accept a pointer toPokeProtos.request
and return a[]byte
, which should be the response, marshalled into ProtoBufs using the correct buffer for your request. - Add your function to the
switch-case
statement inserver.go
, take it's response into theresponses
byte slice. - That's it.
This software is licensed under the MIT License, as specified in the LICENSE
file in the root of this repository. This software DOES NOT redistribute copyrighted material or artwork. Pokémon and Pokémon GO are registerted trademarks of Nintendo Co., Ltd.