Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UserFirstTweetDate ¶
UserFirstTweetDate returns the date of the user first tweet.
Types ¶
type ArchiveResponse ¶
type ArchiveResponse []struct { Source string `json:"source"` IDStr string `json:"id_str"` Text string `json:"text"` CreatedAt string `json:"created_at"` RetweetCount int64 `json:"retweet_count"` InReplyToUserIDStr *string `json:"in_reply_to_user_id_str"` FavoriteCount int64 `json:"favorite_count"` IsRetweet bool `json:"is_retweet"` }
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector represents a collector of tweets.
func NewCollector ¶
NewCollector returns new collector.
func (*Collector) CollectOverTime ¶
func (col *Collector) CollectOverTime(ctx context.Context) MessageStream
CollectOverTime collects tweets over time.
func (*Collector) CollectTweets ¶
func (col *Collector) CollectTweets() (ArchiveResponse, error)
CollectTweets collects and returns tweets.
type Config ¶
type Config struct { // CollectPastYearsTweets will make the collector to collect past year tweets too. CollectPastYearsTweets bool CollectingInterval time.Duration }
Config represents collector configuration.
type Message ¶
type Message struct { Err error Tweets ArchiveResponse }
type MessageStream ¶
type MessageStream chan Message
Click to show internal directories.
Click to hide internal directories.