Documentation ¶
Index ¶
- Constants
- Variables
- func ActivateCelestialItemHandler(c echo.Context) error
- func BuildBuildingHandler(c echo.Context) error
- func BuildCancelableHandler(c echo.Context) error
- func BuildDefenseHandler(c echo.Context) error
- func BuildHandler(c echo.Context) error
- func BuildProductionHandler(c echo.Context) error
- func BuildShipsHandler(c echo.Context) error
- func BuildTechnologyHandler(c echo.Context) error
- func BuyOfferOfTheDayHandler(c echo.Context) error
- func CancelBuildingHandler(c echo.Context) error
- func CancelFleetHandler(c echo.Context) error
- func CancelResearchHandler(c echo.Context) error
- func ConstructionsBeingBuiltHandler(c echo.Context) error
- func DeleteEspionageMessagesHandler(c echo.Context) error
- func DeleteMessageHandler(c echo.Context) error
- func DeleteMessagesFromTabHandler(c echo.Context) error
- func Distance(c1, c2 Coordinate, universeSize, nbSystems int64, ...) (distance int64)
- func DoAuctionHandler(c echo.Context) error
- func GalaxyInfosHandler(c echo.Context) error
- func GetAlliancePageContentHandler(c echo.Context) error
- func GetAttacksHandler(c echo.Context) error
- func GetAuctionHandler(c echo.Context) error
- func GetCelestialItemsHandler(c echo.Context) error
- func GetDefenseHandler(c echo.Context) error
- func GetEmpireHandler(c echo.Context) error
- func GetEspionageReportForHandler(c echo.Context) error
- func GetEspionageReportHandler(c echo.Context) error
- func GetEspionageReportMessagesHandler(c echo.Context) error
- func GetFacilitiesHandler(c echo.Context) error
- func GetFleetsHandler(c echo.Context) error
- func GetFromGameHandler(c echo.Context) error
- func GetLanguageHandler(c echo.Context) error
- func GetMoonByCoordHandler(c echo.Context) error
- func GetMoonHandler(c echo.Context) error
- func GetMoonsHandler(c echo.Context) error
- func GetPlanetByCoordHandler(c echo.Context) error
- func GetPlanetHandler(c echo.Context) error
- func GetPlanetsHandler(c echo.Context) error
- func GetPriceHandler(c echo.Context) error
- func GetProductionHandler(c echo.Context) error
- func GetResearchHandler(c echo.Context) error
- func GetResourceSettingsHandler(c echo.Context) error
- func GetResourcesBuildingsHandler(c echo.Context) error
- func GetResourcesHandler(c echo.Context) error
- func GetServerHandler(c echo.Context) error
- func GetShipsHandler(c echo.Context) error
- func GetSlotsHandler(c echo.Context) error
- func GetStaticHEADHandler(c echo.Context) error
- func GetStaticHandler(c echo.Context) error
- func GetUniverseNameHandler(c echo.Context) error
- func GetUniverseSpeedFleetHandler(c echo.Context) error
- func GetUniverseSpeedHandler(c echo.Context) error
- func GetUserInfosHandler(c echo.Context) error
- func GetUsernameHandler(c echo.Context) error
- func HomeHandler(c echo.Context) error
- func I64Ptr(v int64) *int64
- func IsAjaxPage(vals url.Values) bool
- func IsBuildingID(id int64) bool
- func IsDefenseID(id int64) bool
- func IsFacilityID(id int64) bool
- func IsKnowFullPage(vals url.Values) bool
- func IsResourceBuildingID(id int64) bool
- func IsShipID(id int64) bool
- func IsTechID(id int64) bool
- func IsUnderAttackHandler(c echo.Context) error
- func LoginHandler(c echo.Context) error
- func LogoutHandler(c echo.Context) error
- func MaxInt(vals ...int64) int64
- func MinInt(vals ...int64) int64
- func PageContentHandler(c echo.Context) error
- func ParseInt(val string) int64
- func PhalanxHandler(c echo.Context) error
- func PostToGameHandler(c echo.Context) error
- func SendFleetHandler(c echo.Context) error
- func SendIPMHandler(c echo.Context) error
- func SendMessageHandler(c echo.Context) error
- func ServerTimeHandler(c echo.Context) error
- func ServerURLHandler(c echo.Context) error
- func ServerVersionHandler(c echo.Context) error
- func SetResourceSettingsHandler(c echo.Context) error
- func SetUserAgentHandler(c echo.Context) error
- func SkipInterceptor(opt *options)
- func TasksHandler(c echo.Context) error
- func TeardownHandler(c echo.Context) error
- type APIResp
- type AllianceInfos
- type AttackEvent
- type Attacker
- type Auction
- type Base
- func (b Base) GetID() ID
- func (b Base) GetName() string
- func (b Base) GetRequirements() map[ID]int64
- func (b Base) IsAvailable(t CelestialType, lazyResourcesBuildings LazyResourcesBuildings, ...) bool
- func (b Base) IsFulfilled(levelNeeded int64, lazyResourcesBuildings LazyResourcesBuildings, ...) bool
- type BaseBuilding
- func (b BaseBuilding) ConstructionTime(level, universeSpeed int64, facilities Facilities, ...) time.Duration
- func (b BaseBuilding) DeconstructionPrice(level int64, techs Researches) Resources
- func (b BaseBuilding) GetLevel(lazyResourcesBuildings LazyResourcesBuildings, lazyFacilities LazyFacilities, ...) int64
- type BaseDefender
- func (b BaseDefender) ConstructionTime(nbr, universeSpeed int64, facilities Facilities, ...) time.Duration
- func (b BaseDefender) GetPrice(nbr int64) Resources
- func (b BaseDefender) GetRapidfireAgainst() map[ID]int64
- func (b BaseDefender) GetRapidfireFrom() map[ID]int64
- func (b BaseDefender) GetShieldPower(researches Researches) int64
- func (b BaseDefender) GetStructuralIntegrity(researches Researches) int64
- func (b BaseDefender) GetWeaponPower(researches Researches) int64
- type BaseDefense
- type BaseLevelable
- type BaseOgameObj
- type BaseShip
- type BaseTechnology
- type Building
- type Celestial
- type CelestialID
- type CelestialType
- type CharacterClass
- type ChatMsg
- type ChatPayload
- type ChatPostResp
- type CheckTargetResponse
- type CombatReportSummary
- type CombatUnit
- type Config
- type Coordinate
- func (c Coordinate) Debris() Coordinate
- func (c Coordinate) Equal(v Coordinate) bool
- func (c Coordinate) IsDebris() bool
- func (c Coordinate) IsMoon() bool
- func (c Coordinate) IsPlanet() bool
- func (c Coordinate) Moon() Coordinate
- func (c Coordinate) Planet() Coordinate
- func (c Coordinate) String() string
- type DMCost
- type DMCosts
- type Defender
- type DefenderObj
- type Defense
- type DefensesInfos
- type EspionageReport
- func (r EspionageReport) DefensesInfos() *DefensesInfos
- func (r EspionageReport) Facilities() *Facilities
- func (r EspionageReport) Loot(characterClass CharacterClass) Resources
- func (r EspionageReport) PlunderRatio(characterClass CharacterClass) float64
- func (r EspionageReport) Researches() *Researches
- func (r EspionageReport) ResourcesBuildings() *ResourcesBuildings
- func (r EspionageReport) ShipsInfos() *ShipsInfos
- type EspionageReportSummary
- type EspionageReportType
- type ExponentialBackoff
- type Extractor
- type ExtractorV6
- func (e ExtractorV6) ExtractActivateAutofocusFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractAdmiral(pageHTML []byte) bool
- func (e ExtractorV6) ExtractAdmiralFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractAjaxChatToken(pageHTML []byte) (string, error)
- func (e ExtractorV6) ExtractAllResources(pageHTML []byte) (map[CelestialID]Resources, error)
- func (e ExtractorV6) ExtractAnimatedOverviewFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractAnimatedSlidersFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractAttacks(pageHTML []byte) ([]AttackEvent, error)
- func (e ExtractorV6) ExtractAttacksFromDoc(doc *goquery.Document, clock clockwork.Clock) ([]AttackEvent, error)
- func (e ExtractorV6) ExtractAuction(pageHTML []byte) (Auction, error)
- func (e ExtractorV6) ExtractAuctioneerNotificationsFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractBodyIDFromDoc(doc *goquery.Document) string
- func (e ExtractorV6) ExtractBuffActivation(pageHTML []byte) (string, []Item, error)
- func (e ExtractorV6) ExtractCancelBuildingInfos(pageHTML []byte) (token string, techID, listID int64, err error)
- func (e ExtractorV6) ExtractCancelResearchInfos(pageHTML []byte) (token string, techID, listID int64, err error)
- func (e ExtractorV6) ExtractCelestial(pageHTML []byte, b *OGame, v interface{}) (Celestial, error)
- func (e ExtractorV6) ExtractCelestialByIDFromDoc(doc *goquery.Document, b *OGame, celestialID CelestialID) (Celestial, error)
- func (e ExtractorV6) ExtractCelestialFromDoc(doc *goquery.Document, b *OGame, v interface{}) (Celestial, error)
- func (e ExtractorV6) ExtractCelestials(pageHTML []byte, b *OGame) ([]Celestial, error)
- func (e ExtractorV6) ExtractCelestialsFromDoc(doc *goquery.Document, b *OGame) ([]Celestial, error)
- func (e ExtractorV6) ExtractCharacterClass(pageHTML []byte) (CharacterClass, error)
- func (e ExtractorV6) ExtractCharacterClassFromDoc(doc *goquery.Document) (CharacterClass, error)
- func (e ExtractorV6) ExtractCombatReportMessagesFromDoc(doc *goquery.Document) ([]CombatReportSummary, int64)
- func (e ExtractorV6) ExtractCombatReportMessagesSummary(pageHTML []byte) ([]CombatReportSummary, int64)
- func (e ExtractorV6) ExtractCommander(pageHTML []byte) bool
- func (e ExtractorV6) ExtractCommanderFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractConstructions(pageHTML []byte) (buildingID ID, buildingCountdown int64, researchID ID, researchCountdown int64)
- func (e ExtractorV6) ExtractCoord(v string) (coord Coordinate)
- func (e ExtractorV6) ExtractDMCosts(pageHTML []byte) (DMCosts, error)
- func (e ExtractorV6) ExtractDefense(pageHTML []byte) (DefensesInfos, error)
- func (e ExtractorV6) ExtractDefenseFromDoc(doc *goquery.Document) (DefensesInfos, error)
- func (e ExtractorV6) ExtractDisableChatBarFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractDisableOutlawWarningFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractEconomyNotificationsFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractEmpire(pageHTML []byte, nbr int64) (interface{}, error)
- func (e ExtractorV6) ExtractEngineer(pageHTML []byte) bool
- func (e ExtractorV6) ExtractEngineerFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractEspionageReport(pageHTML []byte, location *time.Location) (EspionageReport, error)
- func (e ExtractorV6) ExtractEspionageReportFromDoc(doc *goquery.Document, location *time.Location) (EspionageReport, error)
- func (e ExtractorV6) ExtractEspionageReportMessageIDs(pageHTML []byte) ([]EspionageReportSummary, int64)
- func (e ExtractorV6) ExtractEspionageReportMessageIDsFromDoc(doc *goquery.Document) ([]EspionageReportSummary, int64)
- func (e ExtractorV6) ExtractEventsShowFromDoc(doc *goquery.Document) int64
- func (e ExtractorV6) ExtractFacilities(pageHTML []byte) (Facilities, error)
- func (e ExtractorV6) ExtractFacilitiesFromDoc(doc *goquery.Document) (Facilities, error)
- func (e ExtractorV6) ExtractFederation(pageHTML []byte) url.Values
- func (e ExtractorV6) ExtractFleet1Ships(pageHTML []byte) ShipsInfos
- func (e ExtractorV6) ExtractFleet1ShipsFromDoc(doc *goquery.Document) (s ShipsInfos)
- func (e ExtractorV6) ExtractFleetDeutSaveFactor(pageHTML []byte) float64
- func (e ExtractorV6) ExtractFleets(pageHTML []byte) (res []Fleet)
- func (e ExtractorV6) ExtractFleetsFromDoc(doc *goquery.Document) (res []Fleet)
- func (e ExtractorV6) ExtractFleetsFromEventList(pageHTML []byte) []Fleet
- func (e ExtractorV6) ExtractFleetsFromEventListFromDoc(doc *goquery.Document) []Fleet
- func (e ExtractorV6) ExtractGalaxyInfos(pageHTML []byte, botPlayerName string, botPlayerID, botPlayerRank int64) (SystemInfos, error)
- func (e ExtractorV6) ExtractGeologist(pageHTML []byte) bool
- func (e ExtractorV6) ExtractGeologistFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractHiddenFields(pageHTML []byte) (fields url.Values)
- func (e ExtractorV6) ExtractHiddenFieldsFromDoc(doc *goquery.Document) url.Values
- func (e ExtractorV6) ExtractHighscore(pageHTML []byte) (Highscore, error)
- func (e ExtractorV6) ExtractHighscoreFromDoc(doc *goquery.Document) (Highscore, error)
- func (e ExtractorV6) ExtractIPM(pageHTML []byte) (duration, max int64, token string)
- func (e ExtractorV6) ExtractIPMFromDoc(doc *goquery.Document) (duration, max int64, token string)
- func (e ExtractorV6) ExtractIsInVacation(pageHTML []byte) bool
- func (e ExtractorV6) ExtractIsInVacationFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractIsMobile(pageHTML []byte) bool
- func (e ExtractorV6) ExtractIsMobileFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractJumpGate(pageHTML []byte) (ShipsInfos, string, []MoonID, int64)
- func (e ExtractorV6) ExtractMobileVersionFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractMoon(pageHTML []byte, b *OGame, v interface{}) (Moon, error)
- func (e ExtractorV6) ExtractMoonByCoord(pageHTML []byte, b *OGame, coord Coordinate) (Moon, error)
- func (e ExtractorV6) ExtractMoonByCoordFromDoc(doc *goquery.Document, b *OGame, coord Coordinate) (Moon, error)
- func (e ExtractorV6) ExtractMoonByIDFromDoc(doc *goquery.Document, b *OGame, moonID MoonID) (Moon, error)
- func (e ExtractorV6) ExtractMoonFromDoc(doc *goquery.Document, b *OGame, v interface{}) (Moon, error)
- func (e ExtractorV6) ExtractMoons(pageHTML []byte, b *OGame) []Moon
- func (e ExtractorV6) ExtractMoonsFromDoc(doc *goquery.Document, b *OGame) []Moon
- func (e ExtractorV6) ExtractMsgResultsPerPageFromDoc(doc *goquery.Document) int64
- func (e ExtractorV6) ExtractNotifAccountFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractNotifAllianceBroadcastsFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractNotifAllianceMessagesFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractNotifAuctionsFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractNotifBuildListFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractNotifForeignEspionageFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractNotifFriendlyFleetActivitiesFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractNotifHostileFleetActivitiesFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractOGameSession(pageHTML []byte) string
- func (e ExtractorV6) ExtractOGameSessionFromDoc(doc *goquery.Document) string
- func (e ExtractorV6) ExtractOGameTimestampFromBytes(pageHTML []byte) int64
- func (e ExtractorV6) ExtractOfferOfTheDay(pageHTML []byte) (int64, string, PlanetResources, Multiplier, error)
- func (e ExtractorV6) ExtractOfferOfTheDayFromDoc(doc *goquery.Document) (price int64, importToken string, planetResources PlanetResources, ...)
- func (e ExtractorV6) ExtractOgameTimestamp(pageHTML []byte) int64
- func (e ExtractorV6) ExtractOgameTimestampFromDoc(doc *goquery.Document) int64
- func (e ExtractorV6) ExtractOverviewProduction(pageHTML []byte) ([]Quantifiable, int64, error)
- func (e ExtractorV6) ExtractOverviewProductionFromDoc(doc *goquery.Document) ([]Quantifiable, error)
- func (e ExtractorV6) ExtractOverviewShipSumCountdownFromBytes(pageHTML []byte) int64
- func (e ExtractorV6) ExtractPhalanx(pageHTML []byte) ([]Fleet, error)
- func (e ExtractorV6) ExtractPlanet(pageHTML []byte, v interface{}, b *OGame) (Planet, error)
- func (e ExtractorV6) ExtractPlanetByCoord(pageHTML []byte, b *OGame, coord Coordinate) (Planet, error)
- func (e ExtractorV6) ExtractPlanetByCoordFromDoc(doc *goquery.Document, b *OGame, coord Coordinate) (Planet, error)
- func (e ExtractorV6) ExtractPlanetByIDFromDoc(doc *goquery.Document, b *OGame, planetID PlanetID) (Planet, error)
- func (e ExtractorV6) ExtractPlanetCoordinate(pageHTML []byte) (Coordinate, error)
- func (e ExtractorV6) ExtractPlanetFromDoc(doc *goquery.Document, v interface{}, b *OGame) (Planet, error)
- func (e ExtractorV6) ExtractPlanetID(pageHTML []byte) (CelestialID, error)
- func (e ExtractorV6) ExtractPlanetType(pageHTML []byte) (CelestialType, error)
- func (e ExtractorV6) ExtractPlanets(pageHTML []byte, b *OGame) []Planet
- func (e ExtractorV6) ExtractPlanetsFromDoc(doc *goquery.Document, b *OGame) []Planet
- func (e ExtractorV6) ExtractPopopsCombatreportFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractPopupsNoticesFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractPreferences(pageHTML []byte) Preferences
- func (e ExtractorV6) ExtractPreferencesFromDoc(doc *goquery.Document) Preferences
- func (e ExtractorV6) ExtractPreferencesShowActivityMinutes(pageHTML []byte) bool
- func (e ExtractorV6) ExtractPreserveSystemOnPlanetChangeFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractProduction(pageHTML []byte) ([]Quantifiable, int64, error)
- func (e ExtractorV6) ExtractProductionFromDoc(doc *goquery.Document) ([]Quantifiable, error)
- func (e ExtractorV6) ExtractResearch(pageHTML []byte) Researches
- func (e ExtractorV6) ExtractResearchFromDoc(doc *goquery.Document) Researches
- func (e ExtractorV6) ExtractResourceSettings(pageHTML []byte) (ResourceSettings, error)
- func (e ExtractorV6) ExtractResourceSettingsFromDoc(doc *goquery.Document) (ResourceSettings, error)
- func (e ExtractorV6) ExtractResources(pageHTML []byte) Resources
- func (e ExtractorV6) ExtractResourcesBuildings(pageHTML []byte) (ResourcesBuildings, error)
- func (e ExtractorV6) ExtractResourcesBuildingsFromDoc(doc *goquery.Document) (ResourcesBuildings, error)
- func (e ExtractorV6) ExtractResourcesDetails(pageHTML []byte) (out ResourcesDetails, err error)
- func (e ExtractorV6) ExtractResourcesDetailsFromFullPage(pageHTML []byte) ResourcesDetails
- func (e ExtractorV6) ExtractResourcesDetailsFromFullPageFromDoc(doc *goquery.Document) ResourcesDetails
- func (e ExtractorV6) ExtractResourcesFromDoc(doc *goquery.Document) Resources
- func (e ExtractorV6) ExtractResourcesProductions(pageHTML []byte) (Resources, error)
- func (e ExtractorV6) ExtractResourcesProductionsFromDoc(doc *goquery.Document) (Resources, error)
- func (e ExtractorV6) ExtractServerTime(pageHTML []byte) (time.Time, error)
- func (e ExtractorV6) ExtractServerTimeFromDoc(doc *goquery.Document) (time.Time, error)
- func (e ExtractorV6) ExtractShips(pageHTML []byte) (ShipsInfos, error)
- func (e ExtractorV6) ExtractShipsFromDoc(doc *goquery.Document) (ShipsInfos, error)
- func (e ExtractorV6) ExtractShowActivityMinutesFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractShowDetailOverlayFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractShowOldDropDownsFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractSlots(pageHTML []byte) Slots
- func (e ExtractorV6) ExtractSlotsFromDoc(doc *goquery.Document) Slots
- func (e ExtractorV6) ExtractSortOrderFromDoc(doc *goquery.Document) int64
- func (e ExtractorV6) ExtractSortSettingFromDoc(doc *goquery.Document) int64
- func (e ExtractorV6) ExtractSpioAnz(pageHTML []byte) int64
- func (e ExtractorV6) ExtractSpioAnzFromDoc(doc *goquery.Document) int64
- func (e ExtractorV6) ExtractSpioReportPicturesFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractTechnocrat(pageHTML []byte) bool
- func (e ExtractorV6) ExtractTechnocratFromDoc(doc *goquery.Document) bool
- func (e ExtractorV6) ExtractUserInfos(pageHTML []byte, lang string) (UserInfos, error)
- type ExtractorV7
- func (e ExtractorV7) ExtractCancelBuildingInfos(pageHTML []byte) (token string, techID, listID int64, err error)
- func (e ExtractorV7) ExtractCancelResearchInfos(pageHTML []byte) (token string, techID, listID int64, err error)
- func (e ExtractorV7) ExtractCharacterClass(pageHTML []byte) (CharacterClass, error)
- func (e ExtractorV7) ExtractCharacterClassFromDoc(doc *goquery.Document) (CharacterClass, error)
- func (e ExtractorV7) ExtractCombatReportMessagesFromDoc(doc *goquery.Document) ([]CombatReportSummary, int64)
- func (e ExtractorV7) ExtractCombatReportMessagesSummary(pageHTML []byte) ([]CombatReportSummary, int64)
- func (e ExtractorV7) ExtractConstructions(pageHTML []byte) (buildingID ID, buildingCountdown int64, researchID ID, researchCountdown int64)
- func (e ExtractorV7) ExtractDefense(pageHTML []byte) (DefensesInfos, error)
- func (e ExtractorV7) ExtractDefenseFromDoc(doc *goquery.Document) (DefensesInfos, error)
- func (e ExtractorV7) ExtractEspionageReport(pageHTML []byte, location *time.Location) (EspionageReport, error)
- func (e ExtractorV7) ExtractEspionageReportFromDoc(doc *goquery.Document, location *time.Location) (EspionageReport, error)
- func (e ExtractorV7) ExtractFacilities(pageHTML []byte) (Facilities, error)
- func (e ExtractorV7) ExtractFacilitiesFromDoc(doc *goquery.Document) (Facilities, error)
- func (e ExtractorV7) ExtractFleet1Ships(pageHTML []byte) ShipsInfos
- func (e ExtractorV7) ExtractFleet1ShipsFromDoc(doc *goquery.Document) (s ShipsInfos)
- func (e ExtractorV7) ExtractIPM(pageHTML []byte) (duration, max int64, token string)
- func (e ExtractorV7) ExtractIPMFromDoc(doc *goquery.Document) (duration, max int64, token string)
- func (e ExtractorV7) ExtractOverviewProduction(pageHTML []byte) ([]Quantifiable, int64, error)
- func (e ExtractorV7) ExtractOverviewProductionFromDoc(doc *goquery.Document) ([]Quantifiable, error)
- func (e ExtractorV7) ExtractOverviewShipSumCountdownFromBytes(pageHTML []byte) int64
- func (e ExtractorV7) ExtractResearch(pageHTML []byte) Researches
- func (e ExtractorV7) ExtractResearchFromDoc(doc *goquery.Document) Researches
- func (e ExtractorV7) ExtractResourceSettings(pageHTML []byte) (ResourceSettings, error)
- func (e ExtractorV7) ExtractResourceSettingsFromDoc(doc *goquery.Document) (ResourceSettings, error)
- func (e ExtractorV7) ExtractResourcesBuildings(pageHTML []byte) (ResourcesBuildings, error)
- func (e ExtractorV7) ExtractResourcesBuildingsFromDoc(doc *goquery.Document) (ResourcesBuildings, error)
- func (e ExtractorV7) ExtractResourcesDetails(pageHTML []byte) (out ResourcesDetails, err error)
- func (e ExtractorV7) ExtractShips(pageHTML []byte) (ShipsInfos, error)
- func (e ExtractorV7) ExtractShipsFromDoc(doc *goquery.Document) (ShipsInfos, error)
- type ExtractorV71
- func (e ExtractorV71) ExtractAllResources(pageHTML []byte) (map[CelestialID]Resources, error)
- func (e ExtractorV71) ExtractAttacks(pageHTML []byte) ([]AttackEvent, error)
- func (e ExtractorV71) ExtractAttacksFromDoc(doc *goquery.Document, clock clockwork.Clock) ([]AttackEvent, error)
- func (e ExtractorV71) ExtractBuffActivation(pageHTML []byte) (string, []Item, error)
- func (e ExtractorV71) ExtractBuffActivationFromDoc(doc *goquery.Document) (string, []Item, error)
- func (e ExtractorV71) ExtractDMCosts(pageHTML []byte) (DMCosts, error)
- func (e ExtractorV71) ExtractDMCostsFromDoc(doc *goquery.Document) (DMCosts, error)
- func (e ExtractorV71) ExtractEspionageReport(pageHTML []byte, location *time.Location) (EspionageReport, error)
- func (e ExtractorV71) ExtractEspionageReportFromDoc(doc *goquery.Document, location *time.Location) (EspionageReport, error)
- func (e ExtractorV71) ExtractFacilities(pageHTML []byte) (Facilities, error)
- func (e ExtractorV71) ExtractFacilitiesFromDoc(doc *goquery.Document) (Facilities, error)
- func (e ExtractorV71) ExtractHighscore(pageHTML []byte) (Highscore, error)
- func (e ExtractorV71) ExtractHighscoreFromDoc(doc *goquery.Document) (Highscore, error)
- func (e ExtractorV71) ExtractIPM(pageHTML []byte) (duration int64, max int64, token string)
- func (e ExtractorV71) ExtractIPMFromDoc(doc *goquery.Document) (duration int64, max int64, token string)
- func (e ExtractorV71) ExtractIsMobile(pageHTML []byte) bool
- func (e ExtractorV71) ExtractIsMobileFromDoc(doc *goquery.Document) bool
- func (e ExtractorV71) ExtractProduction(pageHTML []byte) ([]Quantifiable, int64, error)
- func (e ExtractorV71) ExtractProductionFromDoc(doc *goquery.Document) ([]Quantifiable, error)
- func (e ExtractorV71) ExtractResourcesDetails(pageHTML []byte) (out ResourcesDetails, err error)
- type Facilities
- type Fields
- type Fleet
- type FleetBuilder
- func (f *FleetBuilder) AddShips(id ID, nbr int64) *FleetBuilder
- func (f *FleetBuilder) FlightTime() (secs, fuel int64)
- func (f *FleetBuilder) OnError(clb func(error)) *FleetBuilder
- func (f *FleetBuilder) OnSuccess(clb func(Fleet)) *FleetBuilder
- func (f *FleetBuilder) SendNow() (Fleet, error)
- func (f *FleetBuilder) SetAllCrystal() *FleetBuilder
- func (f *FleetBuilder) SetAllDeuterium() *FleetBuilder
- func (f *FleetBuilder) SetAllMetal() *FleetBuilder
- func (f *FleetBuilder) SetAllResources() *FleetBuilder
- func (f *FleetBuilder) SetAllShips() *FleetBuilder
- func (f *FleetBuilder) SetDestination(v interface{}) *FleetBuilder
- func (f *FleetBuilder) SetDuration(expeditiontime int64) *FleetBuilder
- func (f *FleetBuilder) SetMinimumDeuterium(minimumDeuterium int64) *FleetBuilder
- func (f *FleetBuilder) SetMission(mission MissionID) *FleetBuilder
- func (f *FleetBuilder) SetOrigin(v interface{}) *FleetBuilder
- func (f *FleetBuilder) SetRecallIn(secs int64) *FleetBuilder
- func (f *FleetBuilder) SetResources(resources Resources) *FleetBuilder
- func (f *FleetBuilder) SetShips(ships ShipsInfos) *FleetBuilder
- func (f *FleetBuilder) SetSpeed(speed Speed) *FleetBuilder
- func (f *FleetBuilder) SetTx(tx *Prioritize) *FleetBuilder
- func (f *FleetBuilder) SetUnionID(unionID int64) *FleetBuilder
- type FleetBuilderFactory
- type FleetID
- type Highscore
- type HighscorePlayer
- type ID
- func (o ID) Int() int64
- func (o ID) Int64() int64
- func (o ID) IsBuilding() bool
- func (o ID) IsCombatShip() bool
- func (o ID) IsDefense() bool
- func (o ID) IsFacility() bool
- func (o ID) IsResourceBuilding() bool
- func (o ID) IsSet() bool
- func (o ID) IsShip() bool
- func (o ID) IsTech() bool
- func (o ID) String() string
- type Item
- type LazyFacilities
- type LazyResearches
- type LazyResourcesBuildings
- type Levelable
- type MissionID
- type Moon
- func (m Moon) ActivateItem(ref string) error
- func (m Moon) Build(id ID, nbr int64) error
- func (m Moon) BuildBuilding(buildingID ID) error
- func (m Moon) BuildDefense(defenseID ID, nbr int64) error
- func (m Moon) BuildTechnology(technologyID ID) error
- func (m Moon) CancelBuilding() error
- func (m Moon) CancelResearch() error
- func (m Moon) ConstructionsBeingBuilt() (ID, int64, ID, int64)
- func (m Moon) EnsureFleet(ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, ...) (Fleet, error)
- func (m Moon) GetCoordinate() Coordinate
- func (m Moon) GetDefense() (DefensesInfos, error)
- func (m Moon) GetDiameter() int64
- func (m Moon) GetFacilities() (Facilities, error)
- func (m Moon) GetFields() Fields
- func (m Moon) GetID() CelestialID
- func (m Moon) GetItems() ([]Item, error)
- func (m Moon) GetName() string
- func (m Moon) GetProduction() ([]Quantifiable, int64, error)
- func (m Moon) GetResources() (Resources, error)
- func (m Moon) GetResourcesBuildings() (ResourcesBuildings, error)
- func (m Moon) GetResourcesDetails() (ResourcesDetails, error)
- func (m Moon) GetShips() (ShipsInfos, error)
- func (m Moon) GetType() CelestialType
- func (m *Moon) Phalanx(coord Coordinate) ([]Fleet, error)
- func (m Moon) SendFleet(ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, ...) (Fleet, error)
- func (m Moon) TearDown(buildingID ID) error
- type MoonID
- type MoonInfos
- type Multiplier
- type NewAccount
- type OGame
- func (b *OGame) Abandon(v interface{}) error
- func (b *OGame) ActivateItem(ref string, celestialID CelestialID) error
- func (b *OGame) AddAccount(number int, lang string) (NewAccount, error)
- func (b *OGame) Begin() *Prioritize
- func (b *OGame) BeginNamed(name string) *Prioritize
- func (b *OGame) Build(celestialID CelestialID, id ID, nbr int64) error
- func (b *OGame) BuildBuilding(celestialID CelestialID, buildingID ID) error
- func (b *OGame) BuildCancelable(celestialID CelestialID, id ID) error
- func (b *OGame) BuildDefense(celestialID CelestialID, defenseID ID, nbr int64) error
- func (b *OGame) BuildProduction(celestialID CelestialID, id ID, nbr int64) error
- func (b *OGame) BuildShips(celestialID CelestialID, shipID ID, nbr int64) error
- func (b *OGame) BuildTechnology(celestialID CelestialID, technologyID ID) error
- func (b *OGame) BuyAdmiral(days int)
- func (b *OGame) BuyOfferOfTheDay() error
- func (b *OGame) BuyShipsAtMarketplace(shipID ID, resource int64, resourceAmount int64)
- func (b *OGame) BytesDownloaded() int64
- func (b *OGame) BytesUploaded() int64
- func (b *OGame) CancelBuilding(celestialID CelestialID) error
- func (b *OGame) CancelFleet(fleetID FleetID) error
- func (b *OGame) CancelResearch(celestialID CelestialID) error
- func (b *OGame) CharacterClass() CharacterClass
- func (b *OGame) CollectStuffFromMarketplace(tab string)
- func (b *OGame) ConstructionsBeingBuilt(celestialID CelestialID) (ID, int64, ID, int64)
- func (b *OGame) CreateUnion(fleet Fleet, users []string) (int64, error)
- func (b *OGame) DeleteAllMessagesFromTab(tabID int64) error
- func (b *OGame) DeleteMessage(msgID int64) error
- func (b *OGame) Disable()
- func (b *OGame) Distance(origin, destination Coordinate) int64
- func (b *OGame) DoAllianceApplication(allianceID int64)
- func (b *OGame) DoAuction(bid map[CelestialID]Resources) error
- func (b *OGame) Enable()
- func (b *OGame) EnsureFleet(celestialID CelestialID, ships []Quantifiable, speed Speed, where Coordinate, ...) (Fleet, error)
- func (b *OGame) FakeCall(priority int, name string, delay int)
- func (b *OGame) FleetDeutSaveFactor() float64
- func (b *OGame) FlightTime(origin, destination Coordinate, speed Speed, ships ShipsInfos) (secs, fuel int64)
- func (b *OGame) GalaxyInfos(galaxy, system int64, options ...Option) (SystemInfos, error)
- func (b *OGame) GetAllResources() (map[CelestialID]Resources, error)
- func (b *OGame) GetAlliancePageContent(vals url.Values) ([]byte, error)
- func (b *OGame) GetAttacks() ([]AttackEvent, error)
- func (b *OGame) GetAttacksUsing(celestialID CelestialID) ([]AttackEvent, error)
- func (b *OGame) GetAuction() (Auction, error)
- func (b *OGame) GetCachedCelestial(v interface{}) Celestial
- func (b *OGame) GetCachedCelestialByCoord(coord Coordinate) Celestial
- func (b *OGame) GetCachedCelestialByID(celestialID CelestialID) Celestial
- func (b *OGame) GetCachedCelestials() []Celestial
- func (b *OGame) GetCachedMoons() []Moon
- func (b *OGame) GetCachedPlanets() []Planet
- func (b *OGame) GetCachedPlayer() UserInfos
- func (b *OGame) GetCachedPreferences() Preferences
- func (b *OGame) GetCachedResearch() Researches
- func (b *OGame) GetCelestial(v interface{}) (Celestial, error)
- func (b *OGame) GetCelestials() ([]Celestial, error)
- func (b *OGame) GetClient() *OGameClient
- func (b *OGame) GetCombatReportSummaryFor(coord Coordinate) (CombatReportSummary, error)
- func (b *OGame) GetDMCosts(celestialID CelestialID) (DMCosts, error)
- func (b *OGame) GetDefense(celestialID CelestialID) (DefensesInfos, error)
- func (b *OGame) GetEmpire(nbr int64) (interface{}, error)
- func (b *OGame) GetEspionageReport(msgID int64) (EspionageReport, error)
- func (b *OGame) GetEspionageReportFor(coord Coordinate) (EspionageReport, error)
- func (b *OGame) GetEspionageReportMessages() ([]EspionageReportSummary, error)
- func (b *OGame) GetExtractor() Extractor
- func (b *OGame) GetFacilities(celestialID CelestialID) (Facilities, error)
- func (b *OGame) GetFleets(opts ...Option) ([]Fleet, Slots)
- func (b *OGame) GetFleetsFromEventList() []Fleet
- func (b *OGame) GetItems(celestialID CelestialID) ([]Item, error)
- func (b *OGame) GetLanguage() string
- func (b *OGame) GetMoon(v interface{}) (Moon, error)
- func (b *OGame) GetMoons() []Moon
- func (b *OGame) GetNbSystems() int64
- func (b *OGame) GetPageContent(vals url.Values) ([]byte, error)
- func (b *OGame) GetPlanet(v interface{}) (Planet, error)
- func (b *OGame) GetPlanets() []Planet
- func (b *OGame) GetProduction(celestialID CelestialID) ([]Quantifiable, int64, error)
- func (b *OGame) GetPublicIP() (string, error)
- func (b *OGame) GetResearch() Researches
- func (b *OGame) GetResearchSpeed() int64
- func (b *OGame) GetResourceSettings(planetID PlanetID) (ResourceSettings, error)
- func (b *OGame) GetResources(celestialID CelestialID) (Resources, error)
- func (b *OGame) GetResourcesBuildings(celestialID CelestialID) (ResourcesBuildings, error)
- func (b *OGame) GetResourcesDetails(celestialID CelestialID) (ResourcesDetails, error)
- func (b *OGame) GetResourcesProductions(planetID PlanetID) (Resources, error)
- func (b *OGame) GetResourcesProductionsLight(resBuildings ResourcesBuildings, researches Researches, ...) Resources
- func (b *OGame) GetServer() Server
- func (b *OGame) GetServerData() ServerData
- func (b *OGame) GetSession() string
- func (b *OGame) GetShips(celestialID CelestialID) (ShipsInfos, error)
- func (b *OGame) GetSlots() Slots
- func (b *OGame) GetState() (bool, string)
- func (b *OGame) GetTasks() TasksOverview
- func (b *OGame) GetUniverseName() string
- func (b *OGame) GetUniverseSpeed() int64
- func (b *OGame) GetUniverseSpeedFleet() int64
- func (b *OGame) GetUserInfos() UserInfos
- func (b *OGame) GetUsername() string
- func (b *OGame) HeadersForPage(url string) (http.Header, error)
- func (b *OGame) Highscore(category, typ, page int64) (Highscore, error)
- func (b *OGame) IsConnected() bool
- func (b *OGame) IsDonutGalaxy() bool
- func (b *OGame) IsDonutSystem() bool
- func (b *OGame) IsEnabled() bool
- func (b *OGame) IsLocked() bool
- func (b *OGame) IsLoggedIn() bool
- func (b *OGame) IsUnderAttack() (bool, error)
- func (b *OGame) IsV7() bool
- func (b *OGame) IsVacationModeEnabled() bool
- func (b *OGame) JumpGate(origin, dest MoonID, ships ShipsInfos) (success bool, rechargeCountdown int64, err error)
- func (b *OGame) JumpGateDestinations(origin MoonID) (moonIDs []MoonID, rechargeCountdown int64, err error)
- func (b *OGame) Location() *time.Location
- func (b *OGame) Login() error
- func (b *OGame) LoginWithExistingCookies() (bool, error)
- func (b *OGame) Logout()
- func (b *OGame) OnStateChange(clb func(locked bool, actor string))
- func (b *OGame) Phalanx(moonID MoonID, coord Coordinate) ([]Fleet, error)
- func (b *OGame) PostPageContent(vals, payload url.Values) ([]byte, error)
- func (b *OGame) Quiet(quiet bool)
- func (b *OGame) ReconnectChat() bool
- func (b *OGame) RegisterAuctioneerCallback(fn func(packet []byte))
- func (b *OGame) RegisterChatCallback(fn func(msg ChatMsg))
- func (b *OGame) RegisterHTMLInterceptor(fn func(method, url string, params, payload url.Values, pageHTML []byte))
- func (b *OGame) RegisterWSCallback(id string, fn func(msg []byte))
- func (b *OGame) RemoveWSCallback(id string)
- func (b *OGame) SelectCharacterClass(class CharacterClass)
- func (b *OGame) SellShipsAtMarketplace(shipID ID, amount int64)
- func (b *OGame) SendFleet(celestialID CelestialID, ships []Quantifiable, speed Speed, where Coordinate, ...) (Fleet, error)
- func (b *OGame) SendIPM(planetID PlanetID, coord Coordinate, nbr int64, priority ID) (int64, error)
- func (b *OGame) SendMessage(playerID int64, message string) error
- func (b *OGame) SendMessageAlliance(associationID int64, message string) error
- func (b *OGame) ServerTime() time.Time
- func (b *OGame) ServerURL() string
- func (b *OGame) ServerVersion() string
- func (b *OGame) SetLogger(logger *log.Logger)
- func (b *OGame) SetLoginWrapper(newWrapper func(func() (bool, error)) error)
- func (b *OGame) SetOGameCredentials(username, password string)
- func (b *OGame) SetProxy(proxyAddress, username, password, proxyType string, loginOnly bool) error
- func (b *OGame) SetResourceSettings(planetID PlanetID, settings ResourceSettings) error
- func (b *OGame) SetUserAgent(newUserAgent string)
- func (b *OGame) TearDown(celestialID CelestialID, id ID) error
- func (b *OGame) Tx(clb func(tx *Prioritize) error) error
- func (b *OGame) UnsafePhalanx(moonID MoonID, coord Coordinate) ([]Fleet, error)
- func (b *OGame) UseDM(typ string, celestialID CelestialID) error
- func (b *OGame) WithPriority(priority int) *Prioritize
- type OGameClient
- type ObjsStruct
- type Option
- type Params
- type Planet
- func (p Planet) ActivateItem(ref string) error
- func (p Planet) Build(id ID, nbr int64) error
- func (p Planet) BuildBuilding(buildingID ID) error
- func (p *Planet) BuildCancelable(id ID) error
- func (p Planet) BuildDefense(defenseID ID, nbr int64) error
- func (p *Planet) BuildShips(shipID ID, nbr int64) error
- func (p Planet) BuildTechnology(technologyID ID) error
- func (p Planet) CancelBuilding() error
- func (p Planet) CancelResearch() error
- func (p Planet) ConstructionsBeingBuilt() (ID, int64, ID, int64)
- func (p Planet) EnsureFleet(ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, ...) (Fleet, error)
- func (p *Planet) FlightTime(destination Coordinate, speed Speed, ships ShipsInfos) (secs, fuel int64)
- func (p Planet) GetCoordinate() Coordinate
- func (p Planet) GetDefense() (DefensesInfos, error)
- func (p Planet) GetDiameter() int64
- func (p Planet) GetFacilities() (Facilities, error)
- func (p Planet) GetFields() Fields
- func (p Planet) GetID() CelestialID
- func (p Planet) GetItems() ([]Item, error)
- func (p Planet) GetName() string
- func (p Planet) GetProduction() ([]Quantifiable, int64, error)
- func (p *Planet) GetResourceSettings() (ResourceSettings, error)
- func (p Planet) GetResources() (Resources, error)
- func (p Planet) GetResourcesBuildings() (ResourcesBuildings, error)
- func (p Planet) GetResourcesDetails() (ResourcesDetails, error)
- func (p *Planet) GetResourcesProductions() (Resources, error)
- func (p Planet) GetShips() (ShipsInfos, error)
- func (p Planet) GetType() CelestialType
- func (p Planet) SendFleet(ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, ...) (Fleet, error)
- func (p *Planet) SendIPM(planetID PlanetID, coord Coordinate, nbr int64, priority ID) (int64, error)
- func (p Planet) TearDown(buildingID ID) error
- type PlanetID
- type PlanetInfos
- type PlanetResources
- type Preferences
- type Prioritize
- func (b *Prioritize) Abandon(v interface{}) error
- func (b *Prioritize) ActivateItem(ref string, celestialID CelestialID) error
- func (b *Prioritize) Begin() *Prioritize
- func (b *Prioritize) BeginNamed(name string) *Prioritize
- func (b *Prioritize) Build(celestialID CelestialID, id ID, nbr int64) error
- func (b *Prioritize) BuildBuilding(celestialID CelestialID, buildingID ID) error
- func (b *Prioritize) BuildCancelable(celestialID CelestialID, id ID) error
- func (b *Prioritize) BuildDefense(celestialID CelestialID, defenseID ID, nbr int64) error
- func (b *Prioritize) BuildProduction(celestialID CelestialID, id ID, nbr int64) error
- func (b *Prioritize) BuildShips(celestialID CelestialID, shipID ID, nbr int64) error
- func (b *Prioritize) BuildTechnology(celestialID CelestialID, technologyID ID) error
- func (b *Prioritize) BuyOfferOfTheDay() error
- func (b *Prioritize) CancelBuilding(celestialID CelestialID) error
- func (b *Prioritize) CancelFleet(fleetID FleetID) error
- func (b *Prioritize) CancelResearch(celestialID CelestialID) error
- func (b *Prioritize) ConstructionsBeingBuilt(celestialID CelestialID) (ID, int64, ID, int64)
- func (b *Prioritize) CreateUnion(fleet Fleet, users []string) (int64, error)
- func (b *Prioritize) DeleteAllMessagesFromTab(tabID int64) error
- func (b *Prioritize) DeleteMessage(msgID int64) error
- func (b *Prioritize) DoAuction(bid map[CelestialID]Resources) error
- func (b *Prioritize) Done()
- func (b *Prioritize) EnsureFleet(celestialID CelestialID, ships []Quantifiable, speed Speed, where Coordinate, ...) (Fleet, error)
- func (b *Prioritize) FakeCall(name string, delay int)
- func (b *Prioritize) FlightTime(origin, destination Coordinate, speed Speed, ships ShipsInfos) (secs, fuel int64)
- func (b *Prioritize) GalaxyInfos(galaxy, system int64, options ...Option) (SystemInfos, error)
- func (b *Prioritize) GetAllResources() (map[CelestialID]Resources, error)
- func (b *Prioritize) GetAlliancePageContent(vals url.Values) []byte
- func (b *Prioritize) GetAttacks() ([]AttackEvent, error)
- func (b *Prioritize) GetAttacksUsing(celestialID CelestialID) ([]AttackEvent, error)
- func (b *Prioritize) GetAuction() (Auction, error)
- func (b *Prioritize) GetCachedResearch() Researches
- func (b *Prioritize) GetCelestial(v interface{}) (Celestial, error)
- func (b *Prioritize) GetCelestials() ([]Celestial, error)
- func (b *Prioritize) GetCombatReportSummaryFor(coord Coordinate) (CombatReportSummary, error)
- func (b *Prioritize) GetDMCosts(celestialID CelestialID) (DMCosts, error)
- func (b *Prioritize) GetDefense(celestialID CelestialID) (DefensesInfos, error)
- func (b *Prioritize) GetEmpire(nbr int64) (interface{}, error)
- func (b *Prioritize) GetEspionageReport(msgID int64) (EspionageReport, error)
- func (b *Prioritize) GetEspionageReportFor(coord Coordinate) (EspionageReport, error)
- func (b *Prioritize) GetEspionageReportMessages() ([]EspionageReportSummary, error)
- func (b *Prioritize) GetFacilities(celestialID CelestialID) (Facilities, error)
- func (b *Prioritize) GetFleets(opts ...Option) ([]Fleet, Slots)
- func (b *Prioritize) GetFleetsFromEventList() []Fleet
- func (b *Prioritize) GetItems(celestialID CelestialID) ([]Item, error)
- func (b *Prioritize) GetMoon(v interface{}) (Moon, error)
- func (b *Prioritize) GetMoons() []Moon
- func (b *Prioritize) GetPageContent(vals url.Values) ([]byte, error)
- func (b *Prioritize) GetPlanet(v interface{}) (Planet, error)
- func (b *Prioritize) GetPlanets() []Planet
- func (b *Prioritize) GetProduction(celestialID CelestialID) ([]Quantifiable, int64, error)
- func (b *Prioritize) GetResearch() Researches
- func (b *Prioritize) GetResourceSettings(planetID PlanetID) (ResourceSettings, error)
- func (b *Prioritize) GetResources(celestialID CelestialID) (Resources, error)
- func (b *Prioritize) GetResourcesBuildings(celestialID CelestialID) (ResourcesBuildings, error)
- func (b *Prioritize) GetResourcesDetails(celestialID CelestialID) (ResourcesDetails, error)
- func (b *Prioritize) GetResourcesProductions(planetID PlanetID) (Resources, error)
- func (b *Prioritize) GetResourcesProductionsLight(resBuildings ResourcesBuildings, researches Researches, ...) Resources
- func (b *Prioritize) GetShips(celestialID CelestialID) (ShipsInfos, error)
- func (b *Prioritize) GetSlots() Slots
- func (b *Prioritize) GetUserInfos() UserInfos
- func (b *Prioritize) HeadersForPage(url string) (http.Header, error)
- func (b *Prioritize) Highscore(category, typ, page int64) (Highscore, error)
- func (b *Prioritize) IsUnderAttack() (bool, error)
- func (b *Prioritize) JumpGate(origin, dest MoonID, ships ShipsInfos) (bool, int64, error)
- func (b *Prioritize) JumpGateDestinations(origin MoonID) ([]MoonID, int64, error)
- func (b *Prioritize) Login() error
- func (b *Prioritize) LoginWithExistingCookies() (bool, error)
- func (b *Prioritize) Logout()
- func (b *Prioritize) Phalanx(moonID MoonID, coord Coordinate) ([]Fleet, error)
- func (b *Prioritize) PostPageContent(vals, payload url.Values) ([]byte, error)
- func (b *Prioritize) SendFleet(celestialID CelestialID, ships []Quantifiable, speed Speed, where Coordinate, ...) (Fleet, error)
- func (b *Prioritize) SendIPM(planetID PlanetID, coord Coordinate, nbr int64, priority ID) (int64, error)
- func (b *Prioritize) SendMessage(playerID int64, message string) error
- func (b *Prioritize) SendMessageAlliance(associationID int64, message string) error
- func (b *Prioritize) ServerTime() time.Time
- func (b *Prioritize) SetInitiator(initiator string) *Prioritize
- func (b *Prioritize) SetResourceSettings(planetID PlanetID, settings ResourceSettings) error
- func (b *Prioritize) TearDown(celestialID CelestialID, id ID) error
- func (b *Prioritize) Tx(clb func(*Prioritize) error) error
- func (b *Prioritize) UnsafePhalanx(moonID MoonID, coord Coordinate) ([]Fleet, error)
- func (b *Prioritize) UseDM(typ string, celestialID CelestialID) error
- type Quantifiable
- type Researches
- type ResourceSettings
- type Resources
- func (r Resources) Add(v Resources) Resources
- func (r Resources) CanAfford(cost Resources) bool
- func (r Resources) Div(price Resources) int64
- func (r Resources) Gte(val Resources) bool
- func (r Resources) Lte(val Resources) bool
- func (r Resources) Mul(scalar int64) Resources
- func (r Resources) String() string
- func (r Resources) Sub(v Resources) Resources
- func (r Resources) Total() int64
- func (r Resources) Value() int64
- type ResourcesBuildings
- type ResourcesDetails
- type Server
- type ServerData
- type Ship
- type ShipsInfos
- func (s *ShipsInfos) Add(v ShipsInfos)
- func (s ShipsInfos) ByID(id ID) int64
- func (s ShipsInfos) Cargo(techs Researches, probeRaids, isCollector bool) (out int64)
- func (s ShipsInfos) CountShips() (out int64)
- func (s *ShipsInfos) Div(n int64)
- func (s ShipsInfos) Equal(other ShipsInfos) bool
- func (s ShipsInfos) FleetCost() (out Resources)
- func (s ShipsInfos) FleetExpeditionPoints() (out int64)
- func (s ShipsInfos) FleetValue() (out int64)
- func (s ShipsInfos) FromQuantifiables(in []Quantifiable) (out ShipsInfos)
- func (s ShipsInfos) Has(v ShipsInfos) bool
- func (s ShipsInfos) HasShips() bool
- func (s *ShipsInfos) Set(id ID, val int64)
- func (s ShipsInfos) Speed(techs Researches, isCollector, isGeneral bool) int64
- func (s ShipsInfos) String() string
- func (s *ShipsInfos) Sub(v ShipsInfos)
- func (s ShipsInfos) ToPtr() *ShipsInfos
- func (s ShipsInfos) ToQuantifiables() []Quantifiable
- type SimulatorParams
- type SimulatorResult
- type Slots
- type Speed
- type SystemInfos
- type TasksOverview
- type Technology
- type Temperature
- type UserInfos
- type Wrapper
Constants ¶
const ( NoClass CharacterClass = 0 Collector CharacterClass = 1 General CharacterClass = 2 Discoverer CharacterClass = 3 PlanetType CelestialType = 1 DebrisType CelestialType = 2 MoonType CelestialType = 3 //Buildings MetalMineID ID = 1 CrystalMineID ID = 2 DeuteriumSynthesizerID ID = 3 SolarPlantID ID = 4 FusionReactorID ID = 12 MetalStorageID ID = 22 CrystalStorageID ID = 23 DeuteriumTankID ID = 24 ShieldedMetalDenID ID = 25 UndergroundCrystalDenID ID = 26 SeabedDeuteriumDenID ID = 27 AllianceDepotID ID = 34 // Facilities RoboticsFactoryID ID = 14 ShipyardID ID = 21 ResearchLabID ID = 31 MissileSiloID ID = 44 NaniteFactoryID ID = 15 TerraformerID ID = 33 SpaceDockID ID = 36 LunarBaseID ID = 41 // Moon facilities SensorPhalanxID ID = 42 JumpGateID ID = 43 RocketLauncherID ID = 401 // Defense LightLaserID ID = 402 HeavyLaserID ID = 403 GaussCannonID ID = 404 IonCannonID ID = 405 PlasmaTurretID ID = 406 SmallShieldDomeID ID = 407 LargeShieldDomeID ID = 408 AntiBallisticMissilesID ID = 502 InterplanetaryMissilesID ID = 503 SmallCargoID ID = 202 // Ships LargeCargoID ID = 203 LightFighterID ID = 204 HeavyFighterID ID = 205 CruiserID ID = 206 BattleshipID ID = 207 ColonyShipID ID = 208 RecyclerID ID = 209 EspionageProbeID ID = 210 BomberID ID = 211 SolarSatelliteID ID = 212 DestroyerID ID = 213 DeathstarID ID = 214 BattlecruiserID ID = 215 CrawlerID ID = 217 ReaperID ID = 218 PathfinderID ID = 219 EspionageTechnologyID ID = 106 // Research ComputerTechnologyID ID = 108 WeaponsTechnologyID ID = 109 ShieldingTechnologyID ID = 110 ArmourTechnologyID ID = 111 EnergyTechnologyID ID = 113 HyperspaceTechnologyID ID = 114 CombustionDriveID ID = 115 ImpulseDriveID ID = 117 HyperspaceDriveID ID = 118 LaserTechnologyID ID = 120 IonTechnologyID ID = 121 PlasmaTechnologyID ID = 122 IntergalacticResearchNetworkID ID = 123 AstrophysicsID ID = 124 GravitonTechnologyID ID = 199 // Missions Attack MissionID = 1 GroupedAttack MissionID = 2 Transport MissionID = 3 Park MissionID = 4 ParkInThatAlly MissionID = 5 Spy MissionID = 6 Colonize MissionID = 7 RecycleDebrisField MissionID = 8 Destroy MissionID = 9 MissileAttack MissionID = 10 Expedition MissionID = 15 // Speeds TenPercent Speed = 1 TwentyPercent Speed = 2 ThirtyPercent Speed = 3 FourtyPercent Speed = 4 FiftyPercent Speed = 5 SixtyPercent Speed = 6 SeventyPercent Speed = 7 EightyPercent Speed = 8 NinetyPercent Speed = 9 HundredPercent Speed = 10 )
OGame constants
const ( // V6 full pages OverviewPage = "overview" PreferencesPage = "preferences" ResourceSettingsPage = "resourceSettings" ResourcesPage = "resources" DefensePage = "defense" ShipyardPage = "shipyard" StationPage = "station" MovementPage = "movement" ResearchPage = "research" PlanetlayerPage = "planetlayer" LogoutPage = "logout" Fleet1Page = "fleet1" JumpgatelayerPage = "jumpgatelayer" FetchResourcesPage = "fetchResources" TraderOverviewPage = "traderOverview" GalaxyPage = "galaxy" AlliancePage = "alliance" PremiumPage = "premium" ShopPage = "shop" RewardsPage = "rewards" HighscorePage = "highscore" BuddiesPage = "buddies" MessagesPage = "messages" ChatPage = "chat" // V6 ajax pages FetchEventboxAjaxPage = "fetchEventbox" FetchResourcesAjaxPage = "fetchResources" GalaxyContentAjaxPage = "galaxyContent" EventListAjaxPage = "eventList" AjaxChatAjaxPage = "ajaxChat" NoticesAjaxPage = "notices" RepairlayerAjaxPage = "repairlayer" TechtreeAjaxPage = "techtree" PhalanxAjaxPage = "phalanx" JumpgatelayerAjaxPage = "jumpgatelayer" FederationlayerAjaxPage = "federationlayer" UnionchangeAjaxPage = "unionchange" ChangenickAjaxPage = "changenick" PlanetlayerAjaxPage = "planetlayer" TraderlayerAjaxPage = "traderlayer" PlanetRenameAjaxPage = "planetRename" AllianceOverviewAjaxPage = "allianceOverview" SupportAjaxPage = "support" BuffActivationAjaxPage = "buffActivation" AuctioneerAjaxPage = "auctioneer" HighscoreContentAjaxPage = "highscoreContent" // V7 pages DefensesPage = "defenses" SuppliesPage = "supplies" FacilitiesPage = "facilities" FleetdispatchPage = "fleetdispatch" )
Page names
const ( Low = 1 Normal = 2 Important = 3 Critical = 4 )
Priorities
Variables ¶
var ( ErrUnionNotFound = errors.New("union not found") ErrAccountInVacationMode = errors.New("account in vacation mode") ErrNoShipSelected = errors.New("no ships to send") ErrNotEnoughShips = errors.New("not enough ships to send") ErrUninhabitedPlanet = errors.New("uninhabited planet") ErrNoDebrisField = errors.New("no debris field") ErrPlayerInVacationMode = errors.New("player in vacation mode") ErrAdminOrGM = errors.New("admin or GM") ErrNoAstrophysics = errors.New("you have to research Astrophysics first") ErrNoobProtection = errors.New("noob protection") ErrPlayerTooStrong = errors.New("this planet can not be attacked as the player is to strong") ErrNoMoonAvailable = errors.New("no moon available") ErrNoRecyclerAvailable = errors.New("no recycler available") ErrNoEventsRunning = errors.New("there are currently no events running") ErrPlanetAlreadyReservedForRelocation = errors.New("this planet has already been reserved for a relocation") )
Send fleet errors
var ( AllianceDepot = newAllianceDepot() // Buildings CrystalMine = newCrystalMine() CrystalStorage = newCrystalStorage() DeuteriumSynthesizer = newDeuteriumSynthesizer() DeuteriumTank = newDeuteriumTank() FusionReactor = newFusionReactor() MetalMine = newMetalMine() MetalStorage = newMetalStorage() MissileSilo = newMissileSilo() NaniteFactory = newNaniteFactory() ResearchLab = newResearchLab() RoboticsFactory = newRoboticsFactory() SeabedDeuteriumDen = newSeabedDeuteriumDen() ShieldedMetalDen = newShieldedMetalDen() Shipyard = newShipyard() SolarPlant = newSolarPlant() SpaceDock = newSpaceDock() LunarBase = newLunarBase() SensorPhalanx = newSensorPhalanx() JumpGate = newJumpGate() Terraformer = newTerraformer() UndergroundCrystalDen = newUndergroundCrystalDen() SolarSatellite = newSolarSatellite() AntiBallisticMissiles = newAntiBallisticMissiles() // Defense GaussCannon = newGaussCannon() HeavyLaser = newHeavyLaser() InterplanetaryMissiles = newInterplanetaryMissiles() IonCannon = newIonCannon() LargeShieldDome = newLargeShieldDome() LightLaser = newLightLaser() PlasmaTurret = newPlasmaTurret() RocketLauncher = newRocketLauncher() SmallShieldDome = newSmallShieldDome() Battlecruiser = newBattlecruiser() // Ships Battleship = newBattleship() Bomber = newBomber() ColonyShip = newColonyShip() Cruiser = newCruiser() Deathstar = newDeathstar() Destroyer = newDestroyer() EspionageProbe = newEspionageProbe() HeavyFighter = newHeavyFighter() LargeCargo = newLargeCargo() LightFighter = newLightFighter() Recycler = newRecycler() SmallCargo = newSmallCargo() Crawler = newCrawler() Reaper = newReaper() Pathfinder = newPathfinder() ArmourTechnology = newArmourTechnology() // Technologies Astrophysics = newAstrophysics() CombustionDrive = newCombustionDrive() ComputerTechnology = newComputerTechnology() EnergyTechnology = newEnergyTechnology() EspionageTechnology = newEspionageTechnology() GravitonTechnology = newGravitonTechnology() HyperspaceDrive = newHyperspaceDrive() HyperspaceTechnology = newHyperspaceTechnology() ImpulseDrive = newImpulseDrive() IntergalacticResearchNetwork = newIntergalacticResearchNetwork() IonTechnology = newIonTechnology() LaserTechnology = newLaserTechnology() PlasmaTechnology = newPlasmaTechnology() ShieldingTechnology = newShieldingTechnology() WeaponsTechnology = newWeaponsTechnology() )
All ogame objects
var Buildings = []Building{ MetalMine, CrystalMine, DeuteriumSynthesizer, SolarPlant, FusionReactor, SolarSatellite, MetalStorage, CrystalStorage, DeuteriumTank, ShieldedMetalDen, UndergroundCrystalDen, SeabedDeuteriumDen, RoboticsFactory, Shipyard, ResearchLab, AllianceDepot, MissileSilo, NaniteFactory, Terraformer, SpaceDock, LunarBase, SensorPhalanx, JumpGate, }
Buildings array of all buildings/facilities objects
var DefaultLoginWrapper = func(loginFn func() (bool, error)) error {
_, err := loginFn()
return err
}
DefaultLoginWrapper ...
var Defenses = []Defense{ RocketLauncher, LightLaser, HeavyLaser, GaussCannon, IonCannon, PlasmaTurret, SmallShieldDome, LargeShieldDome, AntiBallisticMissiles, InterplanetaryMissiles, }
Defenses array of all defenses objects
var ErrAccountBlocked = errors.New("account is blocked")
ErrAccountBlocked returned when account is banned
var ErrAccountNotFound = errors.New("account not found")
ErrAccountNotFound returned when the account is not found
var ErrAllSlotsInUse = errors.New("all slots are in use")
ErrAllSlotsInUse returned when all slots are in use
var ErrBadCredentials = errors.New("bad credentials")
ErrBadCredentials returned when the provided credentials are invalid
var ErrBotInactive = errors.New("bot is not active")
ErrBotInactive returned when the bot is not active
var ErrBotLoggedOut = errors.New("bot is logged out")
ErrBotLoggedOut returned when the bot is logged out (manually logged out)
var ErrDeactivateHidePictures = errors.New("deactivate 'Hide pictures in reports'")
ErrDeactivateHidePictures returned when "Hide pictures in reports" is activated
var ErrEventsBoxNotDisplayed = errors.New("eventList box is not displayed")
ErrEventsBoxNotDisplayed returned when trying to get attacks from a full page without event box
var ErrFailedExecuteCallback = errors.New("failed to execute callback")
ErrFailedExecuteCallback returned when "withRetry" failed to execute callback
var ErrInvalidPlanetID = errors.New("invalid planet id")
ErrInvalidPlanetID returned when a planet id is invalid
var ErrNotLogged = errors.New("not logged")
ErrNotLogged returned when the bot is not logged
var MoonBuildings = []Building{ SolarSatellite, MetalStorage, CrystalStorage, DeuteriumTank, RoboticsFactory, Shipyard, LunarBase, SensorPhalanx, JumpGate, }
MoonBuildings arrays of moon specific buildings
var Objs = ObjsStruct{ AllianceDepot: AllianceDepot, CrystalMine: CrystalMine, CrystalStorage: CrystalStorage, DeuteriumSynthesizer: DeuteriumSynthesizer, DeuteriumTank: DeuteriumTank, FusionReactor: FusionReactor, MetalMine: MetalMine, MetalStorage: MetalStorage, MissileSilo: MissileSilo, NaniteFactory: NaniteFactory, ResearchLab: ResearchLab, RoboticsFactory: RoboticsFactory, SeabedDeuteriumDen: SeabedDeuteriumDen, ShieldedMetalDen: ShieldedMetalDen, Shipyard: Shipyard, SolarPlant: SolarPlant, SpaceDock: SpaceDock, LunarBase: LunarBase, SensorPhalanx: SensorPhalanx, JumpGate: JumpGate, Terraformer: Terraformer, UndergroundCrystalDen: UndergroundCrystalDen, SolarSatellite: SolarSatellite, AntiBallisticMissiles: AntiBallisticMissiles, GaussCannon: GaussCannon, HeavyLaser: HeavyLaser, InterplanetaryMissiles: InterplanetaryMissiles, IonCannon: IonCannon, LargeShieldDome: LargeShieldDome, LightLaser: LightLaser, PlasmaTurret: PlasmaTurret, RocketLauncher: RocketLauncher, SmallShieldDome: SmallShieldDome, Battlecruiser: Battlecruiser, Battleship: Battleship, Bomber: Bomber, ColonyShip: ColonyShip, Cruiser: Cruiser, Deathstar: Deathstar, Destroyer: Destroyer, EspionageProbe: EspionageProbe, HeavyFighter: HeavyFighter, LargeCargo: LargeCargo, LightFighter: LightFighter, Recycler: Recycler, SmallCargo: SmallCargo, Crawler: Crawler, Reaper: Reaper, Pathfinder: Pathfinder, ArmourTechnology: ArmourTechnology, Astrophysics: Astrophysics, CombustionDrive: CombustionDrive, ComputerTechnology: ComputerTechnology, EnergyTechnology: EnergyTechnology, EspionageTechnology: EspionageTechnology, GravitonTechnology: GravitonTechnology, HyperspaceDrive: HyperspaceDrive, HyperspaceTechnology: HyperspaceTechnology, ImpulseDrive: ImpulseDrive, IntergalacticResearchNetwork: IntergalacticResearchNetwork, IonTechnology: IonTechnology, LaserTechnology: LaserTechnology, PlasmaTechnology: PlasmaTechnology, ShieldingTechnology: ShieldingTechnology, WeaponsTechnology: WeaponsTechnology, }
Objs all ogame objects
var PlanetBuildings = []Building{ MetalMine, CrystalMine, DeuteriumSynthesizer, SolarPlant, FusionReactor, SolarSatellite, MetalStorage, CrystalStorage, DeuteriumTank, ShieldedMetalDen, UndergroundCrystalDen, SeabedDeuteriumDen, RoboticsFactory, Shipyard, ResearchLab, AllianceDepot, MissileSilo, NaniteFactory, Terraformer, SpaceDock, }
PlanetBuildings arrays of planet specific buildings
var Ships = []Ship{ LightFighter, HeavyFighter, Cruiser, Battleship, Battlecruiser, Bomber, Destroyer, Deathstar, SmallCargo, LargeCargo, ColonyShip, Recycler, EspionageProbe, SolarSatellite, Crawler, Reaper, Pathfinder, }
Ships array of all ships objects
var Technologies = []Technology{ EnergyTechnology, LaserTechnology, IonTechnology, HyperspaceTechnology, PlasmaTechnology, CombustionDrive, ImpulseDrive, HyperspaceDrive, EspionageTechnology, ComputerTechnology, Astrophysics, IntergalacticResearchNetwork, GravitonTechnology, WeaponsTechnology, ShieldingTechnology, ArmourTechnology, }
Technologies array of all technologies objects
Functions ¶
func ActivateCelestialItemHandler ¶
ActivateCelestialItemHandler ...
func BuildBuildingHandler ¶
BuildBuildingHandler ...
func BuildCancelableHandler ¶
BuildCancelableHandler ...
func BuildProductionHandler ¶
BuildProductionHandler ...
func BuildTechnologyHandler ¶
BuildTechnologyHandler ...
func BuyOfferOfTheDayHandler ¶
BuyOfferOfTheDayHandler ...
func CancelBuildingHandler ¶
CancelBuildingHandler ...
func CancelResearchHandler ¶
CancelResearchHandler ...
func ConstructionsBeingBuiltHandler ¶
ConstructionsBeingBuiltHandler ...
func DeleteEspionageMessagesHandler ¶
DeleteEspionageMessagesHandler ...
func DeleteMessageHandler ¶
DeleteMessageHandler ...
func DeleteMessagesFromTabHandler ¶
DeleteMessagesFromTabHandler ...
func Distance ¶
func Distance(c1, c2 Coordinate, universeSize, nbSystems int64, donutGalaxy, donutSystem bool) (distance int64)
Distance returns the distance between two coordinates
func DoAuctionHandler ¶
DoAuctionHandler (`celestialID=metal:crystal:deuterium` eg: `123456=123:456:789`)
func GetAlliancePageContentHandler ¶
GetAlliancePageContentHandler ...
func GetCelestialItemsHandler ¶
GetCelestialItemsHandler ...
func GetEspionageReportForHandler ¶
GetEspionageReportForHandler ...
func GetEspionageReportHandler ¶
GetEspionageReportHandler ...
func GetEspionageReportMessagesHandler ¶
GetEspionageReportMessagesHandler ...
func GetFacilitiesHandler ¶
GetFacilitiesHandler ...
func GetMoonByCoordHandler ¶
GetMoonByCoordHandler ...
func GetPlanetByCoordHandler ¶
GetPlanetByCoordHandler ...
func GetProductionHandler ¶
GetProductionHandler ...
func GetResourceSettingsHandler ¶
GetResourceSettingsHandler ...
func GetResourcesBuildingsHandler ¶
GetResourcesBuildingsHandler ...
func GetStaticHEADHandler ¶
GetStaticHEADHandler ...
func GetUniverseNameHandler ¶
GetUniverseNameHandler ...
func GetUniverseSpeedFleetHandler ¶
GetUniverseSpeedFleetHandler ...
func GetUniverseSpeedHandler ¶
GetUniverseSpeedHandler ...
func IsAjaxPage ¶
IsAjaxPage either the requested page is a partial/ajax page
func IsBuildingID ¶
IsBuildingID helper returns if an integer is a building id
func IsDefenseID ¶
IsDefenseID helper returns if an integer is a defense id
func IsFacilityID ¶
IsFacilityID helper returns if an integer is a facility id
func IsResourceBuildingID ¶
IsResourceBuildingID helper returns if an integer is a resource defense id
func IsUnderAttackHandler ¶
IsUnderAttackHandler ...
func PageContentHandler ¶
PageContentHandler ... curl 127.0.0.1:1234/bot/page-content -d 'page=overview&cp=123'
func SendFleetHandler ¶
SendFleetHandler ... curl 127.0.0.1:1234/bot/planets/123/send-fleet -d 'ships="203,1"&ships="204,10"&speed=10&galaxy=1&system=1&type=1&position=1&mission=3&metal=1&crystal=2&deuterium=3'
func SendMessageHandler ¶
SendMessageHandler ... curl 127.0.0.1:1234/bot/send-message -d 'playerID=123&message="Sup boi!"'
func ServerVersionHandler ¶
ServerVersionHandler ...
func SetResourceSettingsHandler ¶
SetResourceSettingsHandler ... curl 127.0.0.1:1234/bot/planets/123/resource-settings -d 'metalMine=100&crystalMine=100&deuteriumSynthesizer=100&solarPlant=100&fusionReactor=100&solarSatellite=100'
func SetUserAgentHandler ¶
SetUserAgentHandler ... curl 127.0.0.1:1234/bot/set-user-agent -d 'userAgent="New user agent"'
func SkipInterceptor ¶
func SkipInterceptor(opt *options)
SkipInterceptor option to skip html interceptors
func TasksHandler ¶
TasksHandler return how many tasks are queued in the heap.
Types ¶
type AllianceInfos ¶
AllianceInfos public information of an alliance in the galaxy page
type AttackEvent ¶
type AttackEvent struct { ID int64 MissionType MissionID Origin Coordinate Destination Coordinate DestinationName string ArrivalTime time.Time ArriveIn int64 AttackerName string AttackerID int64 UnionID int64 Missiles int64 Ships *ShipsInfos }
AttackEvent all information available about an enemy attack
func (AttackEvent) String ¶
func (a AttackEvent) String() string
type Auction ¶
type Auction struct { HasFinished bool Endtime int64 NumBids int64 CurrentBid int64 AlreadyBid int64 MinimumBid int64 DeficitBid int64 HighestBidder string HighestBidderUserID int64 CurrentItem string CurrentItemLong string Inventory int64 Token string ResourceMultiplier struct { Metal float64 Crystal float64 Deuterium float64 Honor int64 } Resources map[string]interface{} }
Auction ...
type Base ¶
Base struct for all ogame objects
func (Base) GetRequirements ¶
GetRequirements returns the requirements to have this object available
func (Base) IsAvailable ¶
func (b Base) IsAvailable(t CelestialType, lazyResourcesBuildings LazyResourcesBuildings, lazyFacilities LazyFacilities, lazyResearches LazyResearches, energy int64) bool
IsAvailable returns either or not the object is available to us
func (Base) IsFulfilled ¶
func (b Base) IsFulfilled( levelNeeded int64, lazyResourcesBuildings LazyResourcesBuildings, lazyFacilities LazyFacilities, lazyResearches LazyResearches, ) bool
IsFulfilled xxxx
type BaseBuilding ¶
type BaseBuilding struct {
BaseLevelable
}
BaseBuilding base struct for buildings
func (BaseBuilding) ConstructionTime ¶
func (b BaseBuilding) ConstructionTime(level, universeSpeed int64, facilities Facilities, hasTechnocrat, isDiscoverer bool) time.Duration
ConstructionTime returns the duration it takes to build given level. Deconstruction time is the same function.
func (BaseBuilding) DeconstructionPrice ¶
func (b BaseBuilding) DeconstructionPrice(level int64, techs Researches) Resources
DeconstructionPrice returns the price to tear down to given level
func (BaseBuilding) GetLevel ¶
func (b BaseBuilding) GetLevel(lazyResourcesBuildings LazyResourcesBuildings, lazyFacilities LazyFacilities, _ LazyResearches) int64
GetLevel returns current level of a building
type BaseDefender ¶
type BaseDefender struct { Base StructuralIntegrity int64 ShieldPower int64 WeaponPower int64 RapidfireFrom map[ID]int64 RapidfireAgainst map[ID]int64 Price Resources }
BaseDefender base for defender units (ships, defenses)
func (BaseDefender) ConstructionTime ¶
func (b BaseDefender) ConstructionTime(nbr, universeSpeed int64, facilities Facilities, hasTechnocrat, isDiscoverer bool) time.Duration
ConstructionTime returns the duration it takes to build nbr defender units
func (BaseDefender) GetPrice ¶
func (b BaseDefender) GetPrice(nbr int64) Resources
GetPrice returns the price of nbr defender units
func (BaseDefender) GetRapidfireAgainst ¶
func (b BaseDefender) GetRapidfireAgainst() map[ID]int64
GetRapidfireAgainst returns which ships/defenses we have rapid fire against
func (BaseDefender) GetRapidfireFrom ¶
func (b BaseDefender) GetRapidfireFrom() map[ID]int64
GetRapidfireFrom returns which ships have rapid fire against the defender unit
func (BaseDefender) GetShieldPower ¶
func (b BaseDefender) GetShieldPower(researches Researches) int64
GetShieldPower returns shield power of a defender unit
func (BaseDefender) GetStructuralIntegrity ¶
func (b BaseDefender) GetStructuralIntegrity(researches Researches) int64
GetStructuralIntegrity returns structural integrity of a defender unit
func (BaseDefender) GetWeaponPower ¶
func (b BaseDefender) GetWeaponPower(researches Researches) int64
GetWeaponPower returns weapon power of a defender unit
type BaseDefense ¶
type BaseDefense struct {
BaseDefender
}
BaseDefense base struct for defense objects
type BaseLevelable ¶
BaseLevelable base struct for levelable (buildings, technologies)
func (BaseLevelable) GetPrice ¶
func (b BaseLevelable) GetPrice(level int64) Resources
GetPrice returns the price to build the given level
type BaseOgameObj ¶
type BaseOgameObj interface { GetID() ID GetName() string ConstructionTime(nbr, universeSpeed int64, facilities Facilities, hasTechnocrat, isDiscoverer bool) time.Duration GetRequirements() map[ID]int64 GetPrice(int64) Resources IsAvailable(CelestialType, LazyResourcesBuildings, LazyFacilities, LazyResearches, int64) bool IsFulfilled(int64, LazyResourcesBuildings, LazyFacilities, LazyResearches) bool }
BaseOgameObj base interface for all ogame objects (buildings, technologies, ships, defenses)
type BaseShip ¶
type BaseShip struct { BaseDefender BaseCargoCapacity int64 BaseSpeed int64 FuelConsumption int64 }
BaseShip base struct for ships
func (BaseShip) GetCargoCapacity ¶
func (b BaseShip) GetCargoCapacity(techs Researches, probeRaids, isCollector bool) int64
GetCargoCapacity returns ship cargo capacity
func (BaseShip) GetFuelConsumption ¶
func (b BaseShip) GetFuelConsumption(techs Researches) int64
GetFuelConsumption returns ship fuel consumption
type BaseTechnology ¶
type BaseTechnology struct {
BaseLevelable
}
BaseTechnology base struct for technologies
func (BaseTechnology) ConstructionTime ¶
func (b BaseTechnology) ConstructionTime(level, universeSpeed int64, facilities Facilities, hasTechnocrat, isDiscoverer bool) time.Duration
ConstructionTime returns the duration it takes to build given technology
func (BaseTechnology) GetLevel ¶
func (b BaseTechnology) GetLevel(_ LazyResourcesBuildings, _ LazyFacilities, lazyResearches LazyResearches) int64
GetLevel returns current level of a technology
type Building ¶
type Building interface { Levelable DeconstructionPrice(lvl int64, techs Researches) Resources }
Building interface that all buildings implement
type Celestial ¶
type Celestial interface { GetID() CelestialID GetType() CelestialType GetName() string GetDiameter() int64 GetCoordinate() Coordinate GetFields() Fields GetResources() (Resources, error) GetResourcesDetails() (ResourcesDetails, error) GetFacilities() (Facilities, error) SendFleet([]Quantifiable, Speed, Coordinate, MissionID, Resources, int64, int64) (Fleet, error) EnsureFleet([]Quantifiable, Speed, Coordinate, MissionID, Resources, int64, int64) (Fleet, error) GetDefense() (DefensesInfos, error) GetShips() (ShipsInfos, error) BuildDefense(defenseID ID, nbr int64) error ConstructionsBeingBuilt() (ID, int64, ID, int64) GetProduction() ([]Quantifiable, int64, error) GetResourcesBuildings() (ResourcesBuildings, error) Build(id ID, nbr int64) error BuildBuilding(buildingID ID) error BuildTechnology(technologyID ID) error CancelResearch() error CancelBuilding() error TearDown(buildingID ID) error GetItems() ([]Item, error) ActivateItem(string) error }
Celestial ...
type CelestialType ¶
type CelestialType int64
CelestialType destination type might be planet/moon/debris
func (CelestialType) Int ¶
func (d CelestialType) Int() int64
Int returns an integer value of the CelestialType Deprecated: backward compatibility
func (CelestialType) Int64 ¶
func (d CelestialType) Int64() int64
Int64 returns an integer value of the CelestialType
func (CelestialType) String ¶
func (d CelestialType) String() string
type ChatMsg ¶
type ChatMsg struct { SenderID int64 `json:"senderId"` SenderName string `json:"senderName"` AssociationID int64 `json:"associationId"` Text string `json:"text"` ID int64 `json:"id"` Date int64 `json:"date"` }
ChatMsg ...
type ChatPayload ¶
ChatPayload ...
type ChatPostResp ¶
type ChatPostResp struct { Status string `json:"status"` ID int `json:"id"` SenderID int `json:"senderId"` TargetID int `json:"targetId"` Text string `json:"text"` Date int `json:"date"` NewToken string `json:"newToken"` }
ChatPostResp ...
type CheckTargetResponse ¶
type CheckTargetResponse struct { Status string `json:"status"` Orders struct { Num1 bool `json:"1"` Num2 bool `json:"2"` Num3 bool `json:"3"` Num4 bool `json:"4"` Num5 bool `json:"5"` Num6 bool `json:"6"` Num7 bool `json:"7"` Num8 bool `json:"8"` Num9 bool `json:"9"` Num15 bool `json:"15"` } `json:"orders"` TargetInhabited bool `json:"targetInhabited"` TargetIsStrong bool `json:"targetIsStrong"` TargetIsOutlaw bool `json:"targetIsOutlaw"` TargetIsBuddyOrAllyMember bool `json:"targetIsBuddyOrAllyMember"` TargetPlayerID int `json:"targetPlayerId"` TargetPlayerName string `json:"targetPlayerName"` TargetPlayerColorClass string `json:"targetPlayerColorClass"` TargetPlayerRankIcon string `json:"targetPlayerRankIcon"` PlayerIsOutlaw bool `json:"playerIsOutlaw"` TargetPlanet struct { Galaxy int `json:"galaxy"` System int `json:"system"` Position int `json:"position"` Type int `json:"type"` Name string `json:"name"` } `json:"targetPlanet"` Errors []struct { Message string `json:"message"` Error int `json:"error"` } `json:"errors"` TargetOk bool `json:"targetOk"` Components []interface{} `json:"components"` }
CheckTargetResponse ...
type CombatReportSummary ¶
type CombatReportSummary struct { ID int64 APIKey string Origin *Coordinate Destination Coordinate AttackerName string DefenderName string Loot int64 Metal int64 Crystal int64 Deuterium int64 DebrisField int64 CreatedAt time.Time }
CombatReportSummary summary of combat report
type Config ¶
type Config struct { IsLogging bool Simulations int Workers int Attacker attackerInfo Defender defenderInfo }
Config ...
type Coordinate ¶
type Coordinate struct { Galaxy int64 System int64 Position int64 Type CelestialType }
Coordinate represent an ogame coordinate
func ParseCoord ¶
func ParseCoord(str string) (coord Coordinate, err error)
ParseCoord parse a coordinate from a string
func (Coordinate) Debris ¶
func (c Coordinate) Debris() Coordinate
Debris return a new coordinate with debris type
func (Coordinate) Equal ¶
func (c Coordinate) Equal(v Coordinate) bool
Equal returns either two coordinates are equal or not
func (Coordinate) IsDebris ¶
func (c Coordinate) IsDebris() bool
IsDebris return true if coordinate is a debris field
func (Coordinate) IsMoon ¶
func (c Coordinate) IsMoon() bool
IsMoon return true if coordinate is a moon
func (Coordinate) IsPlanet ¶
func (c Coordinate) IsPlanet() bool
IsPlanet return true if coordinate is a planet
func (Coordinate) Moon ¶
func (c Coordinate) Moon() Coordinate
Moon return a new coordinate with moon type
func (Coordinate) Planet ¶
func (c Coordinate) Planet() Coordinate
Planet return a new coordinate with planet type
func (Coordinate) String ¶
func (c Coordinate) String() string
type DMCost ¶
type DMCost struct { Cost int64 CanBuy bool // Either or not we have enough DM Complete bool // false means we will halve the time, true will complete OGameID ID // What we are going to build Nbr int64 // Either the amount of ships/defences or the building/research level BuyAndActivateToken string Token string }
DMCost ...
type Defender ¶
type Defender struct { Metal int Crystal int Deuterium int Weapon int Shield int Armour int ShipsInfos DefensesInfos }
Defender ...
type DefenderObj ¶
type DefenderObj interface { BaseOgameObj GetStructuralIntegrity(Researches) int64 GetShieldPower(Researches) int64 GetWeaponPower(Researches) int64 GetRapidfireFrom() map[ID]int64 GetRapidfireAgainst() map[ID]int64 }
DefenderObj base interface for all defensive units (ships, defenses)
type Defense ¶
type Defense interface { DefenderObj }
Defense interface implemented by all defenses units
type DefensesInfos ¶
type DefensesInfos struct { RocketLauncher int64 LightLaser int64 HeavyLaser int64 GaussCannon int64 IonCannon int64 PlasmaTurret int64 SmallShieldDome int64 LargeShieldDome int64 AntiBallisticMissiles int64 InterplanetaryMissiles int64 }
DefensesInfos represent a planet defenses information
func (DefensesInfos) AttackableValue ¶
func (d DefensesInfos) AttackableValue() int64
AttackableValue returns the value of the defenses that can be attacked
func (DefensesInfos) ByID ¶
func (d DefensesInfos) ByID(id ID) int64
ByID get number of defenses by defense id
func (*DefensesInfos) Set ¶
func (d *DefensesInfos) Set(id ID, val int64)
Set sets the defenses value using the defense id
func (DefensesInfos) String ¶
func (d DefensesInfos) String() string
type EspionageReport ¶
type EspionageReport struct { Resources ID int64 Username string LastActivity int64 CounterEspionage int64 APIKey string HasFleetInformation bool // Either or not we sent enough probes to get the fleet information HasDefensesInformation bool // Either or not we sent enough probes to get the defenses information HasBuildingsInformation bool // Either or not we sent enough probes to get the buildings information HasResearchesInformation bool // Either or not we sent enough probes to get the researches information HonorableTarget bool IsBandit bool IsStarlord bool IsInactive bool IsLongInactive bool MetalMine *int64 // ResourcesBuildings CrystalMine *int64 DeuteriumSynthesizer *int64 SolarPlant *int64 FusionReactor *int64 SolarSatellite *int64 MetalStorage *int64 CrystalStorage *int64 DeuteriumTank *int64 RoboticsFactory *int64 // Facilities Shipyard *int64 ResearchLab *int64 AllianceDepot *int64 MissileSilo *int64 NaniteFactory *int64 Terraformer *int64 SpaceDock *int64 LunarBase *int64 SensorPhalanx *int64 JumpGate *int64 EnergyTechnology *int64 // Researches LaserTechnology *int64 IonTechnology *int64 HyperspaceTechnology *int64 PlasmaTechnology *int64 CombustionDrive *int64 ImpulseDrive *int64 HyperspaceDrive *int64 EspionageTechnology *int64 ComputerTechnology *int64 Astrophysics *int64 IntergalacticResearchNetwork *int64 GravitonTechnology *int64 WeaponsTechnology *int64 ShieldingTechnology *int64 ArmourTechnology *int64 RocketLauncher *int64 // Defenses LightLaser *int64 HeavyLaser *int64 GaussCannon *int64 IonCannon *int64 PlasmaTurret *int64 SmallShieldDome *int64 LargeShieldDome *int64 AntiBallisticMissiles *int64 InterplanetaryMissiles *int64 LightFighter *int64 // Fleets HeavyFighter *int64 Cruiser *int64 Battleship *int64 Battlecruiser *int64 Bomber *int64 Destroyer *int64 Deathstar *int64 SmallCargo *int64 LargeCargo *int64 ColonyShip *int64 Recycler *int64 EspionageProbe *int64 Crawler *int64 Reaper *int64 Pathfinder *int64 Coordinate Coordinate Type EspionageReportType Date time.Time }
EspionageReport detailed espionage report
func (EspionageReport) DefensesInfos ¶
func (r EspionageReport) DefensesInfos() *DefensesInfos
DefensesInfos returns a DefensesInfos struct from the espionage report
func (EspionageReport) Facilities ¶
func (r EspionageReport) Facilities() *Facilities
Facilities returns a Facilities struct from the espionage report
func (EspionageReport) Loot ¶
func (r EspionageReport) Loot(characterClass CharacterClass) Resources
Loot returns the possible loot
func (EspionageReport) PlunderRatio ¶
func (r EspionageReport) PlunderRatio(characterClass CharacterClass) float64
PlunderRatio returns the plunder ratio
func (EspionageReport) Researches ¶
func (r EspionageReport) Researches() *Researches
Researches returns a Researches struct from the espionage report
func (EspionageReport) ResourcesBuildings ¶
func (r EspionageReport) ResourcesBuildings() *ResourcesBuildings
ResourcesBuildings returns a ResourcesBuildings struct from the espionage report
func (EspionageReport) ShipsInfos ¶
func (r EspionageReport) ShipsInfos() *ShipsInfos
ShipsInfos returns a ShipsInfos struct from the espionage report
type EspionageReportSummary ¶
type EspionageReportSummary struct { ID int64 Type EspionageReportType From string // Fleet Command | Space Monitoring Target Coordinate LootPercentage float64 }
EspionageReportSummary summary of espionage report
type EspionageReportType ¶
type EspionageReportType int
EspionageReportType type of espionage report (action or report)
const Action EspionageReportType = 0
Action message received when an enemy is seen near your planet
const Report EspionageReportType = 1
Report message received when you spied on someone
type ExponentialBackoff ¶
type ExponentialBackoff struct {
// contains filtered or unexported fields
}
ExponentialBackoff ...
func NewExponentialBackoff ¶
func NewExponentialBackoff(max int) *ExponentialBackoff
NewExponentialBackoff ...
type Extractor ¶
type Extractor interface { ExtractIsInVacation(pageHTML []byte) bool ExtractPlanets(pageHTML []byte, b *OGame) []Planet ExtractPlanet(pageHTML []byte, v interface{}, b *OGame) (Planet, error) ExtractPlanetByCoord(pageHTML []byte, b *OGame, coord Coordinate) (Planet, error) ExtractMoons(pageHTML []byte, b *OGame) []Moon ExtractMoon(pageHTML []byte, b *OGame, v interface{}) (Moon, error) ExtractMoonByCoord(pageHTML []byte, b *OGame, coord Coordinate) (Moon, error) ExtractCelestials(pageHTML []byte, b *OGame) ([]Celestial, error) ExtractCelestial(pageHTML []byte, b *OGame, v interface{}) (Celestial, error) ExtractServerTime(pageHTML []byte) (time.Time, error) ExtractFleetsFromEventList(pageHTML []byte) []Fleet ExtractIPM(pageHTML []byte) (duration, max int64, token string) ExtractFleets(pageHTML []byte) (res []Fleet) ExtractSlots(pageHTML []byte) Slots ExtractOgameTimestamp(pageHTML []byte) int64 ExtractResources(pageHTML []byte) Resources ExtractResourcesDetailsFromFullPage(pageHTML []byte) ResourcesDetails ExtractResourceSettings(pageHTML []byte) (ResourceSettings, error) ExtractAttacks(pageHTML []byte) ([]AttackEvent, error) ExtractOfferOfTheDay(pageHTML []byte) (int64, string, PlanetResources, Multiplier, error) ExtractResourcesBuildings(pageHTML []byte) (ResourcesBuildings, error) ExtractDefense(pageHTML []byte) (DefensesInfos, error) ExtractShips(pageHTML []byte) (ShipsInfos, error) ExtractFacilities(pageHTML []byte) (Facilities, error) ExtractResearch(pageHTML []byte) Researches ExtractProduction(pageHTML []byte) ([]Quantifiable, int64, error) ExtractOverviewProduction(pageHTML []byte) ([]Quantifiable, int64, error) ExtractFleet1Ships(pageHTML []byte) ShipsInfos ExtractEspionageReportMessageIDs(pageHTML []byte) ([]EspionageReportSummary, int64) ExtractCombatReportMessagesSummary(pageHTML []byte) ([]CombatReportSummary, int64) ExtractEspionageReport(pageHTML []byte, location *time.Location) (EspionageReport, error) ExtractResourcesProductions(pageHTML []byte) (Resources, error) ExtractPreferences(pageHTML []byte) Preferences ExtractSpioAnz(pageHTML []byte) int64 ExtractPreferencesShowActivityMinutes(pageHTML []byte) bool ExtractHiddenFields(pageHTML []byte) (fields url.Values) ExtractHiddenFieldsFromDoc(doc *goquery.Document) url.Values ExtractBodyIDFromDoc(doc *goquery.Document) string ExtractIsInVacationFromDoc(doc *goquery.Document) bool ExtractPlanetsFromDoc(doc *goquery.Document, b *OGame) []Planet ExtractPlanetByIDFromDoc(doc *goquery.Document, b *OGame, planetID PlanetID) (Planet, error) ExtractCelestialByIDFromDoc(doc *goquery.Document, b *OGame, celestialID CelestialID) (Celestial, error) ExtractPlanetByCoordFromDoc(doc *goquery.Document, b *OGame, coord Coordinate) (Planet, error) ExtractOgameTimestampFromDoc(doc *goquery.Document) int64 ExtractResourcesFromDoc(doc *goquery.Document) Resources ExtractResourcesDetailsFromFullPageFromDoc(doc *goquery.Document) ResourcesDetails ExtractPlanetFromDoc(doc *goquery.Document, v interface{}, b *OGame) (Planet, error) ExtractMoonsFromDoc(doc *goquery.Document, b *OGame) []Moon ExtractMoonFromDoc(doc *goquery.Document, b *OGame, v interface{}) (Moon, error) ExtractMoonByCoordFromDoc(doc *goquery.Document, b *OGame, coord Coordinate) (Moon, error) ExtractMoonByIDFromDoc(doc *goquery.Document, b *OGame, moonID MoonID) (Moon, error) ExtractCelestialsFromDoc(doc *goquery.Document, b *OGame) ([]Celestial, error) ExtractCelestialFromDoc(doc *goquery.Document, b *OGame, v interface{}) (Celestial, error) ExtractResourcesBuildingsFromDoc(doc *goquery.Document) (ResourcesBuildings, error) ExtractDefenseFromDoc(doc *goquery.Document) (DefensesInfos, error) ExtractShipsFromDoc(doc *goquery.Document) (ShipsInfos, error) ExtractFacilitiesFromDoc(doc *goquery.Document) (Facilities, error) ExtractResearchFromDoc(doc *goquery.Document) Researches ExtractOGameSessionFromDoc(doc *goquery.Document) string ExtractAttacksFromDoc(doc *goquery.Document, clock clockwork.Clock) ([]AttackEvent, error) ExtractOfferOfTheDayFromDoc(doc *goquery.Document) (price int64, importToken string, planetResources PlanetResources, multiplier Multiplier, err error) ExtractProductionFromDoc(doc *goquery.Document) ([]Quantifiable, error) ExtractOverviewProductionFromDoc(doc *goquery.Document) ([]Quantifiable, error) ExtractFleet1ShipsFromDoc(doc *goquery.Document) (s ShipsInfos) ExtractEspionageReportMessageIDsFromDoc(doc *goquery.Document) ([]EspionageReportSummary, int64) ExtractCombatReportMessagesFromDoc(doc *goquery.Document) ([]CombatReportSummary, int64) ExtractEspionageReportFromDoc(doc *goquery.Document, location *time.Location) (EspionageReport, error) ExtractResourcesProductionsFromDoc(doc *goquery.Document) (Resources, error) ExtractPreferencesFromDoc(doc *goquery.Document) Preferences ExtractResourceSettingsFromDoc(doc *goquery.Document) (ResourceSettings, error) ExtractFleetsFromEventListFromDoc(doc *goquery.Document) []Fleet ExtractIPMFromDoc(doc *goquery.Document) (duration, max int64, token string) ExtractFleetsFromDoc(doc *goquery.Document) (res []Fleet) ExtractSlotsFromDoc(doc *goquery.Document) Slots ExtractServerTimeFromDoc(doc *goquery.Document) (time.Time, error) ExtractSpioAnzFromDoc(doc *goquery.Document) int64 ExtractDisableChatBarFromDoc(doc *goquery.Document) bool ExtractDisableOutlawWarningFromDoc(doc *goquery.Document) bool ExtractMobileVersionFromDoc(doc *goquery.Document) bool ExtractShowOldDropDownsFromDoc(doc *goquery.Document) bool ExtractActivateAutofocusFromDoc(doc *goquery.Document) bool ExtractEventsShowFromDoc(doc *goquery.Document) int64 ExtractSortSettingFromDoc(doc *goquery.Document) int64 ExtractSortOrderFromDoc(doc *goquery.Document) int64 ExtractShowDetailOverlayFromDoc(doc *goquery.Document) bool ExtractAnimatedSlidersFromDoc(doc *goquery.Document) bool ExtractAnimatedOverviewFromDoc(doc *goquery.Document) bool ExtractPopupsNoticesFromDoc(doc *goquery.Document) bool ExtractPopopsCombatreportFromDoc(doc *goquery.Document) bool ExtractSpioReportPicturesFromDoc(doc *goquery.Document) bool ExtractMsgResultsPerPageFromDoc(doc *goquery.Document) int64 ExtractAuctioneerNotificationsFromDoc(doc *goquery.Document) bool ExtractEconomyNotificationsFromDoc(doc *goquery.Document) bool ExtractShowActivityMinutesFromDoc(doc *goquery.Document) bool ExtractPreserveSystemOnPlanetChangeFromDoc(doc *goquery.Document) bool ExtractNotifBuildListFromDoc(doc *goquery.Document) bool ExtractNotifFriendlyFleetActivitiesFromDoc(doc *goquery.Document) bool ExtractNotifHostileFleetActivitiesFromDoc(doc *goquery.Document) bool ExtractNotifForeignEspionageFromDoc(doc *goquery.Document) bool ExtractNotifAllianceBroadcastsFromDoc(doc *goquery.Document) bool ExtractNotifAllianceMessagesFromDoc(doc *goquery.Document) bool ExtractNotifAuctionsFromDoc(doc *goquery.Document) bool ExtractNotifAccountFromDoc(doc *goquery.Document) bool ExtractPlanetCoordinate(pageHTML []byte) (Coordinate, error) ExtractPlanetID(pageHTML []byte) (CelestialID, error) ExtractOverviewShipSumCountdownFromBytes(pageHTML []byte) int64 ExtractOGameTimestampFromBytes(pageHTML []byte) int64 ExtractPlanetType(pageHTML []byte) (CelestialType, error) ExtractAjaxChatToken(pageHTML []byte) (string, error) ExtractUserInfos(pageHTML []byte, lang string) (UserInfos, error) ExtractResourcesDetails(pageHTML []byte) (out ResourcesDetails, err error) ExtractCoord(v string) (coord Coordinate) ExtractGalaxyInfos(pageHTML []byte, botPlayerName string, botPlayerID, botPlayerRank int64) (SystemInfos, error) ExtractPhalanx(pageHTML []byte) ([]Fleet, error) ExtractJumpGate(pageHTML []byte) (ShipsInfos, string, []MoonID, int64) ExtractFederation(pageHTML []byte) url.Values ExtractConstructions(pageHTML []byte) (buildingID ID, buildingCountdown int64, researchID ID, researchCountdown int64) ExtractFleetDeutSaveFactor(pageHTML []byte) float64 ExtractCancelBuildingInfos(pageHTML []byte) (token string, techID, listID int64, err error) ExtractCancelResearchInfos(pageHTML []byte) (token string, techID, listID int64, err error) ExtractEmpire(pageHTML []byte, nbr int64) (interface{}, error) ExtractCharacterClass(pageHTML []byte) (CharacterClass, error) ExtractCharacterClassFromDoc(doc *goquery.Document) (CharacterClass, error) ExtractCommander(pageHTML []byte) bool ExtractAdmiral(pageHTML []byte) bool ExtractEngineer(pageHTML []byte) bool ExtractGeologist(pageHTML []byte) bool ExtractTechnocrat(pageHTML []byte) bool ExtractCommanderFromDoc(doc *goquery.Document) bool ExtractAdmiralFromDoc(doc *goquery.Document) bool ExtractEngineerFromDoc(doc *goquery.Document) bool ExtractGeologistFromDoc(doc *goquery.Document) bool ExtractTechnocratFromDoc(doc *goquery.Document) bool ExtractAuction(pageHTML []byte) (Auction, error) ExtractHighscore(pageHTML []byte) (Highscore, error) ExtractHighscoreFromDoc(doc *goquery.Document) (Highscore, error) ExtractAllResources(pageHTML []byte) (map[CelestialID]Resources, error) ExtractDMCosts(pageHTML []byte) (DMCosts, error) ExtractBuffActivation(pageHTML []byte) (string, []Item, error) ExtractIsMobile(pageHTML []byte) bool ExtractIsMobileFromDoc(doc *goquery.Document) bool }
Extractor ...
type ExtractorV6 ¶
type ExtractorV6 struct { }
ExtractorV6 ...
func (ExtractorV6) ExtractActivateAutofocusFromDoc ¶
func (e ExtractorV6) ExtractActivateAutofocusFromDoc(doc *goquery.Document) bool
ExtractActivateAutofocusFromDoc ...
func (ExtractorV6) ExtractAdmiral ¶
func (e ExtractorV6) ExtractAdmiral(pageHTML []byte) bool
ExtractAdmiral ...
func (ExtractorV6) ExtractAdmiralFromDoc ¶
func (e ExtractorV6) ExtractAdmiralFromDoc(doc *goquery.Document) bool
ExtractAdmiralFromDoc ...
func (ExtractorV6) ExtractAjaxChatToken ¶
func (e ExtractorV6) ExtractAjaxChatToken(pageHTML []byte) (string, error)
ExtractAjaxChatToken ...
func (ExtractorV6) ExtractAllResources ¶
func (e ExtractorV6) ExtractAllResources(pageHTML []byte) (map[CelestialID]Resources, error)
ExtractAllResources ...
func (ExtractorV6) ExtractAnimatedOverviewFromDoc ¶
func (e ExtractorV6) ExtractAnimatedOverviewFromDoc(doc *goquery.Document) bool
ExtractAnimatedOverviewFromDoc ...
func (ExtractorV6) ExtractAnimatedSlidersFromDoc ¶
func (e ExtractorV6) ExtractAnimatedSlidersFromDoc(doc *goquery.Document) bool
ExtractAnimatedSlidersFromDoc ...
func (ExtractorV6) ExtractAttacks ¶
func (e ExtractorV6) ExtractAttacks(pageHTML []byte) ([]AttackEvent, error)
ExtractAttacks ...
func (ExtractorV6) ExtractAttacksFromDoc ¶
func (e ExtractorV6) ExtractAttacksFromDoc(doc *goquery.Document, clock clockwork.Clock) ([]AttackEvent, error)
ExtractAttacksFromDoc ...
func (ExtractorV6) ExtractAuction ¶
func (e ExtractorV6) ExtractAuction(pageHTML []byte) (Auction, error)
ExtractAuction ...
func (ExtractorV6) ExtractAuctioneerNotificationsFromDoc ¶
func (e ExtractorV6) ExtractAuctioneerNotificationsFromDoc(doc *goquery.Document) bool
ExtractAuctioneerNotificationsFromDoc ...
func (ExtractorV6) ExtractBodyIDFromDoc ¶
func (e ExtractorV6) ExtractBodyIDFromDoc(doc *goquery.Document) string
ExtractBodyIDFromDoc ...
func (ExtractorV6) ExtractBuffActivation ¶
func (e ExtractorV6) ExtractBuffActivation(pageHTML []byte) (string, []Item, error)
ExtractBuffActivation ...
func (ExtractorV6) ExtractCancelBuildingInfos ¶
func (e ExtractorV6) ExtractCancelBuildingInfos(pageHTML []byte) (token string, techID, listID int64, err error)
ExtractCancelBuildingInfos ...
func (ExtractorV6) ExtractCancelResearchInfos ¶
func (e ExtractorV6) ExtractCancelResearchInfos(pageHTML []byte) (token string, techID, listID int64, err error)
ExtractCancelResearchInfos ...
func (ExtractorV6) ExtractCelestial ¶
func (e ExtractorV6) ExtractCelestial(pageHTML []byte, b *OGame, v interface{}) (Celestial, error)
ExtractCelestial ...
func (ExtractorV6) ExtractCelestialByIDFromDoc ¶
func (e ExtractorV6) ExtractCelestialByIDFromDoc(doc *goquery.Document, b *OGame, celestialID CelestialID) (Celestial, error)
ExtractCelestialByIDFromDoc ...
func (ExtractorV6) ExtractCelestialFromDoc ¶
func (e ExtractorV6) ExtractCelestialFromDoc(doc *goquery.Document, b *OGame, v interface{}) (Celestial, error)
ExtractCelestialFromDoc ...
func (ExtractorV6) ExtractCelestials ¶
func (e ExtractorV6) ExtractCelestials(pageHTML []byte, b *OGame) ([]Celestial, error)
ExtractCelestials ...
func (ExtractorV6) ExtractCelestialsFromDoc ¶
ExtractCelestialsFromDoc ...
func (ExtractorV6) ExtractCharacterClass ¶
func (e ExtractorV6) ExtractCharacterClass(pageHTML []byte) (CharacterClass, error)
ExtractCharacterClass ...
func (ExtractorV6) ExtractCharacterClassFromDoc ¶
func (e ExtractorV6) ExtractCharacterClassFromDoc(doc *goquery.Document) (CharacterClass, error)
ExtractCharacterClassFromDoc ...
func (ExtractorV6) ExtractCombatReportMessagesFromDoc ¶
func (e ExtractorV6) ExtractCombatReportMessagesFromDoc(doc *goquery.Document) ([]CombatReportSummary, int64)
ExtractCombatReportMessagesFromDoc ...
func (ExtractorV6) ExtractCombatReportMessagesSummary ¶
func (e ExtractorV6) ExtractCombatReportMessagesSummary(pageHTML []byte) ([]CombatReportSummary, int64)
ExtractCombatReportMessagesSummary ...
func (ExtractorV6) ExtractCommander ¶
func (e ExtractorV6) ExtractCommander(pageHTML []byte) bool
ExtractCommander ...
func (ExtractorV6) ExtractCommanderFromDoc ¶
func (e ExtractorV6) ExtractCommanderFromDoc(doc *goquery.Document) bool
ExtractCommanderFromDoc ...
func (ExtractorV6) ExtractConstructions ¶
func (e ExtractorV6) ExtractConstructions(pageHTML []byte) (buildingID ID, buildingCountdown int64, researchID ID, researchCountdown int64)
ExtractConstructions ...
func (ExtractorV6) ExtractCoord ¶
func (e ExtractorV6) ExtractCoord(v string) (coord Coordinate)
ExtractCoord ...
func (ExtractorV6) ExtractDMCosts ¶
func (e ExtractorV6) ExtractDMCosts(pageHTML []byte) (DMCosts, error)
ExtractDMCosts ...
func (ExtractorV6) ExtractDefense ¶
func (e ExtractorV6) ExtractDefense(pageHTML []byte) (DefensesInfos, error)
ExtractDefense ...
func (ExtractorV6) ExtractDefenseFromDoc ¶
func (e ExtractorV6) ExtractDefenseFromDoc(doc *goquery.Document) (DefensesInfos, error)
ExtractDefenseFromDoc ...
func (ExtractorV6) ExtractDisableChatBarFromDoc ¶
func (e ExtractorV6) ExtractDisableChatBarFromDoc(doc *goquery.Document) bool
ExtractDisableChatBarFromDoc ...
func (ExtractorV6) ExtractDisableOutlawWarningFromDoc ¶
func (e ExtractorV6) ExtractDisableOutlawWarningFromDoc(doc *goquery.Document) bool
ExtractDisableOutlawWarningFromDoc ...
func (ExtractorV6) ExtractEconomyNotificationsFromDoc ¶
func (e ExtractorV6) ExtractEconomyNotificationsFromDoc(doc *goquery.Document) bool
ExtractEconomyNotificationsFromDoc ...
func (ExtractorV6) ExtractEmpire ¶
func (e ExtractorV6) ExtractEmpire(pageHTML []byte, nbr int64) (interface{}, error)
ExtractEmpire ...
func (ExtractorV6) ExtractEngineer ¶
func (e ExtractorV6) ExtractEngineer(pageHTML []byte) bool
ExtractEngineer ...
func (ExtractorV6) ExtractEngineerFromDoc ¶
func (e ExtractorV6) ExtractEngineerFromDoc(doc *goquery.Document) bool
ExtractEngineerFromDoc ...
func (ExtractorV6) ExtractEspionageReport ¶
func (e ExtractorV6) ExtractEspionageReport(pageHTML []byte, location *time.Location) (EspionageReport, error)
ExtractEspionageReport ...
func (ExtractorV6) ExtractEspionageReportFromDoc ¶
func (e ExtractorV6) ExtractEspionageReportFromDoc(doc *goquery.Document, location *time.Location) (EspionageReport, error)
ExtractEspionageReportFromDoc ...
func (ExtractorV6) ExtractEspionageReportMessageIDs ¶
func (e ExtractorV6) ExtractEspionageReportMessageIDs(pageHTML []byte) ([]EspionageReportSummary, int64)
ExtractEspionageReportMessageIDs ...
func (ExtractorV6) ExtractEspionageReportMessageIDsFromDoc ¶
func (e ExtractorV6) ExtractEspionageReportMessageIDsFromDoc(doc *goquery.Document) ([]EspionageReportSummary, int64)
ExtractEspionageReportMessageIDsFromDoc ...
func (ExtractorV6) ExtractEventsShowFromDoc ¶
func (e ExtractorV6) ExtractEventsShowFromDoc(doc *goquery.Document) int64
ExtractEventsShowFromDoc ...
func (ExtractorV6) ExtractFacilities ¶
func (e ExtractorV6) ExtractFacilities(pageHTML []byte) (Facilities, error)
ExtractFacilities ...
func (ExtractorV6) ExtractFacilitiesFromDoc ¶
func (e ExtractorV6) ExtractFacilitiesFromDoc(doc *goquery.Document) (Facilities, error)
ExtractFacilitiesFromDoc ...
func (ExtractorV6) ExtractFederation ¶
func (e ExtractorV6) ExtractFederation(pageHTML []byte) url.Values
ExtractFederation ...
func (ExtractorV6) ExtractFleet1Ships ¶
func (e ExtractorV6) ExtractFleet1Ships(pageHTML []byte) ShipsInfos
ExtractFleet1Ships ...
func (ExtractorV6) ExtractFleet1ShipsFromDoc ¶
func (e ExtractorV6) ExtractFleet1ShipsFromDoc(doc *goquery.Document) (s ShipsInfos)
ExtractFleet1ShipsFromDoc ...
func (ExtractorV6) ExtractFleetDeutSaveFactor ¶
func (e ExtractorV6) ExtractFleetDeutSaveFactor(pageHTML []byte) float64
ExtractFleetDeutSaveFactor extract fleet deut save factor
func (ExtractorV6) ExtractFleets ¶
func (e ExtractorV6) ExtractFleets(pageHTML []byte) (res []Fleet)
ExtractFleets ...
func (ExtractorV6) ExtractFleetsFromDoc ¶
func (e ExtractorV6) ExtractFleetsFromDoc(doc *goquery.Document) (res []Fleet)
ExtractFleetsFromDoc ...
func (ExtractorV6) ExtractFleetsFromEventList ¶
func (e ExtractorV6) ExtractFleetsFromEventList(pageHTML []byte) []Fleet
ExtractFleetsFromEventList ...
func (ExtractorV6) ExtractFleetsFromEventListFromDoc ¶
func (e ExtractorV6) ExtractFleetsFromEventListFromDoc(doc *goquery.Document) []Fleet
ExtractFleetsFromEventListFromDoc ...
func (ExtractorV6) ExtractGalaxyInfos ¶
func (e ExtractorV6) ExtractGalaxyInfos(pageHTML []byte, botPlayerName string, botPlayerID, botPlayerRank int64) (SystemInfos, error)
ExtractGalaxyInfos ...
func (ExtractorV6) ExtractGeologist ¶
func (e ExtractorV6) ExtractGeologist(pageHTML []byte) bool
ExtractGeologist ...
func (ExtractorV6) ExtractGeologistFromDoc ¶
func (e ExtractorV6) ExtractGeologistFromDoc(doc *goquery.Document) bool
ExtractGeologistFromDoc ...
func (ExtractorV6) ExtractHiddenFields ¶
func (e ExtractorV6) ExtractHiddenFields(pageHTML []byte) (fields url.Values)
ExtractHiddenFields utils function to extract hidden input from a page
func (ExtractorV6) ExtractHiddenFieldsFromDoc ¶
func (e ExtractorV6) ExtractHiddenFieldsFromDoc(doc *goquery.Document) url.Values
ExtractHiddenFieldsFromDoc utils function to extract hidden input from a page
func (ExtractorV6) ExtractHighscore ¶
func (e ExtractorV6) ExtractHighscore(pageHTML []byte) (Highscore, error)
ExtractHighscore ...
func (ExtractorV6) ExtractHighscoreFromDoc ¶
func (e ExtractorV6) ExtractHighscoreFromDoc(doc *goquery.Document) (Highscore, error)
ExtractHighscoreFromDoc ...
func (ExtractorV6) ExtractIPM ¶
func (e ExtractorV6) ExtractIPM(pageHTML []byte) (duration, max int64, token string)
ExtractIPM ...
func (ExtractorV6) ExtractIPMFromDoc ¶
func (e ExtractorV6) ExtractIPMFromDoc(doc *goquery.Document) (duration, max int64, token string)
ExtractIPMFromDoc ...
func (ExtractorV6) ExtractIsInVacation ¶
func (e ExtractorV6) ExtractIsInVacation(pageHTML []byte) bool
ExtractIsInVacation ...
func (ExtractorV6) ExtractIsInVacationFromDoc ¶
func (e ExtractorV6) ExtractIsInVacationFromDoc(doc *goquery.Document) bool
ExtractIsInVacationFromDoc ...
func (ExtractorV6) ExtractIsMobile ¶
func (e ExtractorV6) ExtractIsMobile(pageHTML []byte) bool
ExtractIsMobile ...
func (ExtractorV6) ExtractIsMobileFromDoc ¶
func (e ExtractorV6) ExtractIsMobileFromDoc(doc *goquery.Document) bool
ExtractIsMobileFromDoc ...
func (ExtractorV6) ExtractJumpGate ¶
func (e ExtractorV6) ExtractJumpGate(pageHTML []byte) (ShipsInfos, string, []MoonID, int64)
ExtractJumpGate return the available ships to send, form token, possible moon IDs and wait time (if any) given a jump gate popup html.
func (ExtractorV6) ExtractMobileVersionFromDoc ¶
func (e ExtractorV6) ExtractMobileVersionFromDoc(doc *goquery.Document) bool
ExtractMobileVersionFromDoc ...
func (ExtractorV6) ExtractMoon ¶
func (e ExtractorV6) ExtractMoon(pageHTML []byte, b *OGame, v interface{}) (Moon, error)
ExtractMoon ...
func (ExtractorV6) ExtractMoonByCoord ¶
func (e ExtractorV6) ExtractMoonByCoord(pageHTML []byte, b *OGame, coord Coordinate) (Moon, error)
ExtractMoonByCoord ...
func (ExtractorV6) ExtractMoonByCoordFromDoc ¶
func (e ExtractorV6) ExtractMoonByCoordFromDoc(doc *goquery.Document, b *OGame, coord Coordinate) (Moon, error)
ExtractMoonByCoordFromDoc ...
func (ExtractorV6) ExtractMoonByIDFromDoc ¶
func (e ExtractorV6) ExtractMoonByIDFromDoc(doc *goquery.Document, b *OGame, moonID MoonID) (Moon, error)
ExtractMoonByIDFromDoc ...
func (ExtractorV6) ExtractMoonFromDoc ¶
func (e ExtractorV6) ExtractMoonFromDoc(doc *goquery.Document, b *OGame, v interface{}) (Moon, error)
ExtractMoonFromDoc ...
func (ExtractorV6) ExtractMoons ¶
func (e ExtractorV6) ExtractMoons(pageHTML []byte, b *OGame) []Moon
ExtractMoons ...
func (ExtractorV6) ExtractMoonsFromDoc ¶
func (e ExtractorV6) ExtractMoonsFromDoc(doc *goquery.Document, b *OGame) []Moon
ExtractMoonsFromDoc ...
func (ExtractorV6) ExtractMsgResultsPerPageFromDoc ¶
func (e ExtractorV6) ExtractMsgResultsPerPageFromDoc(doc *goquery.Document) int64
ExtractMsgResultsPerPageFromDoc ...
func (ExtractorV6) ExtractNotifAccountFromDoc ¶
func (e ExtractorV6) ExtractNotifAccountFromDoc(doc *goquery.Document) bool
ExtractNotifAccountFromDoc ...
func (ExtractorV6) ExtractNotifAllianceBroadcastsFromDoc ¶
func (e ExtractorV6) ExtractNotifAllianceBroadcastsFromDoc(doc *goquery.Document) bool
ExtractNotifAllianceBroadcastsFromDoc ...
func (ExtractorV6) ExtractNotifAllianceMessagesFromDoc ¶
func (e ExtractorV6) ExtractNotifAllianceMessagesFromDoc(doc *goquery.Document) bool
ExtractNotifAllianceMessagesFromDoc ...
func (ExtractorV6) ExtractNotifAuctionsFromDoc ¶
func (e ExtractorV6) ExtractNotifAuctionsFromDoc(doc *goquery.Document) bool
ExtractNotifAuctionsFromDoc ...
func (ExtractorV6) ExtractNotifBuildListFromDoc ¶
func (e ExtractorV6) ExtractNotifBuildListFromDoc(doc *goquery.Document) bool
ExtractNotifBuildListFromDoc ...
func (ExtractorV6) ExtractNotifForeignEspionageFromDoc ¶
func (e ExtractorV6) ExtractNotifForeignEspionageFromDoc(doc *goquery.Document) bool
ExtractNotifForeignEspionageFromDoc ...
func (ExtractorV6) ExtractNotifFriendlyFleetActivitiesFromDoc ¶
func (e ExtractorV6) ExtractNotifFriendlyFleetActivitiesFromDoc(doc *goquery.Document) bool
ExtractNotifFriendlyFleetActivitiesFromDoc ...
func (ExtractorV6) ExtractNotifHostileFleetActivitiesFromDoc ¶
func (e ExtractorV6) ExtractNotifHostileFleetActivitiesFromDoc(doc *goquery.Document) bool
ExtractNotifHostileFleetActivitiesFromDoc ...
func (ExtractorV6) ExtractOGameSession ¶
func (e ExtractorV6) ExtractOGameSession(pageHTML []byte) string
ExtractOGameSession ...
func (ExtractorV6) ExtractOGameSessionFromDoc ¶
func (e ExtractorV6) ExtractOGameSessionFromDoc(doc *goquery.Document) string
ExtractOGameSessionFromDoc ...
func (ExtractorV6) ExtractOGameTimestampFromBytes ¶
func (e ExtractorV6) ExtractOGameTimestampFromBytes(pageHTML []byte) int64
ExtractOGameTimestampFromBytes extracts ogame timestamp from an html page
func (ExtractorV6) ExtractOfferOfTheDay ¶
func (e ExtractorV6) ExtractOfferOfTheDay(pageHTML []byte) (int64, string, PlanetResources, Multiplier, error)
ExtractOfferOfTheDay ...
func (ExtractorV6) ExtractOfferOfTheDayFromDoc ¶
func (e ExtractorV6) ExtractOfferOfTheDayFromDoc(doc *goquery.Document) (price int64, importToken string, planetResources PlanetResources, multiplier Multiplier, err error)
ExtractOfferOfTheDayFromDoc ...
func (ExtractorV6) ExtractOgameTimestamp ¶
func (e ExtractorV6) ExtractOgameTimestamp(pageHTML []byte) int64
ExtractOgameTimestamp ...
func (ExtractorV6) ExtractOgameTimestampFromDoc ¶
func (e ExtractorV6) ExtractOgameTimestampFromDoc(doc *goquery.Document) int64
ExtractOgameTimestampFromDoc ...
func (ExtractorV6) ExtractOverviewProduction ¶
func (e ExtractorV6) ExtractOverviewProduction(pageHTML []byte) ([]Quantifiable, int64, error)
ExtractOverviewProduction extracts ships/defenses (partial) production from the overview page
func (ExtractorV6) ExtractOverviewProductionFromDoc ¶
func (e ExtractorV6) ExtractOverviewProductionFromDoc(doc *goquery.Document) ([]Quantifiable, error)
ExtractOverviewProductionFromDoc extracts ships/defenses (partial) production from the overview page
func (ExtractorV6) ExtractOverviewShipSumCountdownFromBytes ¶
func (e ExtractorV6) ExtractOverviewShipSumCountdownFromBytes(pageHTML []byte) int64
ExtractOverviewShipSumCountdownFromBytes ...
func (ExtractorV6) ExtractPhalanx ¶
func (e ExtractorV6) ExtractPhalanx(pageHTML []byte) ([]Fleet, error)
ExtractPhalanx ...
func (ExtractorV6) ExtractPlanet ¶
func (e ExtractorV6) ExtractPlanet(pageHTML []byte, v interface{}, b *OGame) (Planet, error)
ExtractPlanet ...
func (ExtractorV6) ExtractPlanetByCoord ¶
func (e ExtractorV6) ExtractPlanetByCoord(pageHTML []byte, b *OGame, coord Coordinate) (Planet, error)
ExtractPlanetByCoord ...
func (ExtractorV6) ExtractPlanetByCoordFromDoc ¶
func (e ExtractorV6) ExtractPlanetByCoordFromDoc(doc *goquery.Document, b *OGame, coord Coordinate) (Planet, error)
ExtractPlanetByCoordFromDoc ...
func (ExtractorV6) ExtractPlanetByIDFromDoc ¶
func (e ExtractorV6) ExtractPlanetByIDFromDoc(doc *goquery.Document, b *OGame, planetID PlanetID) (Planet, error)
ExtractPlanetByIDFromDoc ...
func (ExtractorV6) ExtractPlanetCoordinate ¶
func (e ExtractorV6) ExtractPlanetCoordinate(pageHTML []byte) (Coordinate, error)
ExtractPlanetCoordinate extracts planet coordinate from html page
func (ExtractorV6) ExtractPlanetFromDoc ¶
func (e ExtractorV6) ExtractPlanetFromDoc(doc *goquery.Document, v interface{}, b *OGame) (Planet, error)
ExtractPlanetFromDoc ...
func (ExtractorV6) ExtractPlanetID ¶
func (e ExtractorV6) ExtractPlanetID(pageHTML []byte) (CelestialID, error)
ExtractPlanetID extracts planet id from html page
func (ExtractorV6) ExtractPlanetType ¶
func (e ExtractorV6) ExtractPlanetType(pageHTML []byte) (CelestialType, error)
ExtractPlanetType extracts planet type from html page
func (ExtractorV6) ExtractPlanets ¶
func (e ExtractorV6) ExtractPlanets(pageHTML []byte, b *OGame) []Planet
ExtractPlanets ...
func (ExtractorV6) ExtractPlanetsFromDoc ¶
func (e ExtractorV6) ExtractPlanetsFromDoc(doc *goquery.Document, b *OGame) []Planet
ExtractPlanetsFromDoc ...
func (ExtractorV6) ExtractPopopsCombatreportFromDoc ¶
func (e ExtractorV6) ExtractPopopsCombatreportFromDoc(doc *goquery.Document) bool
ExtractPopopsCombatreportFromDoc ...
func (ExtractorV6) ExtractPopupsNoticesFromDoc ¶
func (e ExtractorV6) ExtractPopupsNoticesFromDoc(doc *goquery.Document) bool
ExtractPopupsNoticesFromDoc ...
func (ExtractorV6) ExtractPreferences ¶
func (e ExtractorV6) ExtractPreferences(pageHTML []byte) Preferences
ExtractPreferences ...
func (ExtractorV6) ExtractPreferencesFromDoc ¶
func (e ExtractorV6) ExtractPreferencesFromDoc(doc *goquery.Document) Preferences
ExtractPreferencesFromDoc ...
func (ExtractorV6) ExtractPreferencesShowActivityMinutes ¶
func (e ExtractorV6) ExtractPreferencesShowActivityMinutes(pageHTML []byte) bool
ExtractPreferencesShowActivityMinutes ...
func (ExtractorV6) ExtractPreserveSystemOnPlanetChangeFromDoc ¶
func (e ExtractorV6) ExtractPreserveSystemOnPlanetChangeFromDoc(doc *goquery.Document) bool
ExtractPreserveSystemOnPlanetChangeFromDoc ...
func (ExtractorV6) ExtractProduction ¶
func (e ExtractorV6) ExtractProduction(pageHTML []byte) ([]Quantifiable, int64, error)
ExtractProduction extracts ships/defenses production from the shipyard page
func (ExtractorV6) ExtractProductionFromDoc ¶
func (e ExtractorV6) ExtractProductionFromDoc(doc *goquery.Document) ([]Quantifiable, error)
ExtractProductionFromDoc extracts ships/defenses production from the shipyard page
func (ExtractorV6) ExtractResearch ¶
func (e ExtractorV6) ExtractResearch(pageHTML []byte) Researches
ExtractResearch ...
func (ExtractorV6) ExtractResearchFromDoc ¶
func (e ExtractorV6) ExtractResearchFromDoc(doc *goquery.Document) Researches
ExtractResearchFromDoc ...
func (ExtractorV6) ExtractResourceSettings ¶
func (e ExtractorV6) ExtractResourceSettings(pageHTML []byte) (ResourceSettings, error)
ExtractResourceSettings ...
func (ExtractorV6) ExtractResourceSettingsFromDoc ¶
func (e ExtractorV6) ExtractResourceSettingsFromDoc(doc *goquery.Document) (ResourceSettings, error)
ExtractResourceSettingsFromDoc ...
func (ExtractorV6) ExtractResources ¶
func (e ExtractorV6) ExtractResources(pageHTML []byte) Resources
ExtractResources ...
func (ExtractorV6) ExtractResourcesBuildings ¶
func (e ExtractorV6) ExtractResourcesBuildings(pageHTML []byte) (ResourcesBuildings, error)
ExtractResourcesBuildings ...
func (ExtractorV6) ExtractResourcesBuildingsFromDoc ¶
func (e ExtractorV6) ExtractResourcesBuildingsFromDoc(doc *goquery.Document) (ResourcesBuildings, error)
ExtractResourcesBuildingsFromDoc ...
func (ExtractorV6) ExtractResourcesDetails ¶
func (e ExtractorV6) ExtractResourcesDetails(pageHTML []byte) (out ResourcesDetails, err error)
ExtractResourcesDetails ...
func (ExtractorV6) ExtractResourcesDetailsFromFullPage ¶
func (e ExtractorV6) ExtractResourcesDetailsFromFullPage(pageHTML []byte) ResourcesDetails
ExtractResourcesDetailsFromFullPage ...
func (ExtractorV6) ExtractResourcesDetailsFromFullPageFromDoc ¶
func (e ExtractorV6) ExtractResourcesDetailsFromFullPageFromDoc(doc *goquery.Document) ResourcesDetails
ExtractResourcesDetailsFromFullPageFromDoc ...
func (ExtractorV6) ExtractResourcesFromDoc ¶
func (e ExtractorV6) ExtractResourcesFromDoc(doc *goquery.Document) Resources
ExtractResourcesFromDoc ...
func (ExtractorV6) ExtractResourcesProductions ¶
func (e ExtractorV6) ExtractResourcesProductions(pageHTML []byte) (Resources, error)
ExtractResourcesProductions ...
func (ExtractorV6) ExtractResourcesProductionsFromDoc ¶
func (e ExtractorV6) ExtractResourcesProductionsFromDoc(doc *goquery.Document) (Resources, error)
ExtractResourcesProductionsFromDoc ...
func (ExtractorV6) ExtractServerTime ¶
func (e ExtractorV6) ExtractServerTime(pageHTML []byte) (time.Time, error)
ExtractServerTime ...
func (ExtractorV6) ExtractServerTimeFromDoc ¶
ExtractServerTimeFromDoc ...
func (ExtractorV6) ExtractShips ¶
func (e ExtractorV6) ExtractShips(pageHTML []byte) (ShipsInfos, error)
ExtractShips ...
func (ExtractorV6) ExtractShipsFromDoc ¶
func (e ExtractorV6) ExtractShipsFromDoc(doc *goquery.Document) (ShipsInfos, error)
ExtractShipsFromDoc ...
func (ExtractorV6) ExtractShowActivityMinutesFromDoc ¶
func (e ExtractorV6) ExtractShowActivityMinutesFromDoc(doc *goquery.Document) bool
ExtractShowActivityMinutesFromDoc ...
func (ExtractorV6) ExtractShowDetailOverlayFromDoc ¶
func (e ExtractorV6) ExtractShowDetailOverlayFromDoc(doc *goquery.Document) bool
ExtractShowDetailOverlayFromDoc ...
func (ExtractorV6) ExtractShowOldDropDownsFromDoc ¶
func (e ExtractorV6) ExtractShowOldDropDownsFromDoc(doc *goquery.Document) bool
ExtractShowOldDropDownsFromDoc ...
func (ExtractorV6) ExtractSlots ¶
func (e ExtractorV6) ExtractSlots(pageHTML []byte) Slots
ExtractSlots ...
func (ExtractorV6) ExtractSlotsFromDoc ¶
func (e ExtractorV6) ExtractSlotsFromDoc(doc *goquery.Document) Slots
ExtractSlotsFromDoc extract fleet slots from page "fleet1" page "movement" redirect to "fleet1" when there is no fleet
func (ExtractorV6) ExtractSortOrderFromDoc ¶
func (e ExtractorV6) ExtractSortOrderFromDoc(doc *goquery.Document) int64
ExtractSortOrderFromDoc ...
func (ExtractorV6) ExtractSortSettingFromDoc ¶
func (e ExtractorV6) ExtractSortSettingFromDoc(doc *goquery.Document) int64
ExtractSortSettingFromDoc ...
func (ExtractorV6) ExtractSpioAnz ¶
func (e ExtractorV6) ExtractSpioAnz(pageHTML []byte) int64
ExtractSpioAnz ...
func (ExtractorV6) ExtractSpioAnzFromDoc ¶
func (e ExtractorV6) ExtractSpioAnzFromDoc(doc *goquery.Document) int64
ExtractSpioAnzFromDoc ...
func (ExtractorV6) ExtractSpioReportPicturesFromDoc ¶
func (e ExtractorV6) ExtractSpioReportPicturesFromDoc(doc *goquery.Document) bool
ExtractSpioReportPicturesFromDoc ...
func (ExtractorV6) ExtractTechnocrat ¶
func (e ExtractorV6) ExtractTechnocrat(pageHTML []byte) bool
ExtractTechnocrat ...
func (ExtractorV6) ExtractTechnocratFromDoc ¶
func (e ExtractorV6) ExtractTechnocratFromDoc(doc *goquery.Document) bool
ExtractTechnocratFromDoc ...
func (ExtractorV6) ExtractUserInfos ¶
func (e ExtractorV6) ExtractUserInfos(pageHTML []byte, lang string) (UserInfos, error)
ExtractUserInfos ...
type ExtractorV7 ¶
type ExtractorV7 struct {
ExtractorV6
}
ExtractorV7 ...
func (ExtractorV7) ExtractCancelBuildingInfos ¶
func (e ExtractorV7) ExtractCancelBuildingInfos(pageHTML []byte) (token string, techID, listID int64, err error)
ExtractCancelBuildingInfos ...
func (ExtractorV7) ExtractCancelResearchInfos ¶
func (e ExtractorV7) ExtractCancelResearchInfos(pageHTML []byte) (token string, techID, listID int64, err error)
ExtractCancelResearchInfos ...
func (ExtractorV7) ExtractCharacterClass ¶
func (e ExtractorV7) ExtractCharacterClass(pageHTML []byte) (CharacterClass, error)
ExtractCharacterClass ...
func (ExtractorV7) ExtractCharacterClassFromDoc ¶
func (e ExtractorV7) ExtractCharacterClassFromDoc(doc *goquery.Document) (CharacterClass, error)
ExtractCharacterClassFromDoc ...
func (ExtractorV7) ExtractCombatReportMessagesFromDoc ¶
func (e ExtractorV7) ExtractCombatReportMessagesFromDoc(doc *goquery.Document) ([]CombatReportSummary, int64)
ExtractCombatReportMessagesFromDoc ...
func (ExtractorV7) ExtractCombatReportMessagesSummary ¶
func (e ExtractorV7) ExtractCombatReportMessagesSummary(pageHTML []byte) ([]CombatReportSummary, int64)
ExtractCombatReportMessagesSummary ...
func (ExtractorV7) ExtractConstructions ¶
func (e ExtractorV7) ExtractConstructions(pageHTML []byte) (buildingID ID, buildingCountdown int64, researchID ID, researchCountdown int64)
ExtractConstructions ...
func (ExtractorV7) ExtractDefense ¶
func (e ExtractorV7) ExtractDefense(pageHTML []byte) (DefensesInfos, error)
ExtractDefense ...
func (ExtractorV7) ExtractDefenseFromDoc ¶
func (e ExtractorV7) ExtractDefenseFromDoc(doc *goquery.Document) (DefensesInfos, error)
ExtractDefenseFromDoc ...
func (ExtractorV7) ExtractEspionageReport ¶
func (e ExtractorV7) ExtractEspionageReport(pageHTML []byte, location *time.Location) (EspionageReport, error)
ExtractEspionageReport ...
func (ExtractorV7) ExtractEspionageReportFromDoc ¶
func (e ExtractorV7) ExtractEspionageReportFromDoc(doc *goquery.Document, location *time.Location) (EspionageReport, error)
ExtractEspionageReportFromDoc ...
func (ExtractorV7) ExtractFacilities ¶
func (e ExtractorV7) ExtractFacilities(pageHTML []byte) (Facilities, error)
ExtractFacilities ...
func (ExtractorV7) ExtractFacilitiesFromDoc ¶
func (e ExtractorV7) ExtractFacilitiesFromDoc(doc *goquery.Document) (Facilities, error)
ExtractFacilitiesFromDoc ...
func (ExtractorV7) ExtractFleet1Ships ¶
func (e ExtractorV7) ExtractFleet1Ships(pageHTML []byte) ShipsInfos
ExtractFleet1Ships ...
func (ExtractorV7) ExtractFleet1ShipsFromDoc ¶
func (e ExtractorV7) ExtractFleet1ShipsFromDoc(doc *goquery.Document) (s ShipsInfos)
ExtractFleet1ShipsFromDoc ...
func (ExtractorV7) ExtractIPM ¶
func (e ExtractorV7) ExtractIPM(pageHTML []byte) (duration, max int64, token string)
ExtractIPM ...
func (ExtractorV7) ExtractIPMFromDoc ¶
func (e ExtractorV7) ExtractIPMFromDoc(doc *goquery.Document) (duration, max int64, token string)
ExtractIPMFromDoc ...
func (ExtractorV7) ExtractOverviewProduction ¶
func (e ExtractorV7) ExtractOverviewProduction(pageHTML []byte) ([]Quantifiable, int64, error)
ExtractOverviewProduction extracts ships/defenses (partial) production from the overview page
func (ExtractorV7) ExtractOverviewProductionFromDoc ¶
func (e ExtractorV7) ExtractOverviewProductionFromDoc(doc *goquery.Document) ([]Quantifiable, error)
ExtractOverviewProductionFromDoc extracts ships/defenses (partial) production from the overview page
func (ExtractorV7) ExtractOverviewShipSumCountdownFromBytes ¶
func (e ExtractorV7) ExtractOverviewShipSumCountdownFromBytes(pageHTML []byte) int64
ExtractOverviewShipSumCountdownFromBytes ...
func (ExtractorV7) ExtractResearch ¶
func (e ExtractorV7) ExtractResearch(pageHTML []byte) Researches
ExtractResearch ...
func (ExtractorV7) ExtractResearchFromDoc ¶
func (e ExtractorV7) ExtractResearchFromDoc(doc *goquery.Document) Researches
ExtractResearchFromDoc ...
func (ExtractorV7) ExtractResourceSettings ¶
func (e ExtractorV7) ExtractResourceSettings(pageHTML []byte) (ResourceSettings, error)
ExtractResourceSettings ...
func (ExtractorV7) ExtractResourceSettingsFromDoc ¶
func (e ExtractorV7) ExtractResourceSettingsFromDoc(doc *goquery.Document) (ResourceSettings, error)
ExtractResourceSettingsFromDoc ...
func (ExtractorV7) ExtractResourcesBuildings ¶
func (e ExtractorV7) ExtractResourcesBuildings(pageHTML []byte) (ResourcesBuildings, error)
ExtractResourcesBuildings ...
func (ExtractorV7) ExtractResourcesBuildingsFromDoc ¶
func (e ExtractorV7) ExtractResourcesBuildingsFromDoc(doc *goquery.Document) (ResourcesBuildings, error)
ExtractResourcesBuildingsFromDoc ...
func (ExtractorV7) ExtractResourcesDetails ¶
func (e ExtractorV7) ExtractResourcesDetails(pageHTML []byte) (out ResourcesDetails, err error)
ExtractResourcesDetails ...
func (ExtractorV7) ExtractShips ¶
func (e ExtractorV7) ExtractShips(pageHTML []byte) (ShipsInfos, error)
ExtractShips ...
func (ExtractorV7) ExtractShipsFromDoc ¶
func (e ExtractorV7) ExtractShipsFromDoc(doc *goquery.Document) (ShipsInfos, error)
ExtractShipsFromDoc ...
type ExtractorV71 ¶
type ExtractorV71 struct {
ExtractorV7
}
ExtractorV71 ...
func (ExtractorV71) ExtractAllResources ¶
func (e ExtractorV71) ExtractAllResources(pageHTML []byte) (map[CelestialID]Resources, error)
ExtractAllResources ...
func (ExtractorV71) ExtractAttacks ¶
func (e ExtractorV71) ExtractAttacks(pageHTML []byte) ([]AttackEvent, error)
ExtractAttacks ...
func (ExtractorV71) ExtractAttacksFromDoc ¶
func (e ExtractorV71) ExtractAttacksFromDoc(doc *goquery.Document, clock clockwork.Clock) ([]AttackEvent, error)
ExtractAttacksFromDoc ...
func (ExtractorV71) ExtractBuffActivation ¶
func (e ExtractorV71) ExtractBuffActivation(pageHTML []byte) (string, []Item, error)
ExtractBuffActivation ...
func (ExtractorV71) ExtractBuffActivationFromDoc ¶
ExtractBuffActivationFromDoc ...
func (ExtractorV71) ExtractDMCosts ¶
func (e ExtractorV71) ExtractDMCosts(pageHTML []byte) (DMCosts, error)
ExtractDMCosts ...
func (ExtractorV71) ExtractDMCostsFromDoc ¶
func (e ExtractorV71) ExtractDMCostsFromDoc(doc *goquery.Document) (DMCosts, error)
ExtractDMCostsFromDoc ...
func (ExtractorV71) ExtractEspionageReport ¶
func (e ExtractorV71) ExtractEspionageReport(pageHTML []byte, location *time.Location) (EspionageReport, error)
ExtractEspionageReport ...
func (ExtractorV71) ExtractEspionageReportFromDoc ¶
func (e ExtractorV71) ExtractEspionageReportFromDoc(doc *goquery.Document, location *time.Location) (EspionageReport, error)
ExtractEspionageReportFromDoc ...
func (ExtractorV71) ExtractFacilities ¶
func (e ExtractorV71) ExtractFacilities(pageHTML []byte) (Facilities, error)
ExtractFacilities ...
func (ExtractorV71) ExtractFacilitiesFromDoc ¶
func (e ExtractorV71) ExtractFacilitiesFromDoc(doc *goquery.Document) (Facilities, error)
ExtractFacilitiesFromDoc ...
func (ExtractorV71) ExtractHighscore ¶
func (e ExtractorV71) ExtractHighscore(pageHTML []byte) (Highscore, error)
ExtractHighscore ...
func (ExtractorV71) ExtractHighscoreFromDoc ¶
func (e ExtractorV71) ExtractHighscoreFromDoc(doc *goquery.Document) (Highscore, error)
ExtractHighscoreFromDoc ...
func (ExtractorV71) ExtractIPM ¶
func (e ExtractorV71) ExtractIPM(pageHTML []byte) (duration int64, max int64, token string)
ExtractIPM ...
func (ExtractorV71) ExtractIPMFromDoc ¶
func (e ExtractorV71) ExtractIPMFromDoc(doc *goquery.Document) (duration int64, max int64, token string)
ExtractIPMFromDoc ...
func (ExtractorV71) ExtractIsMobile ¶
func (e ExtractorV71) ExtractIsMobile(pageHTML []byte) bool
ExtractIsMobile ...
func (ExtractorV71) ExtractIsMobileFromDoc ¶
func (e ExtractorV71) ExtractIsMobileFromDoc(doc *goquery.Document) bool
ExtractIsMobileFromDoc ...
func (ExtractorV71) ExtractProduction ¶
func (e ExtractorV71) ExtractProduction(pageHTML []byte) ([]Quantifiable, int64, error)
ExtractProduction extracts ships/defenses production from the shipyard page
func (ExtractorV71) ExtractProductionFromDoc ¶
func (e ExtractorV71) ExtractProductionFromDoc(doc *goquery.Document) ([]Quantifiable, error)
ExtractProductionFromDoc extracts ships/defenses production from the shipyard page
func (ExtractorV71) ExtractResourcesDetails ¶
func (e ExtractorV71) ExtractResourcesDetails(pageHTML []byte) (out ResourcesDetails, err error)
ExtractResourcesDetails ...
type Facilities ¶
type Facilities struct { RoboticsFactory int64 Shipyard int64 ResearchLab int64 AllianceDepot int64 MissileSilo int64 NaniteFactory int64 Terraformer int64 SpaceDock int64 LunarBase int64 SensorPhalanx int64 JumpGate int64 }
Facilities represent a planet facilities information
func (Facilities) ByID ¶
func (f Facilities) ByID(id ID) int64
ByID gets the facility level by facility id
func (Facilities) Lazy ¶
func (f Facilities) Lazy() LazyFacilities
Lazy returns a function that return self
func (Facilities) String ¶
func (f Facilities) String() string
type Fields ¶
Fields planet fields stats
func (Fields) HasFieldAvailable ¶
HasFieldAvailable returns either or not we can still build on this planet
type Fleet ¶
type Fleet struct { Mission MissionID ReturnFlight bool ID FleetID Resources Resources Origin Coordinate Destination Coordinate Ships ShipsInfos StartTime time.Time ArrivalTime time.Time BackTime time.Time ArriveIn int64 BackIn int64 UnionID int64 TargetPlanetID int64 }
Fleet represent a player fleet information
type FleetBuilder ¶
type FleetBuilder struct {
// contains filtered or unexported fields
}
FleetBuilder ...
func (*FleetBuilder) AddShips ¶
func (f *FleetBuilder) AddShips(id ID, nbr int64) *FleetBuilder
AddShips ...
func (*FleetBuilder) FlightTime ¶
func (f *FleetBuilder) FlightTime() (secs, fuel int64)
FlightTime ...
func (*FleetBuilder) OnError ¶
func (f *FleetBuilder) OnError(clb func(error)) *FleetBuilder
OnError register an error callback
func (*FleetBuilder) OnSuccess ¶
func (f *FleetBuilder) OnSuccess(clb func(Fleet)) *FleetBuilder
OnSuccess register a success callback
func (*FleetBuilder) SendNow ¶
func (f *FleetBuilder) SendNow() (Fleet, error)
SendNow send the fleet with defined configurations
func (*FleetBuilder) SetAllCrystal ¶
func (f *FleetBuilder) SetAllCrystal() *FleetBuilder
SetAllCrystal will send all crystal from the origin
func (*FleetBuilder) SetAllDeuterium ¶
func (f *FleetBuilder) SetAllDeuterium() *FleetBuilder
SetAllDeuterium will send all deuterium from the origin
func (*FleetBuilder) SetAllMetal ¶
func (f *FleetBuilder) SetAllMetal() *FleetBuilder
SetAllMetal will send all metal from the origin
func (*FleetBuilder) SetAllResources ¶
func (f *FleetBuilder) SetAllResources() *FleetBuilder
SetAllResources will send all resources from the origin
func (*FleetBuilder) SetAllShips ¶
func (f *FleetBuilder) SetAllShips() *FleetBuilder
SetAllShips ...
func (*FleetBuilder) SetDestination ¶
func (f *FleetBuilder) SetDestination(v interface{}) *FleetBuilder
SetDestination ...
func (*FleetBuilder) SetDuration ¶
func (f *FleetBuilder) SetDuration(expeditiontime int64) *FleetBuilder
SetDuration set expedition duration
func (*FleetBuilder) SetMinimumDeuterium ¶
func (f *FleetBuilder) SetMinimumDeuterium(minimumDeuterium int64) *FleetBuilder
SetMinimumDeuterium set minimum deuterium to keep on celestial
func (*FleetBuilder) SetMission ¶
func (f *FleetBuilder) SetMission(mission MissionID) *FleetBuilder
SetMission ...
func (*FleetBuilder) SetOrigin ¶
func (f *FleetBuilder) SetOrigin(v interface{}) *FleetBuilder
SetOrigin ...
func (*FleetBuilder) SetRecallIn ¶
func (f *FleetBuilder) SetRecallIn(secs int64) *FleetBuilder
SetRecallIn ...
func (*FleetBuilder) SetResources ¶
func (f *FleetBuilder) SetResources(resources Resources) *FleetBuilder
SetResources ...
func (*FleetBuilder) SetShips ¶
func (f *FleetBuilder) SetShips(ships ShipsInfos) *FleetBuilder
SetShips ...
func (*FleetBuilder) SetSpeed ¶
func (f *FleetBuilder) SetSpeed(speed Speed) *FleetBuilder
SetSpeed ...
func (*FleetBuilder) SetUnionID ¶
func (f *FleetBuilder) SetUnionID(unionID int64) *FleetBuilder
SetUnionID set union id to join
type FleetBuilderFactory ¶
type FleetBuilderFactory struct {
// contains filtered or unexported fields
}
FleetBuilderFactory ...
func NewFleetBuilderFactory ¶
func NewFleetBuilderFactory(b Wrapper) *FleetBuilderFactory
NewFleetBuilderFactory ...
func (FleetBuilderFactory) NewFleet ¶
func (f FleetBuilderFactory) NewFleet() *FleetBuilder
NewFleet ...
type Highscore ¶
type Highscore struct { NbPage int64 CurrPage int64 Category int64 // 1:Player, 2:Alliance Type int64 // 0:Total, 1:Economy, 2:Research, 3:Military, 4:Military Built, 5:Military Destroyed, 6:Military Lost, 7:Honor Players []HighscorePlayer }
Highscore ...
type HighscorePlayer ¶
type HighscorePlayer struct { Position int64 ID int64 Name string Score int64 AllianceID int64 HonourPoints int64 Homeworld Coordinate }
HighscorePlayer ...
type ID ¶
type ID int64
ID represent an ogame id
func (ID) IsBuilding ¶
IsBuilding returns either or not the id is a building (facility, resource building)
func (ID) IsFacility ¶
IsFacility returns either or not the id is a facility
func (ID) IsResourceBuilding ¶
IsResourceBuilding returns either or not the id is a resource building
type Item ¶
type Item struct { Ref string Name string Image string ImageLarge string Title string Rarity string // common Amount int64 AmountFree int64 AmountBought int64 // contains filtered or unexported fields }
Item Is an ogame item that can be activated
type LazyResourcesBuildings ¶
type LazyResourcesBuildings func() ResourcesBuildings
LazyResourcesBuildings ...
type Levelable ¶
type Levelable interface { BaseOgameObj GetLevel(LazyResourcesBuildings, LazyFacilities, LazyResearches) int64 }
Levelable base interface for all levelable ogame objects (buildings, technologies)
type Moon ¶
type Moon struct { ID MoonID Img string Name string Diameter int64 Coordinate Coordinate Fields Fields // contains filtered or unexported fields }
Moon ogame moon object
func (Moon) ActivateItem ¶
ActivateItem activate an item
func (Moon) BuildBuilding ¶
BuildBuilding ensure what is being built is a building
func (Moon) BuildDefense ¶
BuildDefense builds a defense unit
func (Moon) BuildTechnology ¶
BuildTechnology ensure that we're trying to build a technology
func (Moon) CancelBuilding ¶
CancelBuilding cancel the construction of a building
func (Moon) CancelResearch ¶
CancelResearch cancel the research
func (Moon) ConstructionsBeingBuilt ¶
ConstructionsBeingBuilt returns the building & research being built, and the time remaining (secs)
func (Moon) EnsureFleet ¶
func (m Moon) EnsureFleet(ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, resources Resources, expeditiontime, unionID int64) (Fleet, error)
EnsureFleet either sends all the requested ships or fail
func (Moon) GetDefense ¶
func (m Moon) GetDefense() (DefensesInfos, error)
GetDefense gets all the defenses units information
func (Moon) GetFacilities ¶
func (m Moon) GetFacilities() (Facilities, error)
GetFacilities gets the moon facilities
func (Moon) GetProduction ¶
func (m Moon) GetProduction() ([]Quantifiable, int64, error)
GetProduction get what is in the production queue. (ships & defense being built)
func (Moon) GetResources ¶
GetResources gets moon resources
func (Moon) GetResourcesBuildings ¶
func (m Moon) GetResourcesBuildings() (ResourcesBuildings, error)
GetResourcesBuildings gets the resources buildings levels
func (Moon) GetResourcesDetails ¶
func (m Moon) GetResourcesDetails() (ResourcesDetails, error)
GetResourcesDetails gets resources details
func (Moon) GetShips ¶
func (m Moon) GetShips() (ShipsInfos, error)
GetShips gets all ships units information
func (*Moon) Phalanx ¶
func (m *Moon) Phalanx(coord Coordinate) ([]Fleet, error)
Phalanx uses 5000 deuterium to scan a coordinate
type MoonID ¶
type MoonID CelestialID
MoonID represent a moon id
func (MoonID) Celestial ¶
func (m MoonID) Celestial() CelestialID
Celestial convert a MoonID to a CelestialID
type Multiplier ¶
Multiplier ...
type NewAccount ¶
NewAccount response from creating a new account
type OGame ¶
type OGame struct { sync.Mutex Player UserInfos CachedPreferences Preferences Universe string Username string Client *OGameClient HasCommander bool HasAdmiral bool HasEngineer bool HasGeologist bool HasTechnocrat bool // contains filtered or unexported fields }
OGame is a client for ogame.org. It is safe for concurrent use by multiple goroutines (thread-safe)
func NewNoLogin ¶
NewNoLogin does not auto login.
func NewWithParams ¶
NewWithParams create a new OGame instance with full control over the possible parameters
func (*OGame) ActivateItem ¶
func (b *OGame) ActivateItem(ref string, celestialID CelestialID) error
ActivateItem activate an item
func (*OGame) AddAccount ¶
func (b *OGame) AddAccount(number int, lang string) (NewAccount, error)
AddAccount add a new account (server) to your list of accounts
func (*OGame) Begin ¶
func (b *OGame) Begin() *Prioritize
Begin start a transaction. Once this function is called, "Done" must be called to release the lock.
func (*OGame) BeginNamed ¶
func (b *OGame) BeginNamed(name string) *Prioritize
BeginNamed begins a new transaction with a name. "Done" must be called to release the lock.
func (*OGame) Build ¶
func (b *OGame) Build(celestialID CelestialID, id ID, nbr int64) error
Build builds any ogame objects (building, technology, ship, defence)
func (*OGame) BuildBuilding ¶
func (b *OGame) BuildBuilding(celestialID CelestialID, buildingID ID) error
BuildBuilding ensure what is being built is a building
func (*OGame) BuildCancelable ¶
func (b *OGame) BuildCancelable(celestialID CelestialID, id ID) error
BuildCancelable builds any cancelable ogame objects (building, technology)
func (*OGame) BuildDefense ¶
func (b *OGame) BuildDefense(celestialID CelestialID, defenseID ID, nbr int64) error
BuildDefense builds a defense unit
func (*OGame) BuildProduction ¶
func (b *OGame) BuildProduction(celestialID CelestialID, id ID, nbr int64) error
BuildProduction builds any line production ogame objects (ship, defence)
func (*OGame) BuildShips ¶
func (b *OGame) BuildShips(celestialID CelestialID, shipID ID, nbr int64) error
BuildShips builds a ship unit
func (*OGame) BuildTechnology ¶
func (b *OGame) BuildTechnology(celestialID CelestialID, technologyID ID) error
BuildTechnology ensure that we're trying to build a technology
func (*OGame) BuyAdmiral ¶
BuyAdmiral will buy the Admiral for 7 or 90 days
func (*OGame) BuyOfferOfTheDay ¶
BuyOfferOfTheDay buys the offer of the day.
func (*OGame) BuyShipsAtMarketplace ¶
BuyShipsAtMarketplace will sell the ship for deuterium
func (*OGame) BytesDownloaded ¶
BytesDownloaded returns the amount of bytes downloaded
func (*OGame) BytesUploaded ¶
BytesUploaded returns the amount of bytes uploaded
func (*OGame) CancelBuilding ¶
func (b *OGame) CancelBuilding(celestialID CelestialID) error
CancelBuilding cancel the construction of a building on a specified planet
func (*OGame) CancelFleet ¶
CancelFleet cancel a fleet
func (*OGame) CancelResearch ¶
func (b *OGame) CancelResearch(celestialID CelestialID) error
CancelResearch cancel the research
func (*OGame) CharacterClass ¶
func (b *OGame) CharacterClass() CharacterClass
CharacterClass returns the bot character class
func (*OGame) CollectStuffFromMarketplace ¶
CollectStuffFromMarketplace will collect stuff from the Marketplace
func (*OGame) ConstructionsBeingBuilt ¶
ConstructionsBeingBuilt returns the building & research being built, and the time remaining (secs)
func (*OGame) CreateUnion ¶
CreateUnion creates a union
func (*OGame) DeleteAllMessagesFromTab ¶
DeleteAllMessagesFromTab deletes all messages from a tab in the mail box
func (*OGame) DeleteMessage ¶
DeleteMessage deletes a message from the mail box
func (*OGame) Disable ¶
func (b *OGame) Disable()
Disable disables communications with OGame Server
func (*OGame) Distance ¶
func (b *OGame) Distance(origin, destination Coordinate) int64
Distance return distance between two coordinates
func (*OGame) DoAllianceApplication ¶
DoAllianceApplication will do this
func (*OGame) DoAuction ¶
func (b *OGame) DoAuction(bid map[CelestialID]Resources) error
DoAuction ...
func (*OGame) EnsureFleet ¶
func (b *OGame) EnsureFleet(celestialID CelestialID, ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, resources Resources, expeditiontime, unionID int64) (Fleet, error)
EnsureFleet either sends all the requested ships or fail
func (*OGame) FleetDeutSaveFactor ¶
FleetDeutSaveFactor returns the fleet deut save factor
func (*OGame) FlightTime ¶
func (b *OGame) FlightTime(origin, destination Coordinate, speed Speed, ships ShipsInfos) (secs, fuel int64)
FlightTime calculate flight time and fuel needed
func (*OGame) GalaxyInfos ¶
func (b *OGame) GalaxyInfos(galaxy, system int64, options ...Option) (SystemInfos, error)
GalaxyInfos get information of all planets and moons of a solar system
func (*OGame) GetAllResources ¶
func (b *OGame) GetAllResources() (map[CelestialID]Resources, error)
GetAllResources gets the resources of all planets and moons
func (*OGame) GetAlliancePageContent ¶
GetAlliancePageContent gets the html for a specific alliance page
func (*OGame) GetAttacks ¶
func (b *OGame) GetAttacks() ([]AttackEvent, error)
GetAttacks get enemy fleets attacking you
func (*OGame) GetAttacksUsing ¶
func (b *OGame) GetAttacksUsing(celestialID CelestialID) ([]AttackEvent, error)
GetAttacksUsing get enemy fleets attacking you using a specific celestial to make the check
func (*OGame) GetCachedCelestial ¶
GetCachedCelestial return celestial from cached value
func (*OGame) GetCachedCelestialByCoord ¶
func (b *OGame) GetCachedCelestialByCoord(coord Coordinate) Celestial
GetCachedCelestialByCoord return celestial from cached value
func (*OGame) GetCachedCelestialByID ¶
func (b *OGame) GetCachedCelestialByID(celestialID CelestialID) Celestial
GetCachedCelestialByID return celestial from cached value
func (*OGame) GetCachedCelestials ¶
GetCachedCelestials get all cached celestials
func (*OGame) GetCachedMoons ¶
GetCachedMoons return moons from cached value
func (*OGame) GetCachedPlanets ¶
GetCachedPlanets return planets from cached value
func (*OGame) GetCachedPlayer ¶
GetCachedPlayer returns cached player infos
func (*OGame) GetCachedPreferences ¶
func (b *OGame) GetCachedPreferences() Preferences
GetCachedPreferences returns cached preferences
func (*OGame) GetCachedResearch ¶
func (b *OGame) GetCachedResearch() Researches
GetCachedResearch returns cached researches
func (*OGame) GetCelestial ¶
GetCelestial get the player's planet/moon using the coordinate
func (*OGame) GetCelestials ¶
GetCelestials get the player's planets & moons
func (*OGame) GetClient ¶
func (b *OGame) GetClient() *OGameClient
GetClient get the http client used by the bot
func (*OGame) GetCombatReportSummaryFor ¶
func (b *OGame) GetCombatReportSummaryFor(coord Coordinate) (CombatReportSummary, error)
GetCombatReportSummaryFor gets the latest combat report for a given coordinate
func (*OGame) GetDMCosts ¶
func (b *OGame) GetDMCosts(celestialID CelestialID) (DMCosts, error)
GetDMCosts returns fast build with DM information
func (*OGame) GetDefense ¶
func (b *OGame) GetDefense(celestialID CelestialID) (DefensesInfos, error)
GetDefense gets all the defenses units information of a planet Fails if planetID is invalid
func (*OGame) GetEspionageReport ¶
func (b *OGame) GetEspionageReport(msgID int64) (EspionageReport, error)
GetEspionageReport gets a detailed espionage report
func (*OGame) GetEspionageReportFor ¶
func (b *OGame) GetEspionageReportFor(coord Coordinate) (EspionageReport, error)
GetEspionageReportFor gets the latest espionage report for a given coordinate
func (*OGame) GetEspionageReportMessages ¶
func (b *OGame) GetEspionageReportMessages() ([]EspionageReportSummary, error)
GetEspionageReportMessages gets the summary of each espionage reports
func (*OGame) GetExtractor ¶
GetExtractor gets extractor object
func (*OGame) GetFacilities ¶
func (b *OGame) GetFacilities(celestialID CelestialID) (Facilities, error)
GetFacilities gets all facilities information of a planet
func (*OGame) GetFleetsFromEventList ¶
GetFleetsFromEventList get the player's own fleets activities
func (*OGame) GetItems ¶
func (b *OGame) GetItems(celestialID CelestialID) ([]Item, error)
GetItems get all items information
func (*OGame) GetLanguage ¶
GetLanguage get ogame server language
func (*OGame) GetNbSystems ¶
GetNbSystems gets the number of systems
func (*OGame) GetPageContent ¶
GetPageContent gets the html for a specific ogame page
func (*OGame) GetPlanets ¶
GetPlanets returns the user planets
func (*OGame) GetProduction ¶
func (b *OGame) GetProduction(celestialID CelestialID) ([]Quantifiable, int64, error)
GetProduction get what is in the production queue. (ships & defense being built)
func (*OGame) GetPublicIP ¶
GetPublicIP get the public IP used by the bot
func (*OGame) GetResearch ¶
func (b *OGame) GetResearch() Researches
GetResearch gets the player researches information
func (*OGame) GetResearchSpeed ¶
GetResearchSpeed gets the research speed
func (*OGame) GetResourceSettings ¶
func (b *OGame) GetResourceSettings(planetID PlanetID) (ResourceSettings, error)
GetResourceSettings gets the resources settings for specified planetID
func (*OGame) GetResources ¶
func (b *OGame) GetResources(celestialID CelestialID) (Resources, error)
GetResources gets user resources
func (*OGame) GetResourcesBuildings ¶
func (b *OGame) GetResourcesBuildings(celestialID CelestialID) (ResourcesBuildings, error)
GetResourcesBuildings gets the resources buildings levels
func (*OGame) GetResourcesDetails ¶
func (b *OGame) GetResourcesDetails(celestialID CelestialID) (ResourcesDetails, error)
GetResourcesDetails gets user resources
func (*OGame) GetResourcesProductions ¶
GetResourcesProductions gets the planet resources production
func (*OGame) GetResourcesProductionsLight ¶
func (b *OGame) GetResourcesProductionsLight(resBuildings ResourcesBuildings, researches Researches, resSettings ResourceSettings, temp Temperature) Resources
GetResourcesProductionsLight gets the planet resources production
func (*OGame) GetServerData ¶
func (b *OGame) GetServerData() ServerData
GetServerData get ogame server data information that the bot is connected to
func (*OGame) GetShips ¶
func (b *OGame) GetShips(celestialID CelestialID) (ShipsInfos, error)
GetShips gets all ships units information of a planet
func (*OGame) GetTasks ¶
func (b *OGame) GetTasks() TasksOverview
GetTasks return how many tasks are queued in the heap.
func (*OGame) GetUniverseName ¶
GetUniverseName get the name of the universe the bot is playing into
func (*OGame) GetUniverseSpeed ¶
GetUniverseSpeed shortcut to get ogame universe speed
func (*OGame) GetUniverseSpeedFleet ¶
GetUniverseSpeedFleet shortcut to get ogame universe speed fleet
func (*OGame) GetUserInfos ¶
GetUserInfos gets the user information
func (*OGame) GetUsername ¶
GetUsername get the username that was used to login on ogame server
func (*OGame) HeadersForPage ¶
HeadersForPage gets the headers for a specific ogame page
func (*OGame) IsConnected ¶
IsConnected returns true if the bot is currently connected (communication between the bot and OGame is possible), otherwise false
func (*OGame) IsDonutGalaxy ¶
IsDonutGalaxy shortcut to get ogame galaxy donut config
func (*OGame) IsDonutSystem ¶
IsDonutSystem shortcut to get ogame system donut config
func (*OGame) IsLoggedIn ¶
IsLoggedIn returns true if the bot is currently logged-in, otherwise false
func (*OGame) IsUnderAttack ¶
IsUnderAttack returns true if the user is under attack, false otherwise
func (*OGame) IsVacationModeEnabled ¶
IsVacationModeEnabled returns either or not the bot is in vacation mode
func (*OGame) JumpGate ¶
func (b *OGame) JumpGate(origin, dest MoonID, ships ShipsInfos) (success bool, rechargeCountdown int64, err error)
JumpGate sends ships through a jump gate.
func (*OGame) JumpGateDestinations ¶
func (b *OGame) JumpGateDestinations(origin MoonID) (moonIDs []MoonID, rechargeCountdown int64, err error)
JumpGateDestinations returns available destinations for jump gate.
func (*OGame) LoginWithExistingCookies ¶
LoginWithExistingCookies to ogame server reusing existing cookies
func (*OGame) OnStateChange ¶
OnStateChange register a callback that is notified when the bot state changes
func (*OGame) Phalanx ¶
func (b *OGame) Phalanx(moonID MoonID, coord Coordinate) ([]Fleet, error)
Phalanx scan a coordinate from a moon to get fleets information IMPORTANT: My account was instantly banned when I scanned an invalid coordinate. IMPORTANT: This function DOES validate that the coordinate is a valid planet in range of phalanx
and that you have enough deuterium.
func (*OGame) PostPageContent ¶
PostPageContent make a post request to ogame server This is useful when simulating a web browser
func (*OGame) RegisterAuctioneerCallback ¶
RegisterAuctioneerCallback register a callback that is called when auctioneer packets are received
func (*OGame) RegisterChatCallback ¶
RegisterChatCallback register a callback that is called when chat messages are received
func (*OGame) RegisterHTMLInterceptor ¶
func (b *OGame) RegisterHTMLInterceptor(fn func(method, url string, params, payload url.Values, pageHTML []byte))
RegisterHTMLInterceptor ...
func (*OGame) RegisterWSCallback ¶
RegisterWSCallback ...
func (*OGame) SelectCharacterClass ¶
func (b *OGame) SelectCharacterClass(class CharacterClass)
SelectCharacterClass will select the specified class
func (*OGame) SellShipsAtMarketplace ¶
SellShipsAtMarketplace will sell the ship for deuterium
func (*OGame) SendFleet ¶
func (b *OGame) SendFleet(celestialID CelestialID, ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, resources Resources, expeditiontime, unionID int64) (Fleet, error)
SendFleet sends a fleet
func (*OGame) SendMessage ¶
SendMessage sends a message to playerID
func (*OGame) SendMessageAlliance ¶
SendMessageAlliance sends a message to associationID
func (*OGame) ServerTime ¶
ServerTime returns server time Timezone is OGT (OGame Time zone)
func (*OGame) ServerVersion ¶
ServerVersion returns OGame version
func (*OGame) SetLoginWrapper ¶
SetLoginWrapper ...
func (*OGame) SetOGameCredentials ¶
SetOGameCredentials sets ogame credentials for the bot
func (*OGame) SetProxy ¶
SetProxy this will change the bot http transport object. proxyType can be "http" or "socks5". An empty proxyAddress will reset the client transport to default value.
func (*OGame) SetResourceSettings ¶
func (b *OGame) SetResourceSettings(planetID PlanetID, settings ResourceSettings) error
SetResourceSettings set the resources settings on a planet
func (*OGame) SetUserAgent ¶
SetUserAgent change the user-agent used by the http client
func (*OGame) TearDown ¶
func (b *OGame) TearDown(celestialID CelestialID, id ID) error
TearDown tears down any ogame building
func (*OGame) Tx ¶
func (b *OGame) Tx(clb func(tx *Prioritize) error) error
Tx locks the bot during the transaction and ensure the lock is released afterward
func (*OGame) UnsafePhalanx ¶
func (b *OGame) UnsafePhalanx(moonID MoonID, coord Coordinate) ([]Fleet, error)
UnsafePhalanx same as Phalanx but does not perform any input validation.
func (*OGame) UseDM ¶
func (b *OGame) UseDM(typ string, celestialID CelestialID) error
UseDM use dark matter to fast build
func (*OGame) WithPriority ¶
func (b *OGame) WithPriority(priority int) *Prioritize
WithPriority ...
type OGameClient ¶
OGameClient ...
func (*OGameClient) GetRPS ¶
func (c *OGameClient) GetRPS() int32
GetRPS gets the current client RPS
type ObjsStruct ¶
type ObjsStruct struct { AllianceDepot *allianceDepot CrystalMine *crystalMine CrystalStorage *crystalStorage DeuteriumSynthesizer *deuteriumSynthesizer DeuteriumTank *deuteriumTank FusionReactor *fusionReactor MetalMine *metalMine MetalStorage *metalStorage MissileSilo *missileSilo NaniteFactory *naniteFactory ResearchLab *researchLab RoboticsFactory *roboticsFactory SeabedDeuteriumDen *seabedDeuteriumDen ShieldedMetalDen *shieldedMetalDen Shipyard *shipyard SolarPlant *solarPlant SpaceDock *spaceDock LunarBase *lunarBase SensorPhalanx *sensorPhalanx JumpGate *jumpGate Terraformer *terraformer UndergroundCrystalDen *undergroundCrystalDen SolarSatellite *solarSatellite AntiBallisticMissiles *antiBallisticMissiles GaussCannon *gaussCannon HeavyLaser *heavyLaser InterplanetaryMissiles *interplanetaryMissiles IonCannon *ionCannon LargeShieldDome *largeShieldDome LightLaser *lightLaser PlasmaTurret *plasmaTurret RocketLauncher *rocketLauncher SmallShieldDome *smallShieldDome Battlecruiser *battlecruiser Battleship *battleship Bomber *bomber ColonyShip *colonyShip Cruiser *cruiser Deathstar *deathstar Destroyer *destroyer EspionageProbe *espionageProbe HeavyFighter *heavyFighter LargeCargo *largeCargo LightFighter *lightFighter Recycler *recycler SmallCargo *smallCargo Crawler *crawler Reaper *reaper Pathfinder *pathfinder ArmourTechnology *armourTechnology Astrophysics *astrophysics CombustionDrive *combustionDrive ComputerTechnology *computerTechnology EnergyTechnology *energyTechnology EspionageTechnology *espionageTechnology GravitonTechnology *gravitonTechnology HyperspaceDrive *hyperspaceDrive HyperspaceTechnology *hyperspaceTechnology ImpulseDrive *impulseDrive IntergalacticResearchNetwork *intergalacticResearchNetwork IonTechnology *ionTechnology LaserTechnology *laserTechnology PlasmaTechnology *plasmaTechnology ShieldingTechnology *shieldingTechnology WeaponsTechnology *weaponsTechnology }
ObjsStruct structure containing all possible ogame objects
type Option ¶
type Option func(*options)
Option functions to be passed to public interface to change behaviors
type Params ¶
type Params struct { Username string Password string Universe string Lang string PlayerID int64 AutoLogin bool Proxy string ProxyUsername string ProxyPassword string ProxyType string ProxyLoginOnly bool Lobby string APINewHostname string CookiesFilename string }
Params parameters for more fine-grained initialization
type Planet ¶
type Planet struct { Img string ID PlanetID Name string Diameter int64 Coordinate Coordinate Fields Fields Temperature Temperature Moon *Moon // contains filtered or unexported fields }
Planet ogame planet object
func (Planet) ActivateItem ¶
ActivateItem activate an item
func (Planet) BuildBuilding ¶
BuildBuilding ensure what is being built is a building
func (*Planet) BuildCancelable ¶
BuildCancelable builds any cancelable ogame objects (building, technology)
func (Planet) BuildDefense ¶
BuildDefense builds a defense unit
func (*Planet) BuildShips ¶
BuildShips builds a ship unit
func (Planet) BuildTechnology ¶
BuildTechnology ensure that we're trying to build a technology
func (Planet) CancelBuilding ¶
CancelBuilding cancel the construction of a building
func (Planet) CancelResearch ¶
CancelResearch cancel the research
func (Planet) ConstructionsBeingBuilt ¶
ConstructionsBeingBuilt returns the building & research being built, and the time remaining (secs)
func (Planet) EnsureFleet ¶
func (p Planet) EnsureFleet(ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, resources Resources, expeditiontime, unionID int64) (Fleet, error)
EnsureFleet either sends all the requested ships or fail
func (*Planet) FlightTime ¶
func (p *Planet) FlightTime(destination Coordinate, speed Speed, ships ShipsInfos) (secs, fuel int64)
FlightTime calculate flight time and fuel needed
func (Planet) GetDefense ¶
func (p Planet) GetDefense() (DefensesInfos, error)
GetDefense gets all the defenses units information
func (Planet) GetFacilities ¶
func (p Planet) GetFacilities() (Facilities, error)
GetFacilities gets all facilities information
func (Planet) GetProduction ¶
func (p Planet) GetProduction() ([]Quantifiable, int64, error)
GetProduction get what is in the production queue. (ships & defense being built)
func (*Planet) GetResourceSettings ¶
func (p *Planet) GetResourceSettings() (ResourceSettings, error)
GetResourceSettings gets the resources settings for specified planetID
func (Planet) GetResources ¶
GetResources gets user resources
func (Planet) GetResourcesBuildings ¶
func (p Planet) GetResourcesBuildings() (ResourcesBuildings, error)
GetResourcesBuildings gets the resources buildings levels
func (Planet) GetResourcesDetails ¶
func (p Planet) GetResourcesDetails() (ResourcesDetails, error)
GetResourcesDetails gets resources details
func (*Planet) GetResourcesProductions ¶
GetResourcesProductions gets the resources production
func (Planet) GetShips ¶
func (p Planet) GetShips() (ShipsInfos, error)
GetShips gets all ships units information
func (Planet) SendFleet ¶
func (p Planet) SendFleet(ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, resources Resources, expeditiontime, unionID int64) (Fleet, error)
SendFleet sends a fleet
type PlanetID ¶
type PlanetID CelestialID
PlanetID represent a planet id
func (PlanetID) Celestial ¶
func (p PlanetID) Celestial() CelestialID
Celestial convert a PlanetID to a CelestialID
type PlanetInfos ¶
type PlanetInfos struct { ID int64 Activity int64 // no activity: 0, active: 15, inactive: [16, 59] Name string Img string Coordinate Coordinate Administrator bool Inactive bool Vacation bool StrongPlayer bool Newbie bool HonorableTarget bool Banned bool Debris struct { Metal int64 Crystal int64 RecyclersNeeded int64 } Moon *MoonInfos Player struct { ID int64 Name string Rank int64 IsBandit bool IsStarlord bool } Alliance *AllianceInfos }
PlanetInfos public information of a planet in the galaxy page
type Preferences ¶
type Preferences struct { SpioAnz int64 DisableChatBar bool // no-mobile DisableOutlawWarning bool MobileVersion bool ShowOldDropDowns bool ActivateAutofocus bool EventsShow int64 // Hide: 1, Above the content: 2, Below the content: 3 SortSetting int64 // Order of emergence: 0, Coordinates: 1, Alphabet: 2, Size: 3, Used fields: 4 SortOrder int64 // Up: 0, Down: 1 ShowDetailOverlay bool AnimatedSliders bool // no-mobile AnimatedOverview bool // no-mobile PopupsNotices bool // no-mobile PopopsCombatreport bool // no-mobile SpioReportPictures bool MsgResultsPerPage int64 // 10, 25, 50 AuctioneerNotifications bool EconomyNotifications bool ShowActivityMinutes bool PreserveSystemOnPlanetChange bool // Mobile only Notifications struct { BuildList bool FriendlyFleetActivities bool HostileFleetActivities bool ForeignEspionage bool AllianceBroadcasts bool AllianceMessages bool Auctions bool Account bool } }
Preferences ...
type Prioritize ¶
type Prioritize struct {
// contains filtered or unexported fields
}
Prioritize ...
func (*Prioritize) Abandon ¶
func (b *Prioritize) Abandon(v interface{}) error
Abandon a planet. Warning: this is irreversible
func (*Prioritize) ActivateItem ¶
func (b *Prioritize) ActivateItem(ref string, celestialID CelestialID) error
ActivateItem activate an item
func (*Prioritize) Begin ¶
func (b *Prioritize) Begin() *Prioritize
Begin a new transaction. "Done" must be called to release the lock.
func (*Prioritize) BeginNamed ¶
func (b *Prioritize) BeginNamed(name string) *Prioritize
BeginNamed begins a new transaction with a name. "Done" must be called to release the lock.
func (*Prioritize) Build ¶
func (b *Prioritize) Build(celestialID CelestialID, id ID, nbr int64) error
Build builds any ogame objects (building, technology, ship, defence)
func (*Prioritize) BuildBuilding ¶
func (b *Prioritize) BuildBuilding(celestialID CelestialID, buildingID ID) error
BuildBuilding ensure what is being built is a building
func (*Prioritize) BuildCancelable ¶
func (b *Prioritize) BuildCancelable(celestialID CelestialID, id ID) error
BuildCancelable builds any cancelable ogame objects (building, technology)
func (*Prioritize) BuildDefense ¶
func (b *Prioritize) BuildDefense(celestialID CelestialID, defenseID ID, nbr int64) error
BuildDefense builds a defense unit
func (*Prioritize) BuildProduction ¶
func (b *Prioritize) BuildProduction(celestialID CelestialID, id ID, nbr int64) error
BuildProduction builds any line production ogame objects (ship, defence)
func (*Prioritize) BuildShips ¶
func (b *Prioritize) BuildShips(celestialID CelestialID, shipID ID, nbr int64) error
BuildShips builds a ship unit
func (*Prioritize) BuildTechnology ¶
func (b *Prioritize) BuildTechnology(celestialID CelestialID, technologyID ID) error
BuildTechnology ensure that we're trying to build a technology
func (*Prioritize) BuyOfferOfTheDay ¶
func (b *Prioritize) BuyOfferOfTheDay() error
BuyOfferOfTheDay buys the offer of the day.
func (*Prioritize) CancelBuilding ¶
func (b *Prioritize) CancelBuilding(celestialID CelestialID) error
CancelBuilding cancel the construction of a building on a specified planet
func (*Prioritize) CancelFleet ¶
func (b *Prioritize) CancelFleet(fleetID FleetID) error
CancelFleet cancel a fleet
func (*Prioritize) CancelResearch ¶
func (b *Prioritize) CancelResearch(celestialID CelestialID) error
CancelResearch cancel the research
func (*Prioritize) ConstructionsBeingBuilt ¶
func (b *Prioritize) ConstructionsBeingBuilt(celestialID CelestialID) (ID, int64, ID, int64)
ConstructionsBeingBuilt returns the building & research being built, and the time remaining (secs)
func (*Prioritize) CreateUnion ¶
func (b *Prioritize) CreateUnion(fleet Fleet, users []string) (int64, error)
CreateUnion creates a union
func (*Prioritize) DeleteAllMessagesFromTab ¶
func (b *Prioritize) DeleteAllMessagesFromTab(tabID int64) error
DeleteAllMessagesFromTab ...
func (*Prioritize) DeleteMessage ¶
func (b *Prioritize) DeleteMessage(msgID int64) error
DeleteMessage deletes a message from the mail box
func (*Prioritize) DoAuction ¶
func (b *Prioritize) DoAuction(bid map[CelestialID]Resources) error
DoAuction ...
func (*Prioritize) Done ¶
func (b *Prioritize) Done()
Done terminate the transaction, release the lock.
func (*Prioritize) EnsureFleet ¶
func (b *Prioritize) EnsureFleet(celestialID CelestialID, ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, resources Resources, expeditiontime, unionID int64) (Fleet, error)
EnsureFleet either sends all the requested ships or fail
func (*Prioritize) FakeCall ¶
func (b *Prioritize) FakeCall(name string, delay int)
FakeCall used for debugging
func (*Prioritize) FlightTime ¶
func (b *Prioritize) FlightTime(origin, destination Coordinate, speed Speed, ships ShipsInfos) (secs, fuel int64)
FlightTime calculate flight time and fuel needed
func (*Prioritize) GalaxyInfos ¶
func (b *Prioritize) GalaxyInfos(galaxy, system int64, options ...Option) (SystemInfos, error)
GalaxyInfos get information of all planets and moons of a solar system
func (*Prioritize) GetAllResources ¶
func (b *Prioritize) GetAllResources() (map[CelestialID]Resources, error)
GetAllResources ...
func (*Prioritize) GetAlliancePageContent ¶
func (b *Prioritize) GetAlliancePageContent(vals url.Values) []byte
GetAlliancePageContent gets the html for a specific ogame page
func (*Prioritize) GetAttacks ¶
func (b *Prioritize) GetAttacks() ([]AttackEvent, error)
GetAttacks get enemy fleets attacking you
func (*Prioritize) GetAttacksUsing ¶
func (b *Prioritize) GetAttacksUsing(celestialID CelestialID) ([]AttackEvent, error)
GetAttacksUsing get enemy fleets attacking you using a specific celestial to make the check
func (*Prioritize) GetCachedResearch ¶
func (b *Prioritize) GetCachedResearch() Researches
GetCachedResearch gets the player cached researches information
func (*Prioritize) GetCelestial ¶
func (b *Prioritize) GetCelestial(v interface{}) (Celestial, error)
GetCelestial get the player's planet/moon using the coordinate
func (*Prioritize) GetCelestials ¶
func (b *Prioritize) GetCelestials() ([]Celestial, error)
GetCelestials get the player's planets & moons
func (*Prioritize) GetCombatReportSummaryFor ¶
func (b *Prioritize) GetCombatReportSummaryFor(coord Coordinate) (CombatReportSummary, error)
GetCombatReportSummaryFor gets the latest combat report for a given coordinate
func (*Prioritize) GetDMCosts ¶
func (b *Prioritize) GetDMCosts(celestialID CelestialID) (DMCosts, error)
GetDMCosts returns fast build with DM information
func (*Prioritize) GetDefense ¶
func (b *Prioritize) GetDefense(celestialID CelestialID) (DefensesInfos, error)
GetDefense gets all the defenses units information of a planet Fails if planetID is invalid
func (*Prioritize) GetEmpire ¶
func (b *Prioritize) GetEmpire(nbr int64) (interface{}, error)
GetEmpire retrieves JSON from Empire page (Commander only).
func (*Prioritize) GetEspionageReport ¶
func (b *Prioritize) GetEspionageReport(msgID int64) (EspionageReport, error)
GetEspionageReport gets a detailed espionage report
func (*Prioritize) GetEspionageReportFor ¶
func (b *Prioritize) GetEspionageReportFor(coord Coordinate) (EspionageReport, error)
GetEspionageReportFor gets the latest espionage report for a given coordinate
func (*Prioritize) GetEspionageReportMessages ¶
func (b *Prioritize) GetEspionageReportMessages() ([]EspionageReportSummary, error)
GetEspionageReportMessages gets the summary of each espionage reports
func (*Prioritize) GetFacilities ¶
func (b *Prioritize) GetFacilities(celestialID CelestialID) (Facilities, error)
GetFacilities gets all facilities information of a planet
func (*Prioritize) GetFleets ¶
func (b *Prioritize) GetFleets(opts ...Option) ([]Fleet, Slots)
GetFleets get the player's own fleets activities
func (*Prioritize) GetFleetsFromEventList ¶
func (b *Prioritize) GetFleetsFromEventList() []Fleet
GetFleetsFromEventList get the player's own fleets activities
func (*Prioritize) GetItems ¶
func (b *Prioritize) GetItems(celestialID CelestialID) ([]Item, error)
GetItems get all items information
func (*Prioritize) GetMoon ¶
func (b *Prioritize) GetMoon(v interface{}) (Moon, error)
GetMoon gets infos for moonID
func (*Prioritize) GetMoons ¶
func (b *Prioritize) GetMoons() []Moon
GetMoons returns the user moons
func (*Prioritize) GetPageContent ¶
func (b *Prioritize) GetPageContent(vals url.Values) ([]byte, error)
GetPageContent gets the html for a specific ogame page
func (*Prioritize) GetPlanet ¶
func (b *Prioritize) GetPlanet(v interface{}) (Planet, error)
GetPlanet gets infos for planetID Fails if planetID is invalid
func (*Prioritize) GetPlanets ¶
func (b *Prioritize) GetPlanets() []Planet
GetPlanets returns the user planets
func (*Prioritize) GetProduction ¶
func (b *Prioritize) GetProduction(celestialID CelestialID) ([]Quantifiable, int64, error)
GetProduction get what is in the production queue. (ships & defense being built)
func (*Prioritize) GetResearch ¶
func (b *Prioritize) GetResearch() Researches
GetResearch gets the player researches information
func (*Prioritize) GetResourceSettings ¶
func (b *Prioritize) GetResourceSettings(planetID PlanetID) (ResourceSettings, error)
GetResourceSettings gets the resources settings for specified planetID
func (*Prioritize) GetResources ¶
func (b *Prioritize) GetResources(celestialID CelestialID) (Resources, error)
GetResources gets user resources
func (*Prioritize) GetResourcesBuildings ¶
func (b *Prioritize) GetResourcesBuildings(celestialID CelestialID) (ResourcesBuildings, error)
GetResourcesBuildings gets the resources buildings levels
func (*Prioritize) GetResourcesDetails ¶
func (b *Prioritize) GetResourcesDetails(celestialID CelestialID) (ResourcesDetails, error)
GetResourcesDetails gets user resources
func (*Prioritize) GetResourcesProductions ¶
func (b *Prioritize) GetResourcesProductions(planetID PlanetID) (Resources, error)
GetResourcesProductions gets the planet resources production
func (*Prioritize) GetResourcesProductionsLight ¶
func (b *Prioritize) GetResourcesProductionsLight(resBuildings ResourcesBuildings, researches Researches, resSettings ResourceSettings, temp Temperature) Resources
GetResourcesProductionsLight gets the planet resources production
func (*Prioritize) GetShips ¶
func (b *Prioritize) GetShips(celestialID CelestialID) (ShipsInfos, error)
GetShips gets all ships units information of a planet
func (*Prioritize) GetSlots ¶
func (b *Prioritize) GetSlots() Slots
GetSlots gets the player current and total slots information
func (*Prioritize) GetUserInfos ¶
func (b *Prioritize) GetUserInfos() UserInfos
GetUserInfos gets the user information
func (*Prioritize) HeadersForPage ¶
func (b *Prioritize) HeadersForPage(url string) (http.Header, error)
HeadersForPage gets the headers for a specific ogame page
func (*Prioritize) Highscore ¶
func (b *Prioritize) Highscore(category, typ, page int64) (Highscore, error)
Highscore ...
func (*Prioritize) IsUnderAttack ¶
func (b *Prioritize) IsUnderAttack() (bool, error)
IsUnderAttack returns true if the user is under attack, false otherwise
func (*Prioritize) JumpGate ¶
func (b *Prioritize) JumpGate(origin, dest MoonID, ships ShipsInfos) (bool, int64, error)
JumpGate sends ships through a jump gate.
func (*Prioritize) JumpGateDestinations ¶
func (b *Prioritize) JumpGateDestinations(origin MoonID) ([]MoonID, int64, error)
JumpGateDestinations returns available destinations for jump gate.
func (*Prioritize) Login ¶
func (b *Prioritize) Login() error
Login to ogame server Can fails with BadCredentialsError
func (*Prioritize) LoginWithExistingCookies ¶
func (b *Prioritize) LoginWithExistingCookies() (bool, error)
LoginWithExistingCookies to ogame server reusing existing cookies Returns either or not the bot logged in using the existing cookies
func (*Prioritize) Phalanx ¶
func (b *Prioritize) Phalanx(moonID MoonID, coord Coordinate) ([]Fleet, error)
Phalanx scan a coordinate from a moon to get fleets information IMPORTANT: My account was instantly banned when I scanned an invalid coordinate. IMPORTANT: This function DOES validate that the coordinate is a valid planet in range of phalanx
and that you have enough deuterium.
func (*Prioritize) PostPageContent ¶
func (b *Prioritize) PostPageContent(vals, payload url.Values) ([]byte, error)
PostPageContent make a post request to ogame server This is useful when simulating a web browser
func (*Prioritize) SendFleet ¶
func (b *Prioritize) SendFleet(celestialID CelestialID, ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, resources Resources, expeditiontime, unionID int64) (Fleet, error)
SendFleet sends a fleet
func (*Prioritize) SendIPM ¶
func (b *Prioritize) SendIPM(planetID PlanetID, coord Coordinate, nbr int64, priority ID) (int64, error)
SendIPM sends IPM
func (*Prioritize) SendMessage ¶
func (b *Prioritize) SendMessage(playerID int64, message string) error
SendMessage sends a message to playerID
func (*Prioritize) SendMessageAlliance ¶
func (b *Prioritize) SendMessageAlliance(associationID int64, message string) error
SendMessageAlliance sends a message to associationID
func (*Prioritize) ServerTime ¶
func (b *Prioritize) ServerTime() time.Time
ServerTime returns server time Timezone is OGT (OGame Time zone)
func (*Prioritize) SetInitiator ¶
func (b *Prioritize) SetInitiator(initiator string) *Prioritize
SetInitiator ...
func (*Prioritize) SetResourceSettings ¶
func (b *Prioritize) SetResourceSettings(planetID PlanetID, settings ResourceSettings) error
SetResourceSettings set the resources settings on a planet
func (*Prioritize) TearDown ¶
func (b *Prioritize) TearDown(celestialID CelestialID, id ID) error
TearDown tears down any ogame building
func (*Prioritize) Tx ¶
func (b *Prioritize) Tx(clb func(*Prioritize) error) error
Tx locks the bot during the transaction and ensure the lock is released afterward
func (*Prioritize) UnsafePhalanx ¶
func (b *Prioritize) UnsafePhalanx(moonID MoonID, coord Coordinate) ([]Fleet, error)
UnsafePhalanx same as Phalanx but does not perform any input validation.
func (*Prioritize) UseDM ¶
func (b *Prioritize) UseDM(typ string, celestialID CelestialID) error
UseDM use dark matter to fast build
type Quantifiable ¶
Quantifiable is a tuple with an ID and a number
type Researches ¶
type Researches struct { EnergyTechnology int64 LaserTechnology int64 IonTechnology int64 HyperspaceTechnology int64 PlasmaTechnology int64 CombustionDrive int64 ImpulseDrive int64 HyperspaceDrive int64 EspionageTechnology int64 ComputerTechnology int64 Astrophysics int64 IntergalacticResearchNetwork int64 GravitonTechnology int64 WeaponsTechnology int64 ShieldingTechnology int64 ArmourTechnology int64 }
Researches represent player's researches
func (Researches) ByID ¶
func (s Researches) ByID(id ID) int64
ByID gets the player research level by research id
func (Researches) Lazy ¶
func (s Researches) Lazy() LazyResearches
Lazy returns a function that return self
func (Researches) String ¶
func (s Researches) String() string
type ResourceSettings ¶
type ResourceSettings struct { MetalMine int64 CrystalMine int64 DeuteriumSynthesizer int64 SolarPlant int64 FusionReactor int64 SolarSatellite int64 Crawler int64 }
ResourceSettings represent a planet resource settings
func (ResourceSettings) String ¶
func (r ResourceSettings) String() string
type Resources ¶
Resources represent ogame resources
type ResourcesBuildings ¶
type ResourcesBuildings struct { MetalMine int64 CrystalMine int64 DeuteriumSynthesizer int64 SolarPlant int64 FusionReactor int64 SolarSatellite int64 MetalStorage int64 CrystalStorage int64 DeuteriumTank int64 }
ResourcesBuildings represent a planet resource buildings
func (ResourcesBuildings) ByID ¶
func (r ResourcesBuildings) ByID(id ID) int64
ByID gets the resource building level from a building id
func (ResourcesBuildings) Lazy ¶
func (r ResourcesBuildings) Lazy() LazyResourcesBuildings
Lazy returns a function that return self
func (ResourcesBuildings) SetByID ¶
func (r ResourcesBuildings) SetByID(id ID, level int64) ResourcesBuildings
SetByID sets the resource building level
func (ResourcesBuildings) String ¶
func (r ResourcesBuildings) String() string
type ResourcesDetails ¶
type ResourcesDetails struct { Metal struct { Available int64 StorageCapacity int64 CurrentProduction int64 } Crystal struct { Available int64 StorageCapacity int64 CurrentProduction int64 } Deuterium struct { Available int64 StorageCapacity int64 CurrentProduction int64 } Energy struct { Available int64 CurrentProduction int64 Consumption int64 } Darkmatter struct { Available int64 Purchased int64 Found int64 } }
ResourcesDetails ...
func (ResourcesDetails) Available ¶
func (r ResourcesDetails) Available() Resources
Available returns the resources available
type Server ¶
type Server struct { Language string Number int64 Name string PlayerCount int64 PlayersOnline int64 Opened string StartDate string EndDate *string ServerClosed int64 Prefered int64 SignupClosed int64 Settings struct { AKS int64 FleetSpeed int64 WreckField int64 ServerLabel string EconomySpeed int64 PlanetFields int64 UniverseSize int64 // Nb of galaxies ServerCategory string EspionageProbeRaids int64 PremiumValidationGift int64 DebrisFieldFactorShips int64 DebrisFieldFactorDefence int64 } }
Server ogame information for their servers
type ServerData ¶
type ServerData struct { Name string `xml:"name"` // Europa Number int64 `xml:"number"` // 157 Language string `xml:"language"` // ru Timezone string `xml:"timezone"` // Europe/Moscow TimezoneOffset string `xml:"timezoneOffset"` // +03:00 Domain string `xml:"domain"` // s157-ru.ogame.gameforge.com Version string `xml:"version"` // 6.8.8-pl2 Speed int64 `xml:"speed"` // 6 SpeedFleet int64 `xml:"speedFleet"` // 6 Galaxies int64 `xml:"galaxies"` // 4 Systems int64 `xml:"systems"` // 499 ACS bool `xml:"aCS"` // 1 RapidFire bool `xml:"rapidFire"` // 1 DefToTF bool `xml:"defToTF"` // 0 DebrisFactor float64 `xml:"debrisFactor"` // 0.5 DebrisFactorDef float64 `xml:"debrisFactorDef"` // 0 RepairFactor float64 `xml:"repairFactor"` // 0.7 NewbieProtectionLimit int64 `xml:"newbieProtectionLimit"` // 500000 NewbieProtectionHigh int64 `xml:"newbieProtectionHigh"` // 50000 TopScore int64 `xml:"topScore"` // 60259362 BonusFields int64 `xml:"bonusFields"` // 30 DonutGalaxy bool `xml:"donutGalaxy"` // 1 DonutSystem bool `xml:"donutSystem"` // 1 WfEnabled bool `xml:"wfEnabled"` // 1 (WreckField) WfMinimumRessLost int64 `xml:"wfMinimumRessLost"` // 150000 WfMinimumLossPercentage int64 `xml:"wfMinimumLossPercentage"` // 5 WfBasicPercentageRepairable int64 `xml:"wfBasicPercentageRepairable"` // 45 GlobalDeuteriumSaveFactor float64 `xml:"globalDeuteriumSaveFactor"` // 0.5 Bashlimit int64 `xml:"bashlimit"` // 0 ProbeCargo int64 `xml:"probeCargo"` // 5 ResearchDurationDivisor int64 `xml:"researchDurationDivisor"` // 2 DarkMatterNewAcount int64 `xml:"darkMatterNewAcount"` // 8000 CargoHyperspaceTechMultiplier int64 `xml:"cargoHyperspaceTechMultiplier"` // 5 }
ServerData represent api result from https://s157-ru.ogame.gameforge.com/api/serverData.xml
type Ship ¶
type Ship interface { DefenderObj GetCargoCapacity(techs Researches, probeRaids, isCollector bool) int64 GetSpeed(techs Researches, isCollector, isGeneral bool) int64 GetFuelConsumption(techs Researches) int64 }
Ship interface implemented by all ships units
type ShipsInfos ¶
type ShipsInfos struct { LightFighter int64 HeavyFighter int64 Cruiser int64 Battleship int64 Battlecruiser int64 Bomber int64 Destroyer int64 Deathstar int64 SmallCargo int64 LargeCargo int64 ColonyShip int64 Recycler int64 EspionageProbe int64 SolarSatellite int64 Crawler int64 Reaper int64 Pathfinder int64 }
ShipsInfos represent a planet ships information
func (ShipsInfos) Cargo ¶
func (s ShipsInfos) Cargo(techs Researches, probeRaids, isCollector bool) (out int64)
Cargo returns the total cargo of the ships
func (ShipsInfos) CountShips ¶
func (s ShipsInfos) CountShips() (out int64)
CountShips returns the count of ships
func (ShipsInfos) Equal ¶
func (s ShipsInfos) Equal(other ShipsInfos) bool
Equal either or not two ShipsInfos are equal
func (ShipsInfos) FleetCost ¶
func (s ShipsInfos) FleetCost() (out Resources)
FleetCost returns the cost of the fleet
func (ShipsInfos) FleetExpeditionPoints ¶
func (s ShipsInfos) FleetExpeditionPoints() (out int64)
FleetExpeditionPoints returns the total Expedition Points of the ships
func (ShipsInfos) FleetValue ¶
func (s ShipsInfos) FleetValue() (out int64)
FleetValue returns the value of the fleet
func (ShipsInfos) FromQuantifiables ¶
func (s ShipsInfos) FromQuantifiables(in []Quantifiable) (out ShipsInfos)
FromQuantifiables convert an array of Quantifiable to a ShipsInfos
func (ShipsInfos) Has ¶
func (s ShipsInfos) Has(v ShipsInfos) bool
Has returns true if v is contained by s
func (ShipsInfos) HasShips ¶
func (s ShipsInfos) HasShips() bool
HasShips returns either or not at least one ship is present
func (*ShipsInfos) Set ¶
func (s *ShipsInfos) Set(id ID, val int64)
Set sets the ships value using the ship id
func (ShipsInfos) Speed ¶
func (s ShipsInfos) Speed(techs Researches, isCollector, isGeneral bool) int64
Speed returns the speed of the slowest ship
func (ShipsInfos) String ¶
func (s ShipsInfos) String() string
func (ShipsInfos) ToQuantifiables ¶
func (s ShipsInfos) ToQuantifiables() []Quantifiable
ToQuantifiables convert a ShipsInfos to an array of Quantifiable
type SimulatorParams ¶
SimulatorParams ...
type SimulatorResult ¶
type SimulatorResult struct { Simulations int AttackerWin int DefenderWin int Draw int Rounds int AttackerLosses price DefenderLosses price Debris price Recycler int Moonchance int Logs string }
SimulatorResult ...
func Simulate ¶
func Simulate(attackerParam Attacker, defenderParam Defender, params SimulatorParams) SimulatorResult
Simulate ...
type Speed ¶
type Speed int
Speed represent a fleet speed
type SystemInfos ¶
type SystemInfos struct { ExpeditionDebris struct { Metal int64 Crystal int64 PathfindersNeeded int64 } Events struct { Darkmatter int64 HasAsteroid bool } // contains filtered or unexported fields }
SystemInfos planets information for a specific system
func (SystemInfos) Each ¶
func (s SystemInfos) Each(clb func(planetInfo *PlanetInfos))
Each will execute provided callback for every positions in the system
func (SystemInfos) MarshalJSON ¶
func (s SystemInfos) MarshalJSON() ([]byte, error)
MarshalJSON export private fields to json for ogamed
func (SystemInfos) Position ¶
func (s SystemInfos) Position(idx int64) *PlanetInfos
Position returns planet at position idx in the SystemInfos
type TasksOverview ¶
TasksOverview overview of tasks in heap
type Technology ¶
type Technology interface { Levelable }
Technology interface that all technologies implement
type Temperature ¶
Temperature planet temperature values
func (Temperature) Mean ¶
func (t Temperature) Mean() int64
Mean returns the planet mean temperature
type UserInfos ¶
type UserInfos struct { PlayerID int64 PlayerName string Points int64 Rank int64 Total int64 HonourPoints int64 }
UserInfos returns the player's information
type Wrapper ¶
type Wrapper interface { IsV7() bool GetExtractor() Extractor SetOGameCredentials(username, password string) SetProxy(proxyAddress, username, password, proxyType string, loginOnly bool) error SetLoginWrapper(func(func() (bool, error)) error) GetClient() *OGameClient Enable() Disable() IsEnabled() bool Quiet(bool) GetTasks() TasksOverview Tx(clb func(tx *Prioritize) error) error Begin() *Prioritize BeginNamed(name string) *Prioritize WithPriority(priority int) *Prioritize GetPublicIP() (string, error) OnStateChange(clb func(locked bool, actor string)) GetState() (bool, string) IsLocked() bool GetSession() string AddAccount(number int, lang string) (NewAccount, error) GetServer() Server GetServerData() ServerData SetUserAgent(newUserAgent string) ServerURL() string GetLanguage() string GetPageContent(url.Values) ([]byte, error) GetAlliancePageContent(url.Values) ([]byte, error) PostPageContent(url.Values, url.Values) ([]byte, error) LoginWithExistingCookies() (bool, error) Login() error Logout() IsLoggedIn() bool IsConnected() bool GetUsername() string GetUniverseName() string GetUniverseSpeed() int64 GetUniverseSpeedFleet() int64 GetResearchSpeed() int64 GetNbSystems() int64 IsDonutGalaxy() bool IsDonutSystem() bool FleetDeutSaveFactor() float64 ServerVersion() string ServerTime() time.Time Location() *time.Location IsUnderAttack() (bool, error) GetUserInfos() UserInfos SendMessage(playerID int64, message string) error SendMessageAlliance(associationID int64, message string) error ReconnectChat() bool GetFleets(...Option) ([]Fleet, Slots) GetFleetsFromEventList() []Fleet CancelFleet(FleetID) error GetAttacks() ([]AttackEvent, error) GetAttacksUsing(CelestialID) ([]AttackEvent, error) GalaxyInfos(galaxy, system int64, opts ...Option) (SystemInfos, error) GetCachedResearch() Researches GetResearch() Researches GetCachedPlanets() []Planet GetCachedMoons() []Moon GetCachedCelestials() []Celestial GetCachedCelestial(interface{}) Celestial GetCachedPlayer() UserInfos GetCachedPreferences() Preferences IsVacationModeEnabled() bool GetPlanets() []Planet GetPlanet(interface{}) (Planet, error) GetMoons() []Moon GetMoon(interface{}) (Moon, error) GetCelestial(interface{}) (Celestial, error) GetCelestials() ([]Celestial, error) Abandon(interface{}) error GetEspionageReportMessages() ([]EspionageReportSummary, error) GetEspionageReportFor(Coordinate) (EspionageReport, error) GetEspionageReport(msgID int64) (EspionageReport, error) GetCombatReportSummaryFor(Coordinate) (CombatReportSummary, error) //GetCombatReport(msgID int) (CombatReport, error) DeleteMessage(msgID int64) error DeleteAllMessagesFromTab(tabID int64) error Distance(origin, destination Coordinate) int64 FlightTime(origin, destination Coordinate, speed Speed, ships ShipsInfos) (secs, fuel int64) RegisterWSCallback(string, func([]byte)) RemoveWSCallback(string) RegisterChatCallback(func(ChatMsg)) RegisterAuctioneerCallback(func([]byte)) RegisterHTMLInterceptor(func(method, url string, params, payload url.Values, pageHTML []byte)) GetSlots() Slots BuyOfferOfTheDay() error BytesDownloaded() int64 BytesUploaded() int64 CreateUnion(fleet Fleet, unionUsers []string) (int64, error) GetEmpire(nbr int64) (interface{}, error) HeadersForPage(url string) (http.Header, error) CharacterClass() CharacterClass GetAuction() (Auction, error) DoAuction(bid map[CelestialID]Resources) error Highscore(category, typ, page int64) (Highscore, error) GetAllResources() (map[CelestialID]Resources, error) GetDMCosts(CelestialID) (DMCosts, error) UseDM(string, CelestialID) error GetItems(CelestialID) ([]Item, error) ActivateItem(string, CelestialID) error // Planet or Moon functions GetResources(CelestialID) (Resources, error) GetResourcesDetails(CelestialID) (ResourcesDetails, error) SendFleet(celestialID CelestialID, ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, resources Resources, expeditiontime, unionID int64) (Fleet, error) EnsureFleet(celestialID CelestialID, ships []Quantifiable, speed Speed, where Coordinate, mission MissionID, resources Resources, expeditiontime, unionID int64) (Fleet, error) Build(celestialID CelestialID, id ID, nbr int64) error BuildCancelable(CelestialID, ID) error BuildProduction(celestialID CelestialID, id ID, nbr int64) error BuildBuilding(celestialID CelestialID, buildingID ID) error BuildDefense(celestialID CelestialID, defenseID ID, nbr int64) error BuildShips(celestialID CelestialID, shipID ID, nbr int64) error CancelBuilding(CelestialID) error TearDown(celestialID CelestialID, id ID) error ConstructionsBeingBuilt(CelestialID) (buildingID ID, buildingCountdown int64, researchID ID, researchCountdown int64) GetProduction(CelestialID) ([]Quantifiable, int64, error) GetFacilities(CelestialID) (Facilities, error) GetDefense(CelestialID) (DefensesInfos, error) GetShips(CelestialID) (ShipsInfos, error) GetResourcesBuildings(CelestialID) (ResourcesBuildings, error) CancelResearch(CelestialID) error BuildTechnology(celestialID CelestialID, technologyID ID) error // Planet specific functions GetResourceSettings(PlanetID) (ResourceSettings, error) SetResourceSettings(PlanetID, ResourceSettings) error SendIPM(PlanetID, Coordinate, int64, ID) (int64, error) //GetResourcesProductionRatio(PlanetID) (float64, error) GetResourcesProductions(PlanetID) (Resources, error) GetResourcesProductionsLight(ResourcesBuildings, Researches, ResourceSettings, Temperature) Resources // Moon specific functions Phalanx(MoonID, Coordinate) ([]Fleet, error) UnsafePhalanx(MoonID, Coordinate) ([]Fleet, error) JumpGate(origin, dest MoonID, ships ShipsInfos) (bool, int64, error) JumpGateDestinations(origin MoonID) ([]MoonID, int64, error) }
Wrapper all available functions to control ogame bot
Source Files ¶
- allianceDepot.go
- antiBallisticMissiles.go
- armourTechnology.go
- astrophysics.go
- attackEvent.go
- base.go
- baseBuilding.go
- baseDefender.go
- baseDefense.go
- baseLevelable.go
- baseShip.go
- baseTechnology.go
- battlecruiser.go
- battleship.go
- bomber.go
- client.go
- colonyShip.go
- combustionDrive.go
- computerTechnology.go
- constants.go
- coordinate.go
- crawler.go
- cruiser.go
- crystalMine.go
- crystalStorage.go
- deathstar.go
- defence.go
- destroyer.go
- deuteriumSynthesizer.go
- deuteriumTank.go
- energyTechnology.go
- errors.go
- espionageProbe.go
- espionageReport.go
- espionageTechnology.go
- exponentialBackoff.go
- extractor_v6.go
- extractor_v7.go
- extractor_v71.go
- extracts.go
- extracts_v6.go
- extracts_v7.go
- extracts_v71.go
- facilities.go
- fetcher.go
- fleet.go
- fleetBuilder.go
- fleetid.go
- fusionReactor.go
- gaussCannon.go
- gravitonTechnology.go
- handlers.go
- heavyFighter.go
- heavyLaser.go
- hyperspaceDrive.go
- hyperspaceTechnology.go
- id.go
- impulseDrive.go
- interfaces.go
- intergalacticResearchNetwork.go
- interplanetaryMissiles.go
- ionCannon.go
- ionTechnology.go
- item.go
- jumpGate.go
- largeCargo.go
- largeShieldDome.go
- laserTechnology.go
- lightFighter.go
- lightLaser.go
- log.go
- lunarBase.go
- metalMine.go
- metalStorage.go
- missileSilo.go
- moon.go
- naniteFactory.go
- objs.go
- ogame.go
- pathfinder.go
- planet.go
- planetInfos.go
- planetid.go
- plasmaTechnology.go
- plasmaTurret.go
- prioritize.go
- priorityQueue.go
- quantifiable.go
- reaper.go
- recycler.go
- researchLab.go
- researches.go
- resourceSettings.go
- resources.go
- resourcesBuildings.go
- roboticsFactory.go
- rocketLauncher.go
- seabedDeuteriumDen.go
- sensorPhalanx.go
- shieldedMetalDen.go
- shieldingTechnology.go
- ships.go
- shipyard.go
- simulator.go
- smallCargo.go
- smallShieldDome.go
- solarPlant.go
- solarSatellite.go
- spaceDock.go
- storageBuilding.go
- terraformer.go
- undergroundCrystalDen.go
- userInfos.go
- utils.go
- weaponsTechnology.go