Documentation ¶
Index ¶
- func AddStreamRules(ctx context.Context, addRules []*gotwtr.AddRule) (*gotwtr.AddOrDeleteRulesResponse, error)
- func DeleteStreamRules(ctx context.Context, deleteRuleIDs []string) (*gotwtr.AddOrDeleteRulesResponse, error)
- func FetchStreamRules(ctx context.Context) (*gotwtr.RetrieveStreamRulesResponse, error)
- type ConnectToStreamOption
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddStreamRules ¶
func DeleteStreamRules ¶
func FetchStreamRules ¶
func FetchStreamRules(ctx context.Context) (*gotwtr.RetrieveStreamRulesResponse, error)
Types ¶
type ConnectToStreamOption ¶
type ConnectToStreamOption struct { Expansions []gotwtr.Expansion MediaFields []gotwtr.MediaField PlaceFields []gotwtr.PlaceField PollFields []gotwtr.PollField TweetFields []gotwtr.TweetField UserFields []gotwtr.UserField }
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func NewStream ¶
func NewStream(tweets chan<- *gotwtr.ConnectToStreamResponse, opt ...*ConnectToStreamOption) (*Stream, error)
func (*Stream) StartWithAutoReconnect ¶
StartWithAutoReconnect connects to stream, and reconnects to the stream as long as no errors are caught. Blocks on success.
Click to show internal directories.
Click to hide internal directories.