Skip to content

Commit

Permalink
sfix: update pool_relays cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
mkungla committed Mar 30, 2024
1 parent 8a42435 commit 116143f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions internal/api/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,33 @@ func cmdPoolPoolRetirements(c *client) *happy.Command {
}

func cmdPoolPoolRelays(c *client) *happy.Command {
cmd := happy.NewCommand("pool_relays",
happy.Option("description", "Pool Relays"),
happy.Option("category", categoryPool),
).WithFlags(pagingFlags...)

cmd.AddInfo("A list of registered relays for all pools")

cmd.AddInfo(`
Docs: https://api.koios.rest/#get-/pool_relays
Example: koios-cli api pool_relays
`)

cmd.Do(func(sess *happy.Session, args happy.Args) error {
opts, err := c.newRequestOpts(sess, args)
if err != nil {
return err
}

res, err := c.koios().GetPoolRelays(sess, opts)

apiOutput(c.noFormat, res, err)
return err
})

return cmd

return notimplCmd(categoryPool, "pool_relays")
}

Expand Down

0 comments on commit 116143f

Please sign in to comment.