1
0
Fork 0

[golang] added ships first api calls

This commit is contained in:
Julien Dessaux 2024-05-29 23:08:24 +02:00
parent 0d00bf9fd2
commit 860984057d
Signed by: adyxax
GPG key ID: F92E51B86E07177E
9 changed files with 164 additions and 0 deletions

View file

@ -82,5 +82,11 @@ func run(
// ----- Update agent ------------------------------------------------------
agent, err := client.MyAgent()
slog.Info("agent", "agent", agent, "err", err)
// ----- Get ships ---------------------------------------------------------
ships, err := client.MyShips()
err = client.Dock(&ships[0])
slog.Info("dock", "ship", ships[0], "err", err)
err = client.Orbit(&ships[0])
slog.Info("orbit", "ship", ships[0], "err", err)
return nil
}