Documentation
¶
Index ¶
Constants ¶
const API_V1 = "https://api.twitter.com/1.1/"
const API_V2 = "https://api.twitter.com/2/"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// Twitter API Services
Tweets *TweetService
// contains filtered or unexported fields
}
Client is a Twitter client for making Twitter API requests.
type PostTweetParams ¶ added in v0.0.2
type PostTweetParams struct {
DirectMessageDeepLink string `json:"direct_message_deep_link,omitempty"`
ForSuperFollowersOnly bool `json:"for_super_followers_only,omitempty"`
QuoteTweetId string `json:"quote_tweet_id,omitempty"`
Text string `json:"text,omitempty"`
}
StatusUpdateParams are the parameters for StatusService.Update
type ReplySetting ¶ added in v0.0.2
type ReplySetting string
const ( MentionedUsers ReplySetting = "mentionedUsers" Following ReplySetting = "following" )
type Tweet ¶
type Tweet struct {
ID string `json:"id"`
Text string `json:"text"`
AuthorID string `json:"author_id"`
ConversationID string `json:"conversation_id"`
CreatedAt string `json:"created_at"`
InReplyToUserID string `json:"in_reply_to_user_id"`
}
Tweet represents a Twitter Tweet, previously called a status. I added the fields in use now, more fields will be added as functionality increases https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet
type TweetGeoObj ¶ added in v0.0.2
type TweetGeoObj struct {
PlaceId string `json:"place_id,omitempty"`
}
type TweetMedia ¶ added in v0.0.2
type TweetReply ¶ added in v0.0.2
type TweetService ¶ added in v0.0.2
type TweetService struct {
// contains filtered or unexported fields
}
TweetService provides methods for accessing Twitter status API endpoints.
func (*TweetService) PostTweet ¶ added in v0.0.2
func (s *TweetService) PostTweet(text string, params *PostTweetParams) (*Tweet, *http.Response, error)
Post tweet makes a new tweet. Requires a user auth context. https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-update