Documentation
¶
Index ¶
- Constants
- func GetMapData(client *Client)
- type Auth
- type AuthedEvent
- type CatchablePokemon
- type CatchablePokemonEvent
- type Client
- type FatalErrorEvent
- type Fort
- type FortEvent
- type FortSearchedEvent
- type FortSummariesEvent
- type Forts
- type FuncJob
- type GymEvent
- type Gyms
- type Job
- type JobToRun
- type Location
- func (l *Location) GetAltitude() Locnum
- func (l *Location) GetAltitudeF() float64
- func (l *Location) GetLatitude() Locnum
- func (l *Location) GetLatitudeF() float64
- func (l *Location) GetLongitude() Locnum
- func (l *Location) GetLongitudeF() float64
- func (l *Location) GetNeighbors() []uint64
- func (l *Location) Move(newLoc *Location, speed float64)
- func (l *Location) SetAltitude(alt Locnum)
- func (l *Location) SetByCoords(lat, lng, alt float64)
- func (l *Location) SetByLocation(name string)
- func (l *Location) SetLatitude(lat Locnum)
- func (l *Location) SetLongitude(lon Locnum)
- func (l *Location) Teleport(newLoc *Location)
- type LocationSet
- type Locnum
- type LogOnDetails
- type LoggedOnEvent
- type MapDataEvent
- type MapObjectsEvent
- type Moving
- type MovingDirectionChangedEvent
- type MovingDoneEvent
- type MovingUpdateEvent
- type Msg
- type NearbyPokemon
- type NearbyPokemonEvent
- type ResponseEnvelope
- type SemiErrorEvent
- type Task
- type WildPokemon
- type WildPokemonEvent
Constants ¶
const ( WALKING_SPEED float64 = 1.3 // meters per second RUNNING_SPEED float64 = 6.4 // meters per second BIKING_SPEED float64 = 12.3 // meters per second DRIVING_SPEED float64 = 16.7 // meters per second )
Variables ¶
This section is empty.
Functions ¶
func GetMapData ¶
func GetMapData(client *Client)
Types ¶
type Auth ¶
func (*Auth) GetToken ¶
func (a *Auth) GetToken(details *LogOnDetails)
func (*Auth) SetAuthToken ¶
Helper function to set the authentication token
type AuthedEvent ¶
type AuthedEvent struct {
AuthToken string
}
type CatchablePokemon ¶
type CatchablePokemon struct {
Pokemon []*protos.MapPokemon
}
CatchablePokemon is a struct for any pokemon that are catchable
func (*CatchablePokemon) Catch ¶
func (c *CatchablePokemon) Catch()
Catch all pokemon that are catchable
type CatchablePokemonEvent ¶
type CatchablePokemonEvent struct {
Pokemons *CatchablePokemon
}
type Client ¶
type Client struct { Auth *Auth APIUrl string Location *Location Task *Task MU sync.Mutex // contains filtered or unexported fields }
type FatalErrorEvent ¶
type FatalErrorEvent struct {
Err error
}
This event is emitted when there is an error that will cause the bot to no longer run
type FortSearchedEvent ¶
type FortSearchedEvent struct {
Result *protos.FortSearchResponse
}
type FortSummariesEvent ¶
type FortSummariesEvent struct {
Summaries []*protos.FortSummary
}
type Location ¶
type Location struct { Name string Latitude float64 Longitude float64 Altitude float64 Moving *Moving MU sync.Mutex // contains filtered or unexported fields }
func (*Location) GetAltitude ¶
func (*Location) GetAltitudeF ¶
func (*Location) GetLatitude ¶
func (*Location) GetLatitudeF ¶
func (*Location) GetLongitude ¶
func (*Location) GetLongitudeF ¶
func (*Location) GetNeighbors ¶
func (*Location) Move ¶
This will call the bot to move to a new location Note: calling this while the bot is already moving will cause its currently set destination to change to the new location. If you want your bot to visit both spots, wait until the `MovingDoneEvent` is fired before calling `Move` again This function WILL BLOCK THE EVENT LOOP if you want to move somewhere I suggest running this function in its own goroutine
func (*Location) SetAltitude ¶
func (*Location) SetByCoords ¶
func (*Location) SetByLocation ¶
func (*Location) SetLatitude ¶
func (*Location) SetLongitude ¶
type LocationSet ¶
type LocationSet struct {
Location *Location
}
type LogOnDetails ¶
type LoggedOnEvent ¶
type LoggedOnEvent struct {
APIUrl string
}
This Event is fired once a successful authentication has been made either by connecting with Google, or Pokemon Trainer Club
type MapDataEvent ¶
type MapDataEvent struct{}
type MapObjectsEvent ¶
type MapObjectsEvent struct {
MapCells []*protos.MapCell
}
type Moving ¶
type MovingDirectionChangedEvent ¶
type MovingDirectionChangedEvent struct {
Location *Location
}
type MovingDoneEvent ¶
type MovingDoneEvent struct {
Location *Location
}
This Event is fired once the bot has reached its destination (using Location.Move)
type MovingUpdateEvent ¶
type MovingUpdateEvent struct { Location *Location DistanceTravelled float64 DistanceTotal float64 }
This Event is fired while the bot is in transit (using Location.Move)
type NearbyPokemon ¶
type NearbyPokemon struct {
Pokemon []*protos.NearbyPokemon
}
NearbyPokemon is a struct for any pokemon that are nearby (these pokemon will not show any latitude or longitude)
type NearbyPokemonEvent ¶
type NearbyPokemonEvent struct {
Pokemons *NearbyPokemon
}
type ResponseEnvelope ¶
type ResponseEnvelope struct {
Resp *protos.ResponseEnvelope
}
type SemiErrorEvent ¶
type SemiErrorEvent struct {
Err error
}
type Task ¶
Task .
type WildPokemonEvent ¶
type WildPokemonEvent struct {
Pokemons *WildPokemon
}