Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2022-03-09 08:54:14 +00:00
parent eeced0f4bc
commit 041b4ef27d
32 changed files with 1579 additions and 1579 deletions

View File

@@ -4,6 +4,61 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/nft/api](https
Endpoints:
## Asset
Get a single asset by the contract
[https://m3o.com/nft/api#Asset](https://m3o.com/nft/api#Asset)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/nft"
)
// Get a single asset by the contract
func GetAsingleAsset() {
nftService := nft.NewNftService(os.Getenv("M3O_API_TOKEN"))
rsp, err := nftService.Asset(&nft.AssetRequest{
})
fmt.Println(rsp, err)
}
```
## Collection
Get a collection by its slug
[https://m3o.com/nft/api#Collection](https://m3o.com/nft/api#Collection)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/nft"
)
// Get a collection by its slug
func GetAsingleCollection() {
nftService := nft.NewNftService(os.Getenv("M3O_API_TOKEN"))
rsp, err := nftService.Collection(&nft.CollectionRequest{
Slug: "doodles-official",
})
fmt.Println(rsp, err)
}
```
## Assets
Return a list of assets
@@ -89,58 +144,3 @@ func ListCollections() {
}
```
## Asset
[https://m3o.com/nft/api#Asset](https://m3o.com/nft/api#Asset)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/nft"
)
//
func GetAsingleAsset() {
nftService := nft.NewNftService(os.Getenv("M3O_API_TOKEN"))
rsp, err := nftService.Asset(&nft.AssetRequest{
})
fmt.Println(rsp, err)
}
```
## Collection
[https://m3o.com/nft/api#Collection](https://m3o.com/nft/api#Collection)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/nft"
)
//
func GetAsingleCollection() {
nftService := nft.NewNftService(os.Getenv("M3O_API_TOKEN"))
rsp, err := nftService.Collection(&nft.CollectionRequest{
Slug: "doodles-official",
})
fmt.Println(rsp, err)
}
```

View File

@@ -7,7 +7,7 @@ import (
"go.m3o.com/nft"
)
//
// Get a single asset by the contract
func main() {
nftService := nft.NewNftService(os.Getenv("M3O_API_TOKEN"))
rsp, err := nftService.Asset(&nft.AssetRequest{})

View File

@@ -7,7 +7,7 @@ import (
"go.m3o.com/nft"
)
//
// Get a collection by its slug
func main() {
nftService := nft.NewNftService(os.Getenv("M3O_API_TOKEN"))
rsp, err := nftService.Collection(&nft.CollectionRequest{