Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reiver/go-nftmeta
Package nftmeta provides tool for working with NFT metadata, for the Go programming language. Especially creating the NFT metadata JSON.
https://github.com/reiver/go-nftmeta
nft nft-metadata nfts
Last synced: about 2 months ago
JSON representation
Package nftmeta provides tool for working with NFT metadata, for the Go programming language. Especially creating the NFT metadata JSON.
- Host: GitHub
- URL: https://github.com/reiver/go-nftmeta
- Owner: reiver
- License: mit
- Created: 2024-06-20T13:34:20.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-06-20T18:15:18.000Z (7 months ago)
- Last Synced: 2024-06-22T06:08:23.229Z (7 months ago)
- Topics: nft, nft-metadata, nfts
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-nftmeta
Package **nftmeta** provides tool for working with **NFT metadata**, for the Go programming language.
Especially creating the NFT metadata JSON.
## Documention
Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-nftmeta
[![GoDoc](https://godoc.org/github.com/reiver/go-nftmeta?status.svg)](https://godoc.org/github.com/reiver/go-nftmeta)
## Example
Here is an example:
```golang
import (
"encoding/json""github.com/reiver/go-nftmeta"
)// ...
var metadata nftmeta.MetaData
metadata.SetExternalLink("http://example.com/token/123")
metadata.SetName("peanut-butter-jelly-time")
metadata.SetYouTubeURL("https://youtu.be/eRBOgtp0Hac")metadata.AppendAttribute( nftmeta.AttributeString("Bread 1", "Peanut Butter") )
metadata.AppendAttribute( nftmeta.AttributeString("Bread 2", "Jelly") )// ...
// 'writer' (below) could be http.ResponseWriter
err := json.NewEncoder(writer).Encode(metadata)```
## Import
To import package **nftmeta** use `import` code like the follownig:
```
import "github.com/reiver/go-nftmeta"
```## Installation
To install package **nftmeta** do the following:
```
GOPROXY=direct go get https://github.com/reiver/go-nftmeta
```## Author
Package **nftmeta** was written by [Charles Iliya Krempeaux](http://reiver.link)