summaryrefslogtreecommitdiff
path: root/golang/pkg/api/agents.go
diff options
context:
space:
mode:
Diffstat (limited to 'golang/pkg/api/agents.go')
-rw-r--r--golang/pkg/api/agents.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/golang/pkg/api/agents.go b/golang/pkg/api/agents.go
new file mode 100644
index 0000000..aa8107a
--- /dev/null
+++ b/golang/pkg/api/agents.go
@@ -0,0 +1,14 @@
+package api
+
+type AgentMessage struct {
+ AccountID string `json:"accountId"`
+ Credits int `json:"credits"`
+ Headquarters string `json:"headquarters"`
+ ShipCount int `json:"shipCount"`
+ StartingFaction string `json:"startingFaction"`
+ Symbol string `json:"symbol"`
+}
+
+func (c *Client) MyAgent() (APIMessage[AgentMessage, any], error) {
+ return Send[AgentMessage](c, "GET", "/my/agent", nil)
+}