Documentation
¶
Index ¶
- Constants
- type Account
- type CollectionsResp
- type ContractResp
- type HardCodeCollection
- type OpenSeaFilterCollections
- type OpenseaGetCollectionStats
- type OpenseaGetCollectionStatsTotal
- type OpenseaGetContract
- type OpenseaService
- func (s *OpenseaService) AdditionBaseCollections() map[string]HardCodeCollection
- func (s *OpenseaService) FindHardCodeCollectionByAddress(address string) *HardCodeCollection
- func (s *OpenseaService) GetProfileAvatar(addr string) (string, error)
- func (s *OpenseaService) IsInAdditionalCollections(slug string) *HardCodeCollection
- func (s *OpenseaService) OpenseaGetCollections(ctx context.Context, f OpenSeaFilterCollections) (*CollectionsResp, error)
- func (s *OpenseaService) OpenseaGetContract(ctx context.Context, address string, chain string) (*OpenseaGetContract, error)
- func (s *OpenseaService) OpenseaGetSingleCollection(ctx context.Context, collectionSlug string) (*SingleCollectionResp, error)
- type SingleCollectionResp
- type User
Constants ¶
View Source
const (
API_URL string = "https://api.opensea.io/api"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionsResp ¶
type CollectionsResp struct { Collections []SingleCollectionResp `json:"collections"` Next string `json:"next"` }
type ContractResp ¶
type HardCodeCollection ¶
type OpenSeaFilterCollections ¶
type OpenSeaFilterCollections struct { Chain string CreatorUsername string IncludeHidden *bool Limit int //The number of collections to return. Must be between 1 and 100. Default: 100 Next string //The cursor for the next page of results. This is returned from a previous request. OrderBy string Inscription *bool }
type OpenseaGetCollectionStats ¶
type OpenseaGetCollectionStats struct {
Total OpenseaGetCollectionStatsTotal `json:"total"`
}
type OpenseaGetCollectionStatsTotal ¶
type OpenseaGetCollectionStatsTotal struct {
FloorPrice interface{} `json:"floor_price"`
}
type OpenseaGetContract ¶
type OpenseaService ¶
type OpenseaService struct {
// contains filtered or unexported fields
}
func NewOpensea ¶
func NewOpensea(apiKey string) *OpenseaService
func (*OpenseaService) AdditionBaseCollections ¶
func (s *OpenseaService) AdditionBaseCollections() map[string]HardCodeCollection
func (*OpenseaService) FindHardCodeCollectionByAddress ¶
func (s *OpenseaService) FindHardCodeCollectionByAddress(address string) *HardCodeCollection
func (*OpenseaService) GetProfileAvatar ¶
func (s *OpenseaService) GetProfileAvatar(addr string) (string, error)
func (*OpenseaService) IsInAdditionalCollections ¶
func (s *OpenseaService) IsInAdditionalCollections(slug string) *HardCodeCollection
func (*OpenseaService) OpenseaGetCollections ¶
func (s *OpenseaService) OpenseaGetCollections(ctx context.Context, f OpenSeaFilterCollections) (*CollectionsResp, error)
func (*OpenseaService) OpenseaGetContract ¶
func (s *OpenseaService) OpenseaGetContract(ctx context.Context, address string, chain string) (*OpenseaGetContract, error)
func (*OpenseaService) OpenseaGetSingleCollection ¶
func (s *OpenseaService) OpenseaGetSingleCollection(ctx context.Context, collectionSlug string) (*SingleCollectionResp, error)
type SingleCollectionResp ¶
type SingleCollectionResp struct { Collection string `json:"collection"` Name string `json:"name"` Description string `json:"description"` ImageUrl string `json:"image_url"` BannerImageUrl string `json:"banner_image_url"` Owner string `json:"owner"` SafelistStatus string `json:"safelist_status"` Category string `json:"category"` IsDisabled bool `json:"is_disabled"` IsNsfw bool `json:"is_nsfw"` TraitOffersEnabled bool `json:"trait_offers_enabled"` CollectionOffersEnabled bool `json:"collection_offers_enabled"` OpenseaUrl string `json:"opensea_url"` ProjectUrl string `json:"project_url"` WikiUrl string `json:"wiki_url"` DiscordUrl string `json:"discord_url"` TelegramUrl string `json:"telegram_url"` TwitterUsername string `json:"twitter_username"` InstagramUsername string `json:"instagram_username"` Chain string `json:"chain"` Contracts []ContractResp `json:"contracts"` }
Click to show internal directories.
Click to hide internal directories.