osstreamwatcher

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const StreamAPIEndpoint = "wss://stream.openseabeta.com/socket"

Variables

This section is empty.

Functions

This section is empty.

Types

type OSStreamWatcher

type OSStreamWatcher struct {
	QueueListings chan *models.ItemListedEvent
	// contains filtered or unexported fields
}

func NewStreamWatcher

func NewStreamWatcher(token string, onError func(error)) *OSStreamWatcher

func (*OSStreamWatcher) Connect

func (s *OSStreamWatcher) Connect() error

func (*OSStreamWatcher) Disconnect

func (s *OSStreamWatcher) Disconnect() error

func (*OSStreamWatcher) OnItemListed

func (s *OSStreamWatcher) OnItemListed(collectionSlug string, eventHandler func(itemListedEvent any))

func (*OSStreamWatcher) OnItemMetadataUpdated

func (s *OSStreamWatcher) OnItemMetadataUpdated(collectionSlug string, eventHandler func(itemMetadataUpdatedEvent any))

func (*OSStreamWatcher) OnItemReceivedBid

func (s *OSStreamWatcher) OnItemReceivedBid(collectionSlug string, eventHandler func(itemReceivedBidEvent any))

func (*OSStreamWatcher) OnItemReceivedOffer

func (s *OSStreamWatcher) OnItemReceivedOffer(collectionSlug string, eventHandler func(itemReceivedOfferEvent any))

func (*OSStreamWatcher) SubscribeToListingsFor

func (s *OSStreamWatcher) SubscribeToListingsFor(slug string)

type StreamEventType

type StreamEventType string
const (
	Listed          StreamEventType = "item_listed"
	ReceivedOffer   StreamEventType = "item_received_offer"
	ReceivedBid     StreamEventType = "item_received_bid"
	MetadataUpdated StreamEventType = "item_metadata_updated"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL