2. Get Data
Overview
Examples of obtained data types commonly include:
Account
Get account details by account name
Example
package main
import (
"fmt"
"github.com/Zecrey-Labs/zecrey-marketplace-go-sdk/sdk"
)
func main() {
accountName := "Alice"
accountInfo, err := sdk.GetAccountByAccountName(accountName)
if err != nil { panic(err) }
data, _:= json.Marshal(accountInfo)
fmt.Println(string(data))
}Example result
{
account:
{
"id":17,
"account_index":14,
"account_name":"Alice",
"bio":"name:Alice age:18 city:New York ",
"email":"[email protected]",
"external_link":"https://alice.xyz",
"twitter_link":"https://twitter.com/alice",
"instagram_link":"https://www.instagram.com/alice/",
"profile_image":"https://res.cloudinary.com/zecrey/image/upload/collection/ahykviwc0suhoyzusb5q.jpg",
"profile_thumb":"https://res.cloudinary.com/zecrey/image/upload/collection/ioy2wcqupbgnuqvdtjfx.jpg",
"banner_image":"https://res.cloudinary.com/zecrey/image/upload/collection/ljvwvjho9ucs5gpwmlkf.jpg",
"banner_thumb":"https://res.cloudinary.com/zecrey/image/upload/collection/lo3vtlrcslcr1n7tgiuh.jpg",
"created_at":1667835867
}
}Get assets by account name
Get assets information
Get account index
Get account registration status
Category
Get NFT categories
Collections
Get collections of an account by account index
Get collection details by ID
NFT
Get NFTs of an account
Get NFT details by ID
Offers
Get offers of an account
Get NFT Offers
Get offer details by ID
Get details about NFT listings and offers
Last updated
Was this helpful?