Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Leaderboard ¶
type Leaderboard struct { NetWorth []UserRank `yaml:"netWorth"` UserNetWorth UserRank `yaml:"userNetWorth"` }
Leaderboard is the response from the API.
type Ship ¶
type Ship struct { // Cargo []ShipCargo `yaml:"cargo"` Class string `yaml:"class"` FlightPlanId string `yaml:"flightPlanId"` Id string `yaml:"id"` Location string `yaml:"location"` Manufacturer string `yaml:"manufacturer"` MaxCargo int `yaml:"maxCargo"` Plating int `yaml:"plating"` SpaceAvailable int `yaml:"spaceAvailable"` Speed int `yaml:"speed"` Type string `yaml:"type"` Weapons int `yaml:"weapons"` X int `yaml:"x"` Y int `yaml:"y"` }
Ship is the response from the API about ships.
type ShipList ¶
type ShipList struct {
Ships []Ship `yaml:"ships"`
}
ShipList is the list of ships returned by the game.
type User ¶
type User struct { Details UserDetails `yaml:"user"` Error Error `yaml:"error"` // contains filtered or unexported fields }
User contains the essential information to authenticate in the game, but also to map the response from user details.
func NewUserCustomProxy ¶
func NewUserCustomProxy(ctx context.Context, tracer trace.Tracer, proxy web.Proxy, token string) (*User, error)
NewUserCustomProxy creates a new instance of component.User, using a provided custom web.WebProxy.
func (*User) GetDetails ¶
GetDetails will get the user details from the game.
func (*User) GetLeaderboard ¶
func (u *User) GetLeaderboard(ctx context.Context) (*Leaderboard, error)
GetLeaderboard will get the leaderboard and the user rank.
Click to show internal directories.
Click to hide internal directories.