Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTwitterStream ¶
NewTwitterStream create a new GOTOJS stream implementation that is bound to the twitter API stream using the default "twitter_account.json" configuration file.
Types ¶
type TwitterSource ¶
type TwitterSource struct {
// contains filtered or unexported fields
}
func NewTwitterSource ¶
func NewTwitterSource(account, stream, baseUrl string) (ret *TwitterSource, err error)
NewTwitterSource creates a new stream source based on the given configuration file.
func (*TwitterSource) Close ¶
func (s *TwitterSource) Close()
Close interruptes the source stream. The connection to the twitter API is closed.
func (*TwitterSource) Next ¶
func (s *TwitterSource) Next() (mes Message, err error)
Next fetches the next message from the source stream.
func (*TwitterSource) Start ¶
func (s *TwitterSource) Start() (err error)
Start starts the source stream. A connection to the twitter API is established.
type TwitterStreamConfig ¶
type TwitterStreamConfig struct { ThumbnailMethod string `json:"ThumbnailMethod"` // [api,url,dataurl] ThumbnailSize int `json:"ThumbnailSize"` ThumbnailAPICall string `json:"ThumbnailAPICall"` // "Image/Thumbnail?p=%s&p=%s&p=%s" NudeFilter bool `json:"NudeFilter"` TranscodeWorker int `json:"TranscodeWorker"` TranscodeBuffer int `json:"TranscodeBuffer"` BaseUrl string `json:"BaseUrl"` // "http://localhost:8080/gotojs/" }
func (*TwitterStreamConfig) APIUrl ¶
func (s *TwitterStreamConfig) APIUrl(u string) string
func (*TwitterStreamConfig) JSON ¶
func (s *TwitterStreamConfig) JSON() string
Click to show internal directories.
Click to hide internal directories.