Skip to content

Commit

Permalink
fix: update tx_metalabels cmd
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Kungla <[email protected]>
  • Loading branch information
mkungla committed Mar 30, 2024
1 parent e7542be commit 7ac58d2
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion internal/api/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,32 @@ func cmdTransactionsTxMetadata(c *client) *happy.Command {
}

func cmdTransactionsTxMetalabels(c *client) *happy.Command {
return notimplCmd(categoryTransactions, "tx_metalabels")
cmd := happy.NewCommand("tx_metalabels",
happy.Option("description", "Transaction Metadata Labels"),
happy.Option("category", categoryTransactions),
happy.Option("usage", "koios api tx_metalabels"),
).WithFlags(pagingFlags...)

cmd.AddInfo("Get a list of all transaction metalabels")

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

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().GetTxMetaLabels(sess, opts)
apiOutput(c.noFormat, res, err)
return err
})

return cmd
}

func cmdTransactionsSubmittx(c *client) *happy.Command {
Expand Down

0 comments on commit 7ac58d2

Please sign in to comment.