Documentation
¶
Index ¶
- type AdditionalTweetMetadata
- 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, nextToken *string) ([]*Tweet, *string, error)
- func (c *Client) SearchRecentTweets(ctx context.Context, searchString string, maxResults int, nextToken *string) ([]*Tweet, *string, error)
- type PublicMetrics
- type Tweet
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalTweetMetadata ¶ added in v1.8.0
type AdditionalTweetMetadata struct {
Author *User
}
AdditionalTweetMetadata adds additinal metadata to a tweet that isn't directly represented in the Twitter API response
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
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
type Tweet ¶ added in v1.7.5
type Tweet struct { ID string `json:"id"` Text string `json:"text"` AuthorID *string `json:"author_id"` AdditionalMetadata AdditionalTweetMetadata }
Tweet represents the structure for a tweet in the Twitter API response
type User ¶
type User struct { ID string `json:"id"` Username string `json:"username"` Name string `json:"name"` VerifiedType string `json:"verified_type"` ProfileImageUrl string `json:"profile_image_url"` PublicMetrics PublicMetrics `json:"public_metrics"` }
User represents the structure for a user in the Twitter API response
Click to show internal directories.
Click to hide internal directories.