Versions in this module Expand all Collapse all v0 v0.2.4 Apr 15, 2021 v0.2.3 Apr 4, 2019 Changes in this version + func WithAccessCredentials(parent context.Context, creds AccessCredentials) context.Context + type AccessCredentials struct + Secret string + Token string + type Backoff interface + NextWait func() time.Duration + Retries func() int + Waited func() time.Duration + type BoundingBox struct + Coordinates [][][2]float64 + Type string + type Client struct + func NewClient(consumerCreds ConsumerCredentials, accessCreds AccessCredentials, ...) *Client + func (c *Client) CreateFavorite(ctx context.Context, params CreateFavoriteParameters) (*TweetResponse, error) + func (c *Client) DestroyDirectMessage(ctx context.Context, params DestroyDirectMessageParams) (*DirectMessageResponse, error) + func (c *Client) DestroyFavorite(ctx context.Context, params DestroyFavoriteParameters) (*TweetResponse, error) + func (c *Client) DestroyTweet(ctx context.Context, params DestroyTweetParams) (*TweetResponse, error) + func (c *Client) GetConfiguration(ctx context.Context) (*ConfigurationResponse, error) + func (c *Client) GetDirectMessages(ctx context.Context, params GetDirectMessagesParams) (*DirectMessagesResponse, error) + func (c *Client) GetLanguages(ctx context.Context) (*LanguagesResponse, error) + func (c *Client) GetPrivacy(ctx context.Context) (*PrivacyResponse, error) + func (c *Client) GetTOS(ctx context.Context) (*TOSResponse, error) + func (c *Client) GetTotalPostInsights(ctx context.Context, params PostInsightsParams) (*PostInsightsResponse, error) + func (c *Client) HomeTimeline(ctx context.Context, params HomeTimelineParams) (*TweetsResponse, error) + func (c *Client) ListFavorites(ctx context.Context, params ListFavoritesParams) (*TweetsResponse, error) + func (c *Client) Lookup(ctx context.Context, params LookupParams) (*TweetsResponse, error) + func (c *Client) LookupFriendships(ctx context.Context, params LookupFriendshipsParams) (*FriendshipLookupResponse, error) + func (c *Client) LookupUsers(ctx context.Context, params LookupUsersParams) (*UsersResponse, error) + func (c *Client) MediaUpload(ctx context.Context, params MediaUploadParameters) (*MediaUploadResponse, error) + func (c *Client) MentionsTimeline(ctx context.Context, params MentionsTimelineParams) (*TweetsResponse, error) + func (c *Client) NewDirectMessage(ctx context.Context, params NewDirectMessageParams) (*DirectMessageResponse, error) + func (c *Client) OEmbed(ctx context.Context, params OEmbedParams) (*OEmbedResponse, error) + func (c *Client) RateLimitStatus(ctx context.Context, resources []string) (*RateLimitStatusResponse, error) + func (c *Client) Retweet(ctx context.Context, params RetweetParams) (*TweetResponse, error) + func (c *Client) RetweeterIDs(ctx context.Context, params RetweeterIDsParams) (*IDsResponse, error) + func (c *Client) RetweetsOfMe(ctx context.Context, params RetweetsOfMeParams) (*TweetsResponse, error) + func (c *Client) RetweetsOfTweet(ctx context.Context, params RetweetsOfTweetParams) (*TweetsResponse, error) + func (c *Client) SearchTweets(ctx context.Context, params SearchTweetsParams) (*TweetsResponse, error) + func (c *Client) SearchUsers(ctx context.Context, params SearchUsersParams) (*UsersResponse, error) + func (c *Client) SentDirectMessages(ctx context.Context, params SentDirectMessagesParams) (*DirectMessagesResponse, error) + func (c *Client) ShowDirectMessage(ctx context.Context, id string) (*DirectMessageResponse, error) + func (c *Client) ShowFriendships(ctx context.Context, params ShowFriendshipsParameters) (*FriendshipResponse, error) + func (c *Client) ShowTweet(ctx context.Context, params ShowTweetParams) (*TweetResponse, error) + func (c *Client) ShowUser(ctx context.Context, params ShowUserParams) (*UserResponse, error) + func (c *Client) StartFilterStream(ctx context.Context, params StreamFilterParams, errFn StreamErrFn) *Stream + func (c *Client) Unretweet(ctx context.Context, params UnretweetParams) (*TweetResponse, error) + func (c *Client) UpdateTweet(ctx context.Context, params UpdateTweetParams) (*TweetResponse, error) + func (c *Client) UserTimeline(ctx context.Context, params UserTimelineParams) (*TweetsResponse, error) + func (c *Client) WithGzipDisabled() *Client + type Configuration struct + CharactersReservedPerMedia int + DMTextCharacterLimit int + MaxMediaPerUpload int + NonUsernamePaths []string + PhotoSizeLimit int + PhotoSizes map[string]PhotoSize + ShortURLLength int + ShortURLLengthHTTPS int + type ConfigurationResponse struct + Configuration Configuration + RateLimit RateLimit + type ConsumerCredentials struct + Key string + Secret string + type Contributor struct + ID int64 + IDStr string + ScreenName string + type Coordinates struct + Coordinates [2]float64 + Type string + type CreateFavoriteParameters struct + ExcludeEntities bool + ID string + type DeleteMessage struct + Status struct{ ... } + type DestroyDirectMessageParams struct + ExcludeEntities bool + ID string + type DestroyFavoriteParameters struct + ExcludeEntities bool + ID string + type DestroyTweetParams struct + ID string + TrimUser bool + type DirectMessage struct + CreatedAt string + Entities Entities + ID int64 + IDStr string + Recipient User + RecipientID int64 + RecipientScreenName string + Sender User + SenderID int64 + SenderScreenName string + Text string + type DirectMessageResponse struct + DirectMessage DirectMessage + RateLimit RateLimit + type DirectMessagesResponse struct + DirectMessages []DirectMessage + RateLimit RateLimit + type DisconnectMessage struct + Code int + Reason string + StreamName string + type Entities struct + Hashtags []HashtagEntity + Media []MediaEntity + URL URLEntities + URLs []URLEntity + UserMentions []UserMentionEntity + type Error struct + Code int + Message string + type Errors struct + Errors []Error + HTTPCode int + func (e *Errors) Error() string + type ExtendedEntities struct + Media []MediaEntity + type ExtendedTweet struct + DisplayTextRange []int + Entities Entities + ExtendedEntities ExtendedEntities + FullText string + type Friendship struct + Relationship Relationship + type FriendshipLookup struct + Connections []string + ID int64 + IDStr string + Name string + ScreenName string + type FriendshipLookupResponse struct + FriendshipLookup []FriendshipLookup + RateLimit RateLimit + type FriendshipResponse struct + Friendship Friendship + RateLimit RateLimit + type GetDirectMessagesParams struct + Count int + ExcludeEntities bool + MaxID string + SinceID string + SkipStatus bool + type HTTPClient interface + Do func(*http.Request) (*http.Response, error) + type HTTPMock struct + DoFn func(req *http.Request) (*http.Response, error) + func (h *HTTPMock) Do(req *http.Request) (*http.Response, error) + type HashtagEntity struct + Indices []int + Text string + type HomeTimelineParams struct + ContributorDetails bool + Count int + ExcludeEntities bool + ExcludeReplies bool + MaxID string + SinceID string + TrimUser bool + type IDs struct + IDs []string + NextCursor int64 + NextCursorStr string + PreviousCursor int64 + PreviousCursotStr string + type IDsResponse struct + IDs IDs + RateLimit RateLimit + type Image struct + H int + ImageType string + W int + type InsightsData map[string]TweetIDs + type Language struct + Code string + Name string + Status string + type LanguagesResponse struct + Languages []Language + RateLimit RateLimit + type LimitMessage struct + Track int + type ListFavoritesParams struct + Count int + ExcludeEntities bool + MaxID string + ScreenName string + SinceID string + UserID string + type Location struct + Lat float64 + Long float64 + type LookupFriendshipsParams struct + ScreenName []string + UserID []string + type LookupParams struct + ExcludeEntities bool + IDs []string + Map bool + TrimUser bool + type LookupUsersParams struct + ExcludeEntities bool + ScreenName []string + UserID []string + type MediaEntity struct + DisplayURL string + ExpandedURL string + ID int64 + IDStr string + Indices []int + MediaURL string + MediaURLHTTPS string + Sizes MediaSizes + SourceStatusID int64 + SourceStatusIDStr string + Type string + URL string + VideoInfo VideoInfo + type MediaInsights struct + Engagements string + Favourites string + Impressions string + Replies string + Retweets string + VideoViews string + type MediaSize struct + Height int + Resize string + Width int + type MediaSizes struct + Large MediaSize + Medium MediaSize + Small MediaSize + Thumb MediaSize + type MediaUpload struct + ExpiresAfterSecs int + Image Image + MediaID int64 + MediaIDString string + Size int + Video Video + type MediaUploadParameters struct + AdditionalOwners []string + Command string + Media []byte + MediaCategory string + MediaData string + MediaID string + MediaType string + SegmentIndex int + TotalBytes int + type MediaUploadResponse struct + Media MediaUpload + RateLimit RateLimit + type MentionsTimelineParams struct + ContributorDetails bool + Count int + ExcludeEntities bool + MaxID string + SinceID string + TrimUser bool + type NewDirectMessageParams struct + ScreenName string + Text string + UserID string + type OEmbed struct + AuthorName string + AuthorURL string + CacheAge string + HTML string + Height *int + ProviderName string + ProviderURL string + Type string + URL string + Version string + Width *int + type OEmbedParams struct + Align string + HideMedia bool + HideThread bool + HideTweet bool + Lang string + MaxWidth int + OmitScript bool + Related []string + URL string + WidgetType string + type OEmbedResponse struct + OEmbed OEmbed + RateLimit RateLimit + type PhotoSize struct + H int + Resize string + W int + type Place struct + Attributes map[string]string + BoundingBox BoundingBox + Country string + CountryCode string + FullName string + ID string + Name string + PlaceType string + URL string + type PostInsightsParams struct + PostIDs []string + type PostInsightsResponse struct + Insights InsightsData + RateLimit RateLimit + type PrivacyResponse struct + Privacy map[string]string + RateLimit RateLimit + type RateLimit struct + Limit int + Remaining int + Reset int + type RateLimitStatusResponse struct + RateLimit RateLimit + RateLimitsRes RateLimitsRes + type RateLimitsRes struct + RateLimitContext struct{ ... } + Resources struct{ ... } + type Relationship struct + Source RelationshipTarget + Target RelationshipTarget + type RelationshipTarget struct + FollowedBy bool + Following bool + ID int64 + IDStr string + ScreenName string + type RetweetParams struct + ID string + TrimUser bool + type RetweeterIDsParams struct + Cursor string + ID string + type RetweetsOfMeParams struct + Count int + ExcludeEntities bool + ExcludeUserEntities bool + MaxID string + SinceID string + TrimUser bool + type RetweetsOfTweetParams struct + Count int + ID string + TrimUser bool + type ScrubGeoMessage struct + UpToStatusID int64 + UpToStatusIDStr string + UserID int64 + UserIDStr string + type SearchTweetsParams struct + Callback string + Count int + ExcludeEntities bool + ExtendedEntities bool + Geocode string + Lang string + Locale string + MaxID string + Query string + ResultType string + SinceID string + Until string + type SearchUsersParams struct + Count int + ExcludeEntities bool + Page int + Q string + type SentDirectMessagesParams struct + Count int + ExcludeEntities bool + MaxID string + Page int + SinceID string + type ShowFriendshipsParameters struct + SourceID string + SourceScreenName string + TargetID string + TargetScreenName string + type ShowTweetParams struct + ExcludeEntities bool + ExtendedTweet bool + ID string + IncludeMyRetweet bool + TrimUser bool + type ShowUserParams struct + ExcludeEntities bool + ScreenName string + UserID string + type StatusWithheldMessage struct + ID int64 + UserID int64 + WithheldInCountries []string + type Stream struct + func (s *Stream) Close() error + func (s *Stream) Done() <-chan struct{} + func (s *Stream) Err() error + func (s *Stream) Messages() <-chan StreamMessage + type StreamErrFn func(Backoff, error) error + type StreamFilterParams struct + FilterLevel string + Follow []string + Language []string + Locations []string + StallWarnings bool + Track []string + type StreamMessage struct + Delete *DeleteMessage + Disconnect *DisconnectMessage + Limit *LimitMessage + ScrubGeo *ScrubGeoMessage + StatusWithheld *StatusWithheldMessage + UserWithheld *UserWithheldMessage + type TOSResponse struct + RateLimit RateLimit + TOS map[string]string + type Tweet struct + Contributor []Contributor + Coordinates *Coordinates + CreatedAt string + Entities Entities + ExtendedEntities ExtendedEntities + ExtendedTweet *ExtendedTweet + FavoriteCount int + Favorited bool + FilterLevel string + FullText string + ID int64 + IDStr string + InReplyToScreenName string + InReplyToStatusID int64 + InReplyToStatusIDStr string + InReplyToUserID int64 + InReplyToUserIDStr string + Lang string + Place *Place + PossiblySensitive bool + QuotedStatus *Tweet + QuotedStatusID int64 + QuotedStatusIDStr string + RetweetCount int + Retweeted bool + RetweetedStatus *Tweet + Scopes map[string]interface{} + Source string + Text string + Truncated bool + User User + WithheldCopyright bool + WithheldInCountries []string + WithheldScope string + func (t *Tweet) CreatedAtTime() (time.Time, error) + type TweetIDs map[string]MediaInsights + type TweetResponse struct + RateLimit RateLimit + Tweet Tweet + type TweetsResponse struct + RateLimit RateLimit + Tweets []Tweet + type URLEntities struct + URLs []URLEntity + type URLEntity struct + DisplayURL string + ExpandedURL string + Indices []int + URL string + type UnretweetParams struct + ID string + TrimUser bool + type UpdateTweetParams struct + DisplayCoordinates bool + InReplyToStatusID string + Location *Location + MediaIDs []string + PlaceID string + PossiblySensitive bool + Status string + TrimUser bool + type User struct + ContributorsEnabled bool + CreatedAt string + DefaultProfile bool + DefaultProfileImage bool + Description string + Entities Entities + FavouritesCount int + FollowRequestSent bool + FollowersCount int + Following bool + FriendsCount int + GeoEnabled bool + ID int64 + IDStr string + IsTranslator bool + Lang string + ListedCount int + Location string + Name string + Notifications bool + ProfileBackgroundColor string + ProfileBackgroundImageURL string + ProfileBackgroundImageURLHTTPS string + ProfileBackgroundTile bool + ProfileBannerURL string + ProfileImageURL string + ProfileImageURLHTTPS string + ProfileLinkColor string + ProfileSidebarBorderColor string + ProfileSidebarFillColor string + ProfileTextColor string + ProfileUseBackgroundImage bool + Protected bool + ScreenName string + ShowAllInlineMedia bool + Status *Tweet + StatusesCount int + TimeZone string + URL string + UTCOffset int + Verified bool + WithheldInCountries string + WithheldScope string + type UserMentionEntity struct + ID int64 + IDStr string + Indices []int + Name string + ScreenName string + type UserResponse struct + RateLimit RateLimit + User User + type UserTimelineParams struct + ContributorDetails bool + Count int + ExcludeRTS bool + ExcludeReplies bool + MaxID string + ScreenName string + SinceID string + TrimUser bool + UserID string + type UserWithheldMessage struct + ID int64 + WithheldInCountries []string + type UsersResponse struct + RateLimit RateLimit + Users []User + type Video struct + VideoType string + type VideoInfo struct + AspectRatio []int + DurationMillis int + Variants []VideoVariant + type VideoVariant struct + Bitrate int + ContentType string + URL string