Documentation
¶
Index ¶
- type Client
- func (c *Client) GetUserById(ctx context.Context, id string) (*User, error)
- func (c *Client) GetUserByUsername(ctx context.Context, username string) (*User, error)
- func (c *Client) GetUserTweets(ctx context.Context, userId string, maxResults int) ([]*Tweet, error)
- func (c *Client) SearchRecentUserTweets(ctx context.Context, userId, searchString string, maxResults int) ([]*Tweet, error)
- type PublicMetrics
- type Tweet
- type User
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
}
func (*Client) GetUserById ¶
GetUserById makes a request to the Twitter API and returns the user's information by ID
func (*Client) GetUserByUsername ¶
GetUserByUsername makes a request to the Twitter API and returns the user's information by username
func (*Client) GetUserTweets ¶ added in v1.7.5
func (c *Client) GetUserTweets(ctx context.Context, userId string, maxResults int) ([]*Tweet, error)
GetUserTweets gets tweets for a given user
todo: Doesn't support paging, so only the most recent ones are returned
func (*Client) SearchRecentUserTweets ¶ added in v1.7.5
func (c *Client) SearchRecentUserTweets(ctx context.Context, userId, searchString string, maxResults int) ([]*Tweet, error)
SearchRecentUserTweets searches for tweets made by a user within the last 7 days
todo: Doesn't support paging, so only the most recent ones are returned
type PublicMetrics ¶
type PublicMetrics struct { FollowersCount int `json:"followers_count"` FollowingCount int `json:"following_count"` TweetCount int `json:"tweet_count"` LikeCount int `json:"like_count"` }
PublicMetrics represents the structure for public metrics in the Twitter API response
Click to show internal directories.
Click to hide internal directories.