client

package
v0.0.0-...-83b534f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2017 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPtr8             = ""
	DefaultLehmerSeed int64 = 16807
)
View Source
var (
	Debug    = false
	DebugGMO = false
)
View Source
var (
	Devices = [][]string{
		{"iPhone5,1", "iPhone", "N41AP"},
		{"iPhone5,2", "iPhone", "N42AP"},
		{"iPhone5,3", "iPhone", "N48AP"},
		{"iPhone5,4", "iPhone", "N49AP"},
		{"iPhone6,1", "iPhone", "N51AP"},
		{"iPhone6,2", "iPhone", "N53AP"},
		{"iPhone7,1", "iPhone", "N56AP"},
		{"iPhone7,2", "iPhone", "N61AP"},
		{"iPhone8,1", "iPhone", "N71AP"},
		{"iPhone8,2", "iPhone", "N66AP"},
		{"iPhone8,4", "iPhone", "N69AP"},
		{"iPhone9,1", "iPhone", "D10AP"},
		{"iPhone9,2", "iPhone", "D11AP"},
		{"iPhone9,3", "iPhone", "D101AP"},
		{"iPhone9,4", "iPhone", "D111AP"},
	}

	OsVersions = []string{

		"8.1.1", "8.1.2", "8.1.3", "8.2", "8.3",
		"8.4", "8.4.1",

		"9.0", "9.0.1", "9.0.2",
		"9.1", "9.2", "9.2.1", "9.3", "9.3.1",
		"9.3.2", "9.3.3", "9.3.4", "9.3.5",

		"10.0", "10.0.1", "10.0.2", "10.0.3", "10.1", "10.1.1",
	}
)

Functions

func NewDevice

func NewDevice(p auth.Provider) *protos.Signature_DeviceInfo

Types

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

func New

func New(opts *Options) (*Instance, error)

func (*Instance) BuildCommon

func (c *Instance) BuildCommon(init bool) []*protos.Request

func (*Instance) Call

func (c *Instance) Call(ctx context.Context, requests ...*protos.Request) (*protos.ResponseEnvelope, error)

func (*Instance) CallWithPlatformRequests

func (c *Instance) CallWithPlatformRequests(ctx context.Context, requests []*protos.Request, prs []*protos.RequestEnvelope_PlatformRequest) (*protos.ResponseEnvelope, error)

func (*Instance) CatchPokemon

func (c *Instance) CatchPokemon(ctx context.Context, eid uint64, spawnPoint string, iid protos.ItemId, nrs float64, nhp float64, hit bool, spin float64) (*protos.CatchPokemonResponse, error)

func (*Instance) CatchPokemonRequest

func (c *Instance) CatchPokemonRequest(eid uint64, spawnPoint string, iid protos.ItemId, nrs float64, nhp float64, hit bool, spin float64) (*protos.Request, error)

func (*Instance) CheckAwardedBadges

func (c *Instance) CheckAwardedBadges(ctx context.Context) (*protos.CheckAwardedBadgesResponse, error)

func (*Instance) CheckAwardedBadgesRequest

func (c *Instance) CheckAwardedBadgesRequest() (*protos.Request, error)

func (*Instance) CheckChallenge

func (c *Instance) CheckChallenge(ctx context.Context) (*protos.CheckChallengeResponse, error)

func (*Instance) CheckChallengeRequest

func (c *Instance) CheckChallengeRequest() (*protos.Request, error)

func (*Instance) ClaimCodename

func (c *Instance) ClaimCodename(ctx context.Context, codename string) (*protos.ClaimCodenameResponse, error)

func (*Instance) ClaimCodenameRequest

func (c *Instance) ClaimCodenameRequest(codename string) (*protos.Request, error)

func (*Instance) DownloadItemTemplates

func (c *Instance) DownloadItemTemplates(ctx context.Context, paginate bool, offset int32, ts uint64) (*protos.DownloadItemTemplatesResponse, error)

func (*Instance) DownloadItemTemplatesRequest

func (c *Instance) DownloadItemTemplatesRequest(paginate bool, offset int32, ts uint64) (*protos.Request, error)

func (*Instance) DownloadRemoteConfigVersion

func (c *Instance) DownloadRemoteConfigVersion(ctx context.Context, platform protos.Platform, appVersion int) (*protos.DownloadSettingsResponse, error)

func (*Instance) DownloadRemoteConfigVersionRequest

func (c *Instance) DownloadRemoteConfigVersionRequest(platform protos.Platform, appVersion int) (*protos.Request, error)

func (*Instance) DownloadSettings

func (c *Instance) DownloadSettings(ctx context.Context, hash string) (*protos.DownloadSettingsResponse, error)

func (*Instance) DownloadSettingsRequest

func (c *Instance) DownloadSettingsRequest(hash string) (*protos.Request, error)

func (*Instance) Encounter

func (c *Instance) Encounter(ctx context.Context, eid uint64, spawnPoint string) (*protos.EncounterResponse, error)

func (*Instance) EncounterRequest

func (c *Instance) EncounterRequest(eid uint64, spawnPoint string) (*protos.Request, error)

func (*Instance) EncounterTutorialComplete

func (c *Instance) EncounterTutorialComplete(ctx context.Context, id int32) (*protos.EncounterTutorialCompleteResponse, error)

func (*Instance) EncounterTutorialCompleteRequest

func (c *Instance) EncounterTutorialCompleteRequest(id int32) (*protos.Request, error)

func (*Instance) FortSearch

func (c *Instance) FortSearch(ctx context.Context, fortid string, lat, lon float64) (*protos.FortSearchResponse, error)

func (*Instance) FortSearchRequest

func (c *Instance) FortSearchRequest(fortid string, lat, lon float64) (*protos.Request, error)

func (*Instance) GetAssetDigest

func (c *Instance) GetAssetDigest(ctx context.Context, platform protos.Platform, manufacturer, model, locale string, appVersion int) (*protos.GetAssetDigestResponse, error)

func (*Instance) GetAssetDigestRequest

func (c *Instance) GetAssetDigestRequest(platform protos.Platform, manufacturer, model, locale string, appVersion int) (*protos.Request, error)

func (*Instance) GetBuddyWalked

func (c *Instance) GetBuddyWalked(ctx context.Context) (*protos.GetBuddyWalkedResponse, error)

func (*Instance) GetBuddyWalkedRequest

func (c *Instance) GetBuddyWalkedRequest() (*protos.Request, error)

func (*Instance) GetDownloadURLs

func (c *Instance) GetDownloadURLs(ctx context.Context, ids []string) (*protos.GetDownloadUrlsResponse, error)

func (*Instance) GetDownloadURLsRequest

func (c *Instance) GetDownloadURLsRequest(ids []string) (*protos.Request, error)

func (*Instance) GetHatchedEggs

func (c *Instance) GetHatchedEggs(ctx context.Context) (*protos.GetHatchedEggsResponse, error)

func (*Instance) GetHatchedEggsRequest

func (c *Instance) GetHatchedEggsRequest() (*protos.Request, error)

func (*Instance) GetInventory

func (c *Instance) GetInventory(ctx context.Context, last int64) (*protos.GetInventoryResponse, error)

func (*Instance) GetInventoryRequest

func (c *Instance) GetInventoryRequest(last int64) (*protos.Request, error)

func (*Instance) GetMap

func (c *Instance) GetMap(ctx context.Context) (*protos.GetMapObjectsResponse, *protos.ResponseEnvelope, error)

func (*Instance) GetMapObjects

func (c *Instance) GetMapObjects(ctx context.Context, cellIDs []uint64, sinceTimestampMs []int64) (*protos.GetMapObjectsResponse, error)

func (*Instance) GetMapObjectsRequest

func (c *Instance) GetMapObjectsRequest(cellIDs []uint64, sinceTimestampMs []int64) (*protos.Request, error)

func (*Instance) GetPlayer

func (c *Instance) GetPlayer(ctx context.Context, country, language, timezone string) (*protos.GetPlayerResponse, error)

func (*Instance) GetPlayerProfile

func (c *Instance) GetPlayerProfile(ctx context.Context, name string) (*protos.GetPlayerProfileResponse, error)

func (*Instance) GetPlayerProfileRequest

func (c *Instance) GetPlayerProfileRequest(name string) (*protos.Request, error)

func (*Instance) GetPlayerRequest

func (c *Instance) GetPlayerRequest(country, language, timezone string) (*protos.Request, error)

func (*Instance) Init

func (c *Instance) Init(ctx context.Context) (*protos.GetPlayerResponse, *protos.ResponseEnvelope, error)

func (*Instance) LevelUpRewards

func (c *Instance) LevelUpRewards(ctx context.Context, level int32) (*protos.LevelUpRewardsResponse, error)

func (*Instance) LevelUpRewardsRequest

func (c *Instance) LevelUpRewardsRequest(level int32) (*protos.Request, error)

func (*Instance) ListAvatarCustomizations

func (c *Instance) ListAvatarCustomizations(ctx context.Context, genre int, slots []protos.Slot, filters []protos.Filter) (*protos.ListAvatarCustomizationsResponse, error)

func (*Instance) ListAvatarCustomizationsRequest

func (c *Instance) ListAvatarCustomizationsRequest(genre int, slots []protos.Slot, filters []protos.Filter) (*protos.Request, error)

func (Instance) MapSettings

func (c Instance) MapSettings() protos.MapSettings

func (*Instance) MarkTutorialComplete

func (c *Instance) MarkTutorialComplete(ctx context.Context, ids []protos.TutorialState, sendMail, sendNotif bool) (*protos.MarkTutorialCompleteResponse, error)

func (*Instance) MarkTutorialCompleteRequest

func (c *Instance) MarkTutorialCompleteRequest(ids []protos.TutorialState, sendMail, sendNotif bool) (*protos.Request, error)

func (*Instance) RegisterBackgroundDevice

func (c *Instance) RegisterBackgroundDevice(ctx context.Context, device string, devicetype string) (*protos.RegisterBackgroundDeviceResponse, error)

func (*Instance) RegisterBackgroundDeviceRequest

func (c *Instance) RegisterBackgroundDeviceRequest(device string, devicetype string) (*protos.Request, error)

func (*Instance) ReleaseMultiPokemon

func (c *Instance) ReleaseMultiPokemon(ctx context.Context, pids []uint64) (*protos.ReleasePokemonResponse, error)

func (*Instance) ReleaseMultiPokemonRequest

func (c *Instance) ReleaseMultiPokemonRequest(pids []uint64) (*protos.Request, error)

func (*Instance) ReleasePokemon

func (c *Instance) ReleasePokemon(ctx context.Context, pid uint64) (*protos.ReleasePokemonResponse, error)

func (*Instance) ReleasePokemonRequest

func (c *Instance) ReleasePokemonRequest(pid uint64) (*protos.Request, error)

func (*Instance) SetAuthToken

func (c *Instance) SetAuthToken(authToken string)

func (*Instance) SetAvatar

func (c *Instance) SetAvatar(ctx context.Context, skin, hair, shirt, pants, hat, shoes, avatar, eyes, backpack int) (*protos.SetAvatarResponse, error)

func (*Instance) SetAvatarRequest

func (c *Instance) SetAvatarRequest(skin, hair, shirt, pants, hat, shoes, avatar, eyes, backpack int) (*protos.Request, error)

func (*Instance) SetPosition

func (c *Instance) SetPosition(ctx context.Context, lat, lon, accu, alt float64) error

func (*Instance) VerifyChallenge

func (c *Instance) VerifyChallenge(ctx context.Context, token string) (*protos.VerifyChallengeResponse, error)

func (*Instance) VerifyChallengeRequest

func (c *Instance) VerifyChallengeRequest(token string) (*protos.Request, error)

type Options

type Options struct {
	Version              int
	SignatureInfo        SignatureInfo
	AuthProvider         auth.Provider
	HashProvider         hash.Provider
	SimulateApp          bool
	AutoCompleteTutorial bool
	GoogleMapsKey        string

	MaxTries             int
	MapObjectsMinDelay   time.Duration
	MinRequestInterval   time.Duration
	MapObjectsThrottling bool
}

type Player

type Player struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Player) Accuracy

func (p *Player) Accuracy() float64

func (*Player) Altitude

func (p *Player) Altitude() float64

func (*Player) Latitude

func (p *Player) Latitude() float64

func (*Player) Longitude

func (p *Player) Longitude() float64

func (*Player) SetAccuracy

func (p *Player) SetAccuracy(l float64)

func (*Player) SetAltitude

func (p *Player) SetAltitude(l float64)

func (*Player) SetLatitude

func (p *Player) SetLatitude(l float64)

func (*Player) SetLongitude

func (p *Player) SetLongitude(l float64)

type RPC

type RPC struct {
	// contains filtered or unexported fields
}

RPC is used to communicate with the Pokémon Go API

func NewRPC

func NewRPC() *RPC

NewRPC constructs a Pokémon Go RPC API client

func (*RPC) Request

func (c *RPC) Request(ctx context.Context, endpoint string, requestEnvelope *protos.RequestEnvelope) (responseEnvelope *protos.ResponseEnvelope, err error)

Request queries the Pokémon Go API will all pending requests

type SignatureInfo

type SignatureInfo struct {
	DeviceInfo *protos.Signature_DeviceInfo
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL