Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-08 14:26:17 +00:00
parent af45cd2894
commit ba04dfd77e
25 changed files with 1104 additions and 904 deletions

View File

@@ -4,12 +4,12 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Nft/api](https
Endpoints:
## Vote
## Assets
Vote to have the NFT api launched faster!
Return a list of NFT assets
[https://m3o.com/nft/api#Vote](https://m3o.com/nft/api#Vote)
[https://m3o.com/nft/api#Assets](https://m3o.com/nft/api#Assets)
```go
package example
@@ -21,11 +21,40 @@ import(
"go.m3o.com/nft"
)
// Vote to have the NFT api launched faster!
func VoteForTheApi() {
// Return a list of NFT assets
func GetAlistOfAssets() {
nftService := nft.NewNftService(os.Getenv("M3O_API_TOKEN"))
rsp, err := nftService.Vote(&nft.VoteRequest{
Message: "Launch it!",
rsp, err := nftService.Assets(&nft.AssetsRequest{
Limit: 1,
})
fmt.Println(rsp, err)
}
```
## Create
Create your own NFT (coming soon)
[https://m3o.com/nft/api#Create](https://m3o.com/nft/api#Create)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/nft"
)
// Create your own NFT (coming soon)
func CreateAnNft() {
nftService := nft.NewNftService(os.Getenv("M3O_API_TOKEN"))
rsp, err := nftService.Create(&nft.CreateRequest{
Description: "The epic monkey island character",
Name: "Guybrush Threepwood",
})
fmt.Println(rsp, err)

View File

@@ -0,0 +1,18 @@
package main
import (
"fmt"
"os"
"go.m3o.com/nft"
)
// Return a list of NFT assets
func main() {
nftService := nft.NewNftService(os.Getenv("M3O_API_TOKEN"))
rsp, err := nftService.Assets(&nft.AssetsRequest{
Limit: 1,
})
fmt.Println(rsp, err)
}

View File

@@ -0,0 +1,19 @@
package main
import (
"fmt"
"os"
"go.m3o.com/nft"
)
// Create your own NFT (coming soon)
func main() {
nftService := nft.NewNftService(os.Getenv("M3O_API_TOKEN"))
rsp, err := nftService.Create(&nft.CreateRequest{
Description: "The epic monkey island character",
Name: "Guybrush Threepwood",
})
fmt.Println(rsp, err)
}