Documentation ¶
Index ¶
Constants ¶
View Source
const AssetLimit = 50
View Source
const CollectionLimit = 300
Variables ¶
View Source
var BaseURLs = map[uint64]string{
1: "https://api.opensea.io/api/v1",
4: "https://rinkeby-api.opensea.io/api/v1",
5: "https://testnets-api.opensea.io/api/v1",
}
View Source
var OpenseaClientInstances = make(map[uint64]*Client)
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` Permalink string `json:"permalink"` ImageThumbnailURL string `json:"image_thumbnail_url"` ImageURL string `json:"image_url"` Contract Contract `json:"asset_contract"` Collection AssetCollection `json:"collection"` Traits []Trait `json:"traits"` LastSale LastSale `json:"last_sale"` SellOrders []SellOrder `json:"sell_orders"` BackgroundColor string `json:"background_color"` }
type AssetCollection ¶
type AssetCollection struct {
Name string `json:"name"`
}
type AssetContainer ¶
type AssetContainer struct {
Assets []Asset `json:"assets"`
}
type Client ¶
type Client struct { IsConnected bool LastCheckedAt int64 IsConnectedLock sync.RWMutex // contains filtered or unexported fields }
func NewOpenseaClient ¶
new opensea client.
func (*Client) FetchAllAssetsByOwnerAndCollection ¶
func (*Client) FetchAllCollectionsByOwner ¶
func (o *Client) FetchAllCollectionsByOwner(owner common.Address) ([]Collection, error)
type Collection ¶
type CollectionTrait ¶
type LastSale ¶
type LastSale struct {
PaymentToken PaymentToken `json:"payment_token"`
}
type PaymentToken ¶
type Trait ¶
type Trait struct { TraitType string `json:"trait_type"` Value TraitValue `json:"value"` DisplayType string `json:"display_type"` MaxValue string `json:"max_value"` }
type TraitValue ¶
type TraitValue string
func (*TraitValue) UnmarshalJSON ¶
func (st *TraitValue) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.