Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains state that allows stats to be fetched about a list of Twitter users
func NewClient ¶
NewClient creates a new twitterstats client that contains an OAuth2 HTTP client which can be used
func (*Client) GetStats ¶
func (client *Client) GetStats() []TwitterStats
GetStats Returns a slice of `TwitterStats` structs for each username in `client.screenNames` in the same order of `client.screenNames`
func (*Client) GetStatsForUser ¶
func (client *Client) GetStatsForUser(username string) TwitterStats
GetStatsForUser Fetches stats for a single user. If there is an error fetching or parsing the response from the Twitter API, an empty stats struct will be returned.
type TwitterStats ¶
type TwitterStats struct { FollowerCount int64 `json:"followers_count"` TweetCount int64 `json:"statuses_count"` }
TwitterStats Represents a stats snapshot for a single Twitter user at a point in time
Click to show internal directories.
Click to hide internal directories.