FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

adds support for cli cmds of new metadata list endpoints by adarrohn · Pull Request #4 · glassnode/glassnode-cli · GitHub

adds support for cli cmds of new metadata list endpoints - #4

Merged
rafalbromirski merged 1 commit into
glassnode:mainfrom
adarrohn:ad/DE-4893-new-metadata-list-endpoints
Aug 28, 2026
Merged

adds support for cli cmds of new metadata list endpoints#4
rafalbromirski merged 1 commit into
glassnode:mainfrom
adarrohn:ad/DE-4893-new-metadata-list-endpoints

Conversation

adarrohn commented Aug 27, 2026
edited
Loading

Copy link
Copy Markdown

Summary

Adds CLI support for the new metadata list endpoints:

Command Endpoint Notes
gn metric tags /v1/metadata/tags all tags used across metric metadata
gn asset tags /v1/metadata/assets/tags semantic tags, optional --filter
gn asset categories /v1/metadata/assets/categories optional --filter
gn asset blockchains /v1/metadata/assets/blockchains optional --filter

--filter accepts the same CEL expressions as gn asset list (bare RHS auto-quoted via the existing normalizeFilter), and --dry-run/-o json|csv|table work as on the other commands.

Implementation notes

  • New api.ListNames client method for the shared {"data":[{"name":...}]} shape.
  • Shared runNamesListCommand helper drives all four commands.
  • CSV/table output now uses a caller-supplied column label via output.Options.Header — tag, category, blockchain — defaulting to the existing metric label, so gn metric list output is unchanged (PrintCSV/PrintTable signatures remain backward compatible).
  • Tests use the existing isolated runCLI helper (HOME=t.TempDir(), pinned Go caches) so they never read the developer's ~/.gn or fire OAuth refresh calls. One test file per command file.

Testing

  • Dry-run URL assertions, JSON list output, CEL filter pass-through, CSV/table header labels.
  • go test ./... green.

Copy link
Copy Markdown
Contributor

Looks good 👍

rafalbromirski merged commit ecee040 into glassnode:main Aug 28, 2026
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL