summaryrefslogtreecommitdiff
path: root/golang/pkg/api/register.go
diff options
context:
space:
mode:
Diffstat (limited to 'golang/pkg/api/register.go')
-rw-r--r--golang/pkg/api/register.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/golang/pkg/api/register.go b/golang/pkg/api/register.go
new file mode 100644
index 0000000..4f95e2f
--- /dev/null
+++ b/golang/pkg/api/register.go
@@ -0,0 +1,20 @@
+package api
+
+type RegisterMessage struct {
+ //agent
+ //contract
+ //faction
+ //ship
+ Token string `json:"token"`
+}
+
+func (c *Client) Register(faction, symbol string) (APIMessage[RegisterMessage, any], error) {
+ type RegisterRequest struct {
+ Faction string `json:"faction"`
+ Symbol string `json:"symbol"`
+ }
+ return Send[RegisterMessage](c, "POST", "/register", RegisterRequest{
+ Faction: faction,
+ Symbol: symbol,
+ })
+}