Skip to content
This repository has been archived by the owner on Jul 9, 2019. It is now read-only.

pogobuf.Client Methods

Andreas Reich edited this page Aug 3, 2016 · 14 revisions

pogobuf.Client Methods

Note that this page only lists the methods that deal with the client itself. The Pokémon Go API methods (which are also methods of pogobuf.Client) are on a separate page.

setAuthInfo(authType, authToken)

Sets the authentication type and token (required before making API calls).

Param Type Description
authType string Authentication provider type (ptc or google)
authToken string Authentication token received from authentication provider

setPosition(latitude, longitude, [altitude])

Sets the player's latitude and longitude. Note that this does not actually update the player location on the server, it only sets the location to be used in following API calls. To update the location on the server you probably want to call updatePlayer.

Param Type Description
latitude number The player's latitude
longitude number The player's longitude
altitude number The player's altitude (optional)

init()Promise

Performs the initial API call.

batchStart()Client

Sets batch mode. All further API requests will be held and executed in one RPC call when batchCall is called.

batchClear()

Clears the list of batched requests and aborts batch mode.

batchCall()Promise

Executes any batched requests.

setMaxTries(maxTries)

Sets the maximum times to try RPC calls until they succeed (default is 5 tries). Set to 1 to disable retry logic.

Param Type
maxTries integer

setProxy(proxy)

Sets a proxy address to use for the HTTPS RPC requests.

Param Type
proxy string