[golang] bootstrapped a client in yet another language
This commit is contained in:
parent
5aac233c08
commit
427cc77fa3
12 changed files with 447 additions and 0 deletions
14
golang/pkg/api/agents.go
Normal file
14
golang/pkg/api/agents.go
Normal file
|
@ -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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue