Documentation ¶
Index ¶
- func CrawlAuthorTweets(author model.TweetAuthor, notifyDone chan<- error)
- func CreateClient(tokenStr string) *twitter.Client
- func GetClient() *twitter.Client
- func GetUser(screenName string) (user *twitter.User, err error)
- type ApplyOffsetHandler
- type GetSingleTweetHandler
- type LatestTweetsHandler
- type NewerTweetsHandler
- type OlderTweetsHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CrawlAuthorTweets ¶
func CrawlAuthorTweets(author model.TweetAuthor, notifyDone chan<- error)
CrawlAuthorTweets traverses the author's timeline(s) and populates the DB with the proper tweets
func CreateClient ¶
CreateClient creates a reusable Twitter client using the given token
Types ¶
type ApplyOffsetHandler ¶
type ApplyOffsetHandler struct{}
ApplyOffsetHandler is a handler that receives two tweets and replaces the first one with newest one after applying an offset to the second one.
func (ApplyOffsetHandler) ServeHTTP ¶
func (h ApplyOffsetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetSingleTweetHandler ¶
type GetSingleTweetHandler struct{}
GetSingleTweetHandler is a handler for retrieving details about a single tweet
func (GetSingleTweetHandler) ServeHTTP ¶
func (h GetSingleTweetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type LatestTweetsHandler ¶
type LatestTweetsHandler struct{}
LatestTweetsHandler is a handler for getting the IDs of the latest presidential tweets
func (LatestTweetsHandler) ServeHTTP ¶
func (h LatestTweetsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type NewerTweetsHandler ¶
type NewerTweetsHandler struct{}
NewerTweetsHandler is a handler that receives two tweets and replaces the older one with the next newest one by the same author.
func (NewerTweetsHandler) ServeHTTP ¶
func (h NewerTweetsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type OlderTweetsHandler ¶
type OlderTweetsHandler struct{}
OlderTweetsHandler is a handler that receives two tweets and replaces the newer one with the next older one by the same author.
func (OlderTweetsHandler) ServeHTTP ¶
func (h OlderTweetsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)