mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-19 14:05:23 +00:00
NFT asset and collection endpoints (#389)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package domain
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
type AssetsResponse struct {
|
||||
Assets []*Asset `json:"assets"`
|
||||
}
|
||||
@@ -8,6 +10,10 @@ type CollectionsResponse struct {
|
||||
Collections []*Collection `json:"collections"`
|
||||
}
|
||||
|
||||
type CollectionResponse struct {
|
||||
Collection *Collection `json:"collection"`
|
||||
}
|
||||
|
||||
type Asset struct {
|
||||
Id int32 `json:"id"`
|
||||
TokenId string `json:"token_id"`
|
||||
@@ -23,6 +29,8 @@ type Asset struct {
|
||||
LastSale *Sale `json:"last_sale,omitempty"`
|
||||
Presale bool `json:"is_presale"`
|
||||
ListingDate string `json:"listing_date,omitempty"`
|
||||
|
||||
Traits []map[string]interface{} `json:"traits,omitempty"`
|
||||
}
|
||||
|
||||
type Contract struct {
|
||||
@@ -55,6 +63,16 @@ type Collection struct {
|
||||
ImageUrl string `json:"image_url,omitempty"`
|
||||
CreatedAt string `json:"created_date,omitempty"`
|
||||
PayoutAddress string `json:"payout_address,omitempty"`
|
||||
|
||||
ExternalLink string `json:"external_link,omitempty"`
|
||||
BannerImageUrl string `json:"banner_image_url,omitempty"`
|
||||
DevSellerFeeBasisPoints string `json:"dev_seller_fee_basis_points,omitempty"`
|
||||
SafelistRequestStatus string `json:"safelist_request_status,omitempty"`
|
||||
PrimaryAssetContracts []Contract `json:"primary_asset_contracts,omitempty"`
|
||||
Traits map[string]interface{} `json:"traits,omitempty"`
|
||||
PaymentTokens []Token `json:"payment_tokens,omitempty"`
|
||||
Editors []string `json:"editors,omitempty"`
|
||||
Stats map[string]interface{} `json:"stats,omitempty"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
@@ -95,12 +113,12 @@ type Transaction struct {
|
||||
}
|
||||
|
||||
type Token struct {
|
||||
Id int32 `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Symbol string `json:"symbol,omitempty"`
|
||||
Address string `json:"address,omitempty"`
|
||||
ImageUrl string `json:"image_url,omitempty"`
|
||||
Decimals int32 `json:"decimals,omitempty"`
|
||||
EthPrice string `json:"eth_price,omitempty"`
|
||||
UsdPrice string `json:"usd_price,omitempty"`
|
||||
Id int32 `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Symbol string `json:"symbol,omitempty"`
|
||||
Address string `json:"address,omitempty"`
|
||||
ImageUrl string `json:"image_url,omitempty"`
|
||||
Decimals int32 `json:"decimals,omitempty"`
|
||||
EthPrice json.Number `json:"eth_price,omitempty"`
|
||||
UsdPrice json.Number `json:"usd_price,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user