Documentation ¶
Index ¶
- Constants
- Variables
- type AddTweetBookmarkResponse
- type Authorizer
- type Client
- func (c *Client) AddListMember(ctx context.Context, listID, userID string) (*ListAddMemberResponse, error)
- func (c *Client) AddTweetBookmark(ctx context.Context, userID, tweetID string) (*AddTweetBookmarkResponse, error)
- func (c *Client) AuthUserLookup(ctx context.Context, opts UserLookupOpts) (*UserLookupResponse, error)
- func (c *Client) ComplianceBatchJob(ctx context.Context, id string) (*ComplianceBatchJobResponse, error)
- func (c *Client) ComplianceBatchJobLookup(ctx context.Context, jobType ComplianceBatchJobType, ...) (*ComplianceBatchJobLookupResponse, error)
- func (c *Client) CreateComplianceBatchJob(ctx context.Context, jobType ComplianceBatchJobType, ...) (*CreateComplianceBatchJobResponse, error)
- func (c *Client) CreateList(ctx context.Context, list ListMetaData) (*ListCreateResponse, error)
- func (c *Client) CreateTweet(ctx context.Context, tweet CreateTweetRequest) (*CreateTweetResponse, error)
- func (c *Client) DeleteList(ctx context.Context, listID string) (*ListDeleteResponse, error)
- func (c *Client) DeleteTweet(ctx context.Context, id string) (*DeleteTweetResponse, error)
- func (c *Client) DeleteUserBlocks(ctx context.Context, userID, targetUserID string) (*UserDeleteBlocksResponse, error)
- func (c *Client) DeleteUserFollows(ctx context.Context, userID, targetUserID string) (*UserDeleteFollowsResponse, error)
- func (c *Client) DeleteUserLikes(ctx context.Context, userID, tweetID string) (*DeleteUserLikesResponse, error)
- func (c *Client) DeleteUserMutes(ctx context.Context, userID, targetUserID string) (*UserDeleteMutesResponse, error)
- func (c *Client) DeleteUserRetweet(ctx context.Context, userID, tweetID string) (*DeleteUserRetweetResponse, error)
- func (c *Client) ListLookup(ctx context.Context, listID string, opts ListLookupOpts) (*ListLookupResponse, error)
- func (c *Client) ListTweetLookup(ctx context.Context, listID string, opts ListTweetLookupOpts) (*ListTweetLookupResponse, error)
- func (c *Client) ListUserFollowers(ctx context.Context, listID string, opts ListUserFollowersOpts) (*ListUserFollowersResponse, error)
- func (c *Client) ListUserMembers(ctx context.Context, listID string, opts ListUserMembersOpts) (*ListUserMembersResponse, error)
- func (c *Client) QuoteTweetsLookup(ctx context.Context, tweetID string, opts QuoteTweetsLookupOpts) (*QuoteTweetsLookupResponse, error)
- func (c *Client) RemoveListMember(ctx context.Context, listID, userID string) (*ListRemoveMemberResponse, error)
- func (c *Client) RemoveTweetBookmark(ctx context.Context, userID, tweetID string) (*RemoveTweetBookmarkResponse, error)
- func (c *Client) SpaceBuyersLookup(ctx context.Context, spaceID string, opts SpaceBuyersLookupOpts) (*SpaceBuyersLookupResponse, error)
- func (c *Client) SpaceTweetsLookup(ctx context.Context, spaceID string, opts SpaceTweetsLookupOpts) (*SpaceTweetsLookupResponse, error)
- func (c *Client) SpacesByCreatorLookup(ctx context.Context, userIDs []string, opts SpacesByCreatorLookupOpts) (*SpacesByCreatorLookupResponse, error)
- func (c *Client) SpacesLookup(ctx context.Context, ids []string, opts SpacesLookupOpts) (*SpacesLookupResponse, error)
- func (c *Client) SpacesSearch(ctx context.Context, query string, opts SpacesSearchOpts) (*SpacesSearchResponse, error)
- func (c *Client) TweetAllCounts(ctx context.Context, query string, opts TweetAllCountsOpts) (*TweetAllCountsResponse, error)
- func (c *Client) TweetBookmarksLookup(ctx context.Context, userID string, opts TweetBookmarksLookupOpts) (*TweetBookmarksLookupResponse, error)
- func (c Client) TweetHideReplies(ctx context.Context, id string, hide bool) (*TweetHideReplyResponse, error)
- func (c *Client) TweetLikesLookup(ctx context.Context, tweetID string, opts TweetLikesLookupOpts) (*TweetLikesLookupResponse, error)
- func (c *Client) TweetLookup(ctx context.Context, ids []string, opts TweetLookupOpts) (*TweetLookupResponse, error)
- func (c *Client) TweetRecentCounts(ctx context.Context, query string, opts TweetRecentCountsOpts) (*TweetRecentCountsResponse, error)
- func (c *Client) TweetRecentSearch(ctx context.Context, query string, opts TweetRecentSearchOpts) (*TweetRecentSearchResponse, error)
- func (c *Client) TweetSampleStream(ctx context.Context, opts TweetSampleStreamOpts) (*TweetStream, error)
- func (c *Client) TweetSearch(ctx context.Context, query string, opts TweetSearchOpts) (*TweetSearchResponse, error)
- func (c *Client) TweetSearchStream(ctx context.Context, opts TweetSearchStreamOpts) (*TweetStream, error)
- func (c *Client) TweetSearchStreamAddRule(ctx context.Context, rules []TweetSearchStreamRule, dryRun bool) (*TweetSearchStreamAddRuleResponse, error)
- func (c *Client) TweetSearchStreamDeleteRuleByID(ctx context.Context, ruleIDs []TweetSearchStreamRuleID, dryRun bool) (*TweetSearchStreamDeleteRuleResponse, error)
- func (c *Client) TweetSearchStreamDeleteRuleByValue(ctx context.Context, ruleValues []string, dryRun bool) (*TweetSearchStreamDeleteRuleResponse, error)
- func (c *Client) TweetSearchStreamRules(ctx context.Context, ruleIDs []TweetSearchStreamRuleID) (*TweetSearchStreamRulesResponse, error)
- func (c *Client) UpdateList(ctx context.Context, listID string, update ListMetaData) (*ListUpdateResponse, error)
- func (c *Client) UserBlocks(ctx context.Context, userID, targetUserID string) (*UserBlocksResponse, error)
- func (c *Client) UserBlocksLookup(ctx context.Context, userID string, opts UserBlocksLookupOpts) (*UserBlocksLookupResponse, error)
- func (c *Client) UserFollowList(ctx context.Context, userID, listID string) (*UserFollowListResponse, error)
- func (c *Client) UserFollowedLists(ctx context.Context, userID string, opts UserFollowedListsOpts) (*UserFollowedListsResponse, error)
- func (c *Client) UserFollowersLookup(ctx context.Context, id string, opts UserFollowersLookupOpts) (*UserFollowersLookupResponse, error)
- func (c *Client) UserFollowingLookup(ctx context.Context, id string, opts UserFollowingLookupOpts) (*UserFollowingLookupResponse, error)
- func (c *Client) UserFollows(ctx context.Context, userID, targetUserID string) (*UserFollowsResponse, error)
- func (c *Client) UserLikes(ctx context.Context, userID, tweetID string) (*UserLikesResponse, error)
- func (c *Client) UserLikesLookup(ctx context.Context, userID string, opts UserLikesLookupOpts) (*UserLikesLookupResponse, error)
- func (c *Client) UserListLookup(ctx context.Context, userID string, opts UserListLookupOpts) (*UserListLookupResponse, error)
- func (c *Client) UserListMemberships(ctx context.Context, userID string, opts UserListMembershipsOpts) (*UserListMembershipsResponse, error)
- func (c *Client) UserLookup(ctx context.Context, ids []string, opts UserLookupOpts) (*UserLookupResponse, error)
- func (c *Client) UserMentionTimeline(ctx context.Context, userID string, opts UserMentionTimelineOpts) (*UserMentionTimelineResponse, error)
- func (c *Client) UserMutes(ctx context.Context, userID, targetUserID string) (*UserMutesResponse, error)
- func (c *Client) UserMutesLookup(ctx context.Context, userID string, opts UserMutesLookupOpts) (*UserMutesLookupResponse, error)
- func (c *Client) UserNameLookup(ctx context.Context, usernames []string, opts UserLookupOpts) (*UserLookupResponse, error)
- func (c *Client) UserPinList(ctx context.Context, userID, listID string) (*UserPinListResponse, error)
- func (c *Client) UserPinnedLists(ctx context.Context, userID string, opts UserPinnedListsOpts) (*UserPinnedListsResponse, error)
- func (c *Client) UserRetweet(ctx context.Context, userID, tweetID string) (*UserRetweetResponse, error)
- func (c *Client) UserRetweetLookup(ctx context.Context, tweetID string, opts UserRetweetLookupOpts) (*UserRetweetLookupResponse, error)
- func (c *Client) UserTweetReverseChronologicalTimeline(ctx context.Context, userID string, ...) (*UserTweetReverseChronologicalTimelineResponse, error)
- func (c *Client) UserTweetTimeline(ctx context.Context, userID string, opts UserTweetTimelineOpts) (*UserTweetTimelineResponse, error)
- func (c *Client) UserUnfollowList(ctx context.Context, userID, listID string) (*UserUnfollowListResponse, error)
- func (c *Client) UserUnpinList(ctx context.Context, userID, listID string) (*UserUnpinListResponse, error)
- type ComplianceBatchJobDownloadResponse
- type ComplianceBatchJobLookupOpts
- type ComplianceBatchJobLookupResponse
- type ComplianceBatchJobObj
- type ComplianceBatchJobRaw
- type ComplianceBatchJobResponse
- type ComplianceBatchJobResult
- type ComplianceBatchJobStatus
- type ComplianceBatchJobType
- type ComplianceBatchJobsRaw
- type CreateComplianceBatchJobOpts
- type CreateComplianceBatchJobResponse
- type CreateTweetData
- type CreateTweetGeo
- type CreateTweetMedia
- type CreateTweetPoll
- type CreateTweetReply
- type CreateTweetRequest
- type CreateTweetResponse
- type DeleteTweetData
- type DeleteTweetResponse
- type DeleteUserLikesResponse
- type DeleteUserRetweetResponse
- type EntitiesObj
- type EntityAnnotationObj
- type EntityMentionObj
- type EntityObj
- type EntityTagObj
- type EntityURLObj
- type Epoch
- type Error
- type ErrorObj
- type ErrorResponse
- type Exclude
- type Expansion
- type Granularity
- type HTTPError
- type ListAddMemberResponse
- type ListCreateData
- type ListCreateResponse
- type ListDeleteData
- type ListDeleteResponse
- type ListField
- type ListLookupOpts
- type ListLookupResponse
- type ListMemberData
- type ListMetaData
- type ListObj
- type ListRaw
- type ListRawIncludes
- type ListRemoveMemberResponse
- type ListTweetLookupMeta
- type ListTweetLookupOpts
- type ListTweetLookupResponse
- type ListUpdateData
- type ListUpdateResponse
- type ListUserFollowersMeta
- type ListUserFollowersOpts
- type ListUserFollowersResponse
- type ListUserMembersMeta
- type ListUserMembersOpts
- type ListUserMembersResponse
- type MediaField
- type MediaMetricsObj
- type MediaObj
- type PlaceField
- type PlaceGeoObj
- type PlaceObj
- type PollField
- type PollObj
- type PollOptionObj
- type QuoteTweetsLookupMeta
- type QuoteTweetsLookupOpts
- type QuoteTweetsLookupResponse
- type RateLimit
- type RemoveTweetBookmarkResponse
- type ResponseDecodeError
- type RetweetData
- type SpaceBuyersLookupOpts
- type SpaceBuyersLookupResponse
- type SpaceField
- type SpaceObj
- type SpaceState
- type SpaceTweetsLookupMeta
- type SpaceTweetsLookupOpts
- type SpaceTweetsLookupResponse
- type SpacesByCreatorLookupOpts
- type SpacesByCreatorLookupResponse
- type SpacesByCreatorMeta
- type SpacesLookupOpts
- type SpacesLookupResponse
- type SpacesRaw
- type SpacesRawIncludes
- type SpacesSearchMeta
- type SpacesSearchOpts
- type SpacesSearchResponse
- type StreamError
- type StreamErrorType
- type SystemMessage
- type SystemMessageType
- type TopicField
- type TopicObj
- type TweetAllCountsMeta
- type TweetAllCountsOpts
- type TweetAllCountsResponse
- type TweetAttachmentsObj
- type TweetBookmarkData
- type TweetBookmarksLookupMeta
- type TweetBookmarksLookupOpts
- type TweetBookmarksLookupResponse
- type TweetContextAnnotationObj
- type TweetContextObj
- type TweetCount
- type TweetDictionary
- type TweetField
- type TweetGeoCoordinatesObj
- type TweetGeoObj
- type TweetHideReplyData
- type TweetHideReplyResponse
- type TweetLikesLookupOpts
- type TweetLikesLookupResponse
- type TweetLikesMeta
- type TweetLookupOpts
- type TweetLookupResponse
- type TweetMention
- type TweetMessage
- type TweetMetricsObj
- type TweetObj
- type TweetRaw
- type TweetRawIncludes
- func (t *TweetRawIncludes) MediaByKeys() map[string]*MediaObj
- func (t *TweetRawIncludes) PlacesByID() map[string]*PlaceObj
- func (t *TweetRawIncludes) PollsByID() map[string]*PollObj
- func (t *TweetRawIncludes) TweetsByID() map[string]*TweetObj
- func (t *TweetRawIncludes) UsersByID() map[string]*UserObj
- func (t *TweetRawIncludes) UsersByUserName() map[string]*UserObj
- type TweetRecentCountsMeta
- type TweetRecentCountsOpts
- type TweetRecentCountsResponse
- type TweetRecentSearchMeta
- type TweetRecentSearchOpts
- type TweetRecentSearchResponse
- type TweetReference
- type TweetReferencedTweetObj
- type TweetSampleStreamOpts
- type TweetSearchMeta
- type TweetSearchOpts
- type TweetSearchResponse
- type TweetSearchSortOrder
- type TweetSearchStreamAddRuleResponse
- type TweetSearchStreamDeleteRuleResponse
- type TweetSearchStreamOpts
- type TweetSearchStreamRule
- type TweetSearchStreamRuleEntity
- type TweetSearchStreamRuleID
- type TweetSearchStreamRuleMeta
- type TweetSearchStreamRuleSummary
- type TweetSearchStreamRulesResponse
- type TweetStream
- type UserBlocksData
- type UserBlocksLookupMeta
- type UserBlocksLookupOpts
- type UserBlocksLookupResponse
- type UserBlocksResponse
- type UserDeleteBlocksResponse
- type UserDeleteFollowsData
- type UserDeleteFollowsResponse
- type UserDeleteMutesResponse
- type UserDictionary
- type UserField
- type UserFollowListData
- type UserFollowListResponse
- type UserFollowedListsMeta
- type UserFollowedListsOpts
- type UserFollowedListsRaw
- type UserFollowedListsResponse
- type UserFollowersLookupOpts
- type UserFollowersLookupResponse
- type UserFollowershMeta
- type UserFollowingLookupOpts
- type UserFollowingLookupResponse
- type UserFollowingMeta
- type UserFollowsData
- type UserFollowsResponse
- type UserLikesData
- type UserLikesLookupOpts
- type UserLikesLookupResponse
- type UserLikesMeta
- type UserLikesResponse
- type UserListLookupMeta
- type UserListLookupOpts
- type UserListLookupResponse
- type UserListMembershipsMeta
- type UserListMembershipsOpts
- type UserListMembershipsRaw
- type UserListMembershipsResponse
- type UserListRaw
- type UserLookupOpts
- type UserLookupResponse
- type UserMentionTimelineOpts
- type UserMentionTimelineResponse
- type UserMetricsObj
- type UserMutesData
- type UserMutesLookupMeta
- type UserMutesLookupOpts
- type UserMutesLookupResponse
- type UserMutesResponse
- type UserObj
- type UserPinListData
- type UserPinListResponse
- type UserPinnedListsMeta
- type UserPinnedListsOpts
- type UserPinnedListsRaw
- type UserPinnedListsResponse
- type UserRaw
- type UserRawIncludes
- type UserRetweetLookupOpts
- type UserRetweetLookupResponse
- type UserRetweetMeta
- type UserRetweetRaw
- type UserRetweetRawIncludes
- type UserRetweetResponse
- type UserReverseChronologicalTimelineMeta
- type UserTimelineMeta
- type UserTweetReverseChronologicalTimelineOpts
- type UserTweetReverseChronologicalTimelineResponse
- type UserTweetTimelineOpts
- type UserTweetTimelineResponse
- type UserUnfollowListResponse
- type UserUnpinListResponse
- type WithHeldObj
Constants ¶
const ( // InfoMessageType is the information system message type InfoMessageType SystemMessageType = "info" // WarnMessageType is the warning system message type WarnMessageType SystemMessageType = "warn" // ErrorMessageType is the error system message type ErrorMessageType SystemMessageType = "error" // TweetErrorType represents the tweet stream errors TweetErrorType StreamErrorType = "tweet" // SystemErrorType represents the system stream errors SystemErrorType StreamErrorType = "system" )
Variables ¶
var ErrParameter = errors.New("twitter input parameter error")
ErrParameter will indicate that the error is from an invalid input parameter
Functions ¶
This section is empty.
Types ¶
type AddTweetBookmarkResponse ¶
type AddTweetBookmarkResponse struct { Tweet *TweetBookmarkData `json:"data"` RateLimit *RateLimit }
AddTweetBookmarkResponse is the response for adding a bookmark
type Authorizer ¶
Authorizer will add the authorization to the HTTP request
type Client ¶
type Client struct { Authorizer Authorizer Client *http.Client Host string }
Client is used to make twitter v2 API callouts.
Authorizer is used to add auth to the request ¶
Client is the HTTP client to use for all requests ¶
Host is the base URL to use like, https://api.twitter.com
func (*Client) AddListMember ¶
func (c *Client) AddListMember(ctx context.Context, listID, userID string) (*ListAddMemberResponse, error)
AddListMember enables the authenticated user to add a member to a list
func (*Client) AddTweetBookmark ¶
func (c *Client) AddTweetBookmark(ctx context.Context, userID, tweetID string) (*AddTweetBookmarkResponse, error)
AddTweetBookmark causes the user ID identified in the path parameter to Bookmark the target Tweet provided in the request body
func (*Client) AuthUserLookup ¶
func (c *Client) AuthUserLookup(ctx context.Context, opts UserLookupOpts) (*UserLookupResponse, error)
AuthUserLookup will return the authorized user lookup
func (*Client) ComplianceBatchJob ¶
func (c *Client) ComplianceBatchJob(ctx context.Context, id string) (*ComplianceBatchJobResponse, error)
ComplianceBatchJob returns a single compliance job
func (*Client) ComplianceBatchJobLookup ¶
func (c *Client) ComplianceBatchJobLookup(ctx context.Context, jobType ComplianceBatchJobType, opts ComplianceBatchJobLookupOpts) (*ComplianceBatchJobLookupResponse, error)
ComplianceBatchJobLookup returns a list of compliance jobs
func (*Client) CreateComplianceBatchJob ¶
func (c *Client) CreateComplianceBatchJob(ctx context.Context, jobType ComplianceBatchJobType, opts CreateComplianceBatchJobOpts) (*CreateComplianceBatchJobResponse, error)
CreateComplianceBatchJob creates a new compliance job for tweet or user IDs.
func (*Client) CreateList ¶
func (c *Client) CreateList(ctx context.Context, list ListMetaData) (*ListCreateResponse, error)
CreateList enables the authenticated user to create a list
func (*Client) CreateTweet ¶
func (c *Client) CreateTweet(ctx context.Context, tweet CreateTweetRequest) (*CreateTweetResponse, error)
CreateTweet will let a user post polls, quote tweets, tweet with reply setting, tweet with geo, attach perviously uploaded media toa tweet and tag users, tweet to super followers, etc.
func (*Client) DeleteList ¶
DeleteList enables the authenticated user to delete a list
func (*Client) DeleteTweet ¶
DeleteTweet allow the user to delete a specific tweet
func (*Client) DeleteUserBlocks ¶
func (c *Client) DeleteUserBlocks(ctx context.Context, userID, targetUserID string) (*UserDeleteBlocksResponse, error)
DeleteUserBlocks will remove the target user block
func (*Client) DeleteUserFollows ¶
func (c *Client) DeleteUserFollows(ctx context.Context, userID, targetUserID string) (*UserDeleteFollowsResponse, error)
DeleteUserFollows allows a user ID to unfollow another user
func (*Client) DeleteUserLikes ¶
func (c *Client) DeleteUserLikes(ctx context.Context, userID, tweetID string) (*DeleteUserLikesResponse, error)
DeleteUserLikes will unlike the targeted tweet
func (*Client) DeleteUserMutes ¶
func (c *Client) DeleteUserMutes(ctx context.Context, userID, targetUserID string) (*UserDeleteMutesResponse, error)
DeleteUserMutes allows an authenticated user ID to unmute the target user
func (*Client) DeleteUserRetweet ¶
func (c *Client) DeleteUserRetweet(ctx context.Context, userID, tweetID string) (*DeleteUserRetweetResponse, error)
DeleteUserRetweet will delete a retweet from a user
func (*Client) ListLookup ¶
func (c *Client) ListLookup(ctx context.Context, listID string, opts ListLookupOpts) (*ListLookupResponse, error)
ListLookup returns the details of a specified list
func (*Client) ListTweetLookup ¶
func (c *Client) ListTweetLookup(ctx context.Context, listID string, opts ListTweetLookupOpts) (*ListTweetLookupResponse, error)
ListTweetLookup returns a list of tweets from the specified list
func (*Client) ListUserFollowers ¶
func (c *Client) ListUserFollowers(ctx context.Context, listID string, opts ListUserFollowersOpts) (*ListUserFollowersResponse, error)
ListUserFollowers returns a list of users who are followers of a list
func (*Client) ListUserMembers ¶
func (c *Client) ListUserMembers(ctx context.Context, listID string, opts ListUserMembersOpts) (*ListUserMembersResponse, error)
ListUserMembers returns a list of users who are member of the list
func (*Client) QuoteTweetsLookup ¶
func (c *Client) QuoteTweetsLookup(ctx context.Context, tweetID string, opts QuoteTweetsLookupOpts) (*QuoteTweetsLookupResponse, error)
QuoteTweetsLookup returns quote tweets for a tweet specified by the requested tweet id
func (*Client) RemoveListMember ¶
func (c *Client) RemoveListMember(ctx context.Context, listID, userID string) (*ListRemoveMemberResponse, error)
RemoveListMember enables the authenticated user to remove a member to a list
func (*Client) RemoveTweetBookmark ¶
func (c *Client) RemoveTweetBookmark(ctx context.Context, userID, tweetID string) (*RemoveTweetBookmarkResponse, error)
RemoveTweetBookmark allows a user or authenticated user ID to remove a Bookmark of a Tweet
func (*Client) SpaceBuyersLookup ¶
func (c *Client) SpaceBuyersLookup(ctx context.Context, spaceID string, opts SpaceBuyersLookupOpts) (*SpaceBuyersLookupResponse, error)
SpaceBuyersLookup returns a list of users who purchased a ticket to the requested space
func (*Client) SpaceTweetsLookup ¶
func (c *Client) SpaceTweetsLookup(ctx context.Context, spaceID string, opts SpaceTweetsLookupOpts) (*SpaceTweetsLookupResponse, error)
SpaceTweetsLookup returns tweets shared in the request space
func (*Client) SpacesByCreatorLookup ¶
func (c *Client) SpacesByCreatorLookup(ctx context.Context, userIDs []string, opts SpacesByCreatorLookupOpts) (*SpacesByCreatorLookupResponse, error)
SpacesByCreatorLookup returns live or scheduled spaces created by a specific user ids
func (*Client) SpacesLookup ¶
func (c *Client) SpacesLookup(ctx context.Context, ids []string, opts SpacesLookupOpts) (*SpacesLookupResponse, error)
SpacesLookup returns information about a space from the requested ids
func (*Client) SpacesSearch ¶
func (c *Client) SpacesSearch(ctx context.Context, query string, opts SpacesSearchOpts) (*SpacesSearchResponse, error)
SpacesSearch returns live or scheduled spaces matching the specified search terms.
func (*Client) TweetAllCounts ¶
func (c *Client) TweetAllCounts(ctx context.Context, query string, opts TweetAllCountsOpts) (*TweetAllCountsResponse, error)
TweetAllCounts receive a count of Tweets that match a query
func (*Client) TweetBookmarksLookup ¶
func (c *Client) TweetBookmarksLookup(ctx context.Context, userID string, opts TweetBookmarksLookupOpts) (*TweetBookmarksLookupResponse, error)
TweetBookmarksLookup allows you to get an authenticated user's 800 most recent bookmarked Tweets
func (Client) TweetHideReplies ¶
func (c Client) TweetHideReplies(ctx context.Context, id string, hide bool) (*TweetHideReplyResponse, error)
TweetHideReplies will hide the replies for a given tweet
func (*Client) TweetLikesLookup ¶
func (c *Client) TweetLikesLookup(ctx context.Context, tweetID string, opts TweetLikesLookupOpts) (*TweetLikesLookupResponse, error)
TweetLikesLookup gets information about a tweet's liking users. The response will have at most 100 users who liked the tweet
func (*Client) TweetLookup ¶
func (c *Client) TweetLookup(ctx context.Context, ids []string, opts TweetLookupOpts) (*TweetLookupResponse, error)
TweetLookup returns information about a tweet or group of tweets specified by a group of tweet ids.
func (*Client) TweetRecentCounts ¶
func (c *Client) TweetRecentCounts(ctx context.Context, query string, opts TweetRecentCountsOpts) (*TweetRecentCountsResponse, error)
TweetRecentCounts will return a recent tweet counts based of a query
func (*Client) TweetRecentSearch ¶
func (c *Client) TweetRecentSearch(ctx context.Context, query string, opts TweetRecentSearchOpts) (*TweetRecentSearchResponse, error)
TweetRecentSearch will return a recent search based of a query
func (*Client) TweetSampleStream ¶
func (c *Client) TweetSampleStream(ctx context.Context, opts TweetSampleStreamOpts) (*TweetStream, error)
TweetSampleStream will return a streamer for streaming 1% of all tweets real-time
func (*Client) TweetSearch ¶
func (c *Client) TweetSearch(ctx context.Context, query string, opts TweetSearchOpts) (*TweetSearchResponse, error)
TweetSearch is a full-archive search endpoint returns the complete history of public Tweets matching a search query.
This endpoint is only available to those users who have been approved for Academic Research access.
func (*Client) TweetSearchStream ¶
func (c *Client) TweetSearchStream(ctx context.Context, opts TweetSearchStreamOpts) (*TweetStream, error)
TweetSearchStream will stream in real-time based on a specific set of filter rules
func (*Client) TweetSearchStreamAddRule ¶
func (c *Client) TweetSearchStreamAddRule(ctx context.Context, rules []TweetSearchStreamRule, dryRun bool) (*TweetSearchStreamAddRuleResponse, error)
TweetSearchStreamAddRule will create on or more rules for search sampling. Set dry run to true to validate the rules before commit
func (*Client) TweetSearchStreamDeleteRuleByID ¶
func (c *Client) TweetSearchStreamDeleteRuleByID(ctx context.Context, ruleIDs []TweetSearchStreamRuleID, dryRun bool) (*TweetSearchStreamDeleteRuleResponse, error)
TweetSearchStreamDeleteRuleByID will delete one or more rules for search sampling using the rule ids. Set dry run to true to validate the rules before commit
func (*Client) TweetSearchStreamDeleteRuleByValue ¶
func (c *Client) TweetSearchStreamDeleteRuleByValue(ctx context.Context, ruleValues []string, dryRun bool) (*TweetSearchStreamDeleteRuleResponse, error)
TweetSearchStreamDeleteRuleByValue will delete one or more rules for search sampling using the rule values. Set dry run to true to validate the rules before commit
func (*Client) TweetSearchStreamRules ¶
func (c *Client) TweetSearchStreamRules(ctx context.Context, ruleIDs []TweetSearchStreamRuleID) (*TweetSearchStreamRulesResponse, error)
TweetSearchStreamRules will return a list of rules active on the streaming endpoint
func (*Client) UpdateList ¶
func (c *Client) UpdateList(ctx context.Context, listID string, update ListMetaData) (*ListUpdateResponse, error)
UpdateList enables the authenticated user to update the meta data of a list
func (*Client) UserBlocks ¶
func (c *Client) UserBlocks(ctx context.Context, userID, targetUserID string) (*UserBlocksResponse, error)
UserBlocks will have the user block the targeted user ID
func (*Client) UserBlocksLookup ¶
func (c *Client) UserBlocksLookup(ctx context.Context, userID string, opts UserBlocksLookupOpts) (*UserBlocksLookupResponse, error)
UserBlocksLookup returns a list of users who are blocked by the user ID
func (*Client) UserFollowList ¶
func (c *Client) UserFollowList(ctx context.Context, userID, listID string) (*UserFollowListResponse, error)
UserFollowList enables an user to follow a list
func (*Client) UserFollowedLists ¶
func (c *Client) UserFollowedLists(ctx context.Context, userID string, opts UserFollowedListsOpts) (*UserFollowedListsResponse, error)
UserFollowedLists returns all list an user follows
func (*Client) UserFollowersLookup ¶
func (c *Client) UserFollowersLookup(ctx context.Context, id string, opts UserFollowersLookupOpts) (*UserFollowersLookupResponse, error)
UserFollowersLookup will return a user's followers
func (*Client) UserFollowingLookup ¶
func (c *Client) UserFollowingLookup(ctx context.Context, id string, opts UserFollowingLookupOpts) (*UserFollowingLookupResponse, error)
UserFollowingLookup will return a user's following users
func (*Client) UserFollows ¶
func (c *Client) UserFollows(ctx context.Context, userID, targetUserID string) (*UserFollowsResponse, error)
UserFollows allows a user ID to follow another user
func (*Client) UserLikesLookup ¶
func (c *Client) UserLikesLookup(ctx context.Context, userID string, opts UserLikesLookupOpts) (*UserLikesLookupResponse, error)
UserLikesLookup gets information about a user's liked tweets.
func (*Client) UserListLookup ¶
func (c *Client) UserListLookup(ctx context.Context, userID string, opts UserListLookupOpts) (*UserListLookupResponse, error)
UserListLookup returns all lists owned by the specified user
func (*Client) UserListMemberships ¶
func (c *Client) UserListMemberships(ctx context.Context, userID string, opts UserListMembershipsOpts) (*UserListMembershipsResponse, error)
UserListMemberships returns all list a user is a member of
func (*Client) UserLookup ¶
func (c *Client) UserLookup(ctx context.Context, ids []string, opts UserLookupOpts) (*UserLookupResponse, error)
UserLookup returns information about an user or group of users specified by a group of user ids.
func (*Client) UserMentionTimeline ¶
func (c *Client) UserMentionTimeline(ctx context.Context, userID string, opts UserMentionTimelineOpts) (*UserMentionTimelineResponse, error)
UserMentionTimeline will return the user's mentions timeline
func (*Client) UserMutes ¶
func (c *Client) UserMutes(ctx context.Context, userID, targetUserID string) (*UserMutesResponse, error)
UserMutes allows an authenticated user ID to mute the target user
func (*Client) UserMutesLookup ¶
func (c *Client) UserMutesLookup(ctx context.Context, userID string, opts UserMutesLookupOpts) (*UserMutesLookupResponse, error)
UserMutesLookup returns a list of users who are muted by the user ID
func (*Client) UserNameLookup ¶
func (c *Client) UserNameLookup(ctx context.Context, usernames []string, opts UserLookupOpts) (*UserLookupResponse, error)
UserNameLookup returns information about an user or group of users specified by a group of usernames.
func (*Client) UserPinList ¶
func (c *Client) UserPinList(ctx context.Context, userID, listID string) (*UserPinListResponse, error)
UserPinList enables the user to pin a list
func (*Client) UserPinnedLists ¶
func (c *Client) UserPinnedLists(ctx context.Context, userID string, opts UserPinnedListsOpts) (*UserPinnedListsResponse, error)
UserPinnedLists returns the lists pinned by a user
func (*Client) UserRetweet ¶
func (c *Client) UserRetweet(ctx context.Context, userID, tweetID string) (*UserRetweetResponse, error)
UserRetweet will retweet a tweet for a user
func (*Client) UserRetweetLookup ¶
func (c *Client) UserRetweetLookup(ctx context.Context, tweetID string, opts UserRetweetLookupOpts) (*UserRetweetLookupResponse, error)
UserRetweetLookup allows you to get information about users that have retweeted a tweet
func (*Client) UserTweetReverseChronologicalTimeline ¶ added in v2.1.0
func (c *Client) UserTweetReverseChronologicalTimeline(ctx context.Context, userID string, opts UserTweetReverseChronologicalTimelineOpts) (*UserTweetReverseChronologicalTimelineResponse, error)
UserTweetReverseChronologicalTimeline allows you to retrieve a collection of the most recent Tweets and Retweets posted by you and users you follow. This endpoint returns up to the last 3200 Tweets.
func (*Client) UserTweetTimeline ¶
func (c *Client) UserTweetTimeline(ctx context.Context, userID string, opts UserTweetTimelineOpts) (*UserTweetTimelineResponse, error)
UserTweetTimeline will return the user tweet timeline
func (*Client) UserUnfollowList ¶
func (c *Client) UserUnfollowList(ctx context.Context, userID, listID string) (*UserUnfollowListResponse, error)
UserUnfollowList enables an user to unfollow a list
func (*Client) UserUnpinList ¶
func (c *Client) UserUnpinList(ctx context.Context, userID, listID string) (*UserUnpinListResponse, error)
UserUnpinList enables a user to unpin a list
type ComplianceBatchJobDownloadResponse ¶
type ComplianceBatchJobDownloadResponse struct { Results []*ComplianceBatchJobResult RateLimit *RateLimit }
ComplianceBatchJobDownloadResponse is the response from dowload results
type ComplianceBatchJobLookupOpts ¶
type ComplianceBatchJobLookupOpts struct {
Status ComplianceBatchJobStatus
}
ComplianceBatchJobLookupOpts is the compliance batch lookups options
type ComplianceBatchJobLookupResponse ¶
type ComplianceBatchJobLookupResponse struct { Raw *ComplianceBatchJobsRaw RateLimit *RateLimit }
ComplianceBatchJobLookupResponse is the response from the compliance batch lookup
type ComplianceBatchJobObj ¶
type ComplianceBatchJobObj struct { Resumable bool `json:"resumable"` Type ComplianceBatchJobType `json:"type"` ID string `json:"id"` CreatedAt string `json:"created_at"` Name string `json:"name"` UploadURL string `json:"upload_url"` UploadExpiresAt string `json:"upload_expires_at"` DownloadURL string `json:"download_url"` DownloadExpiresAt string `json:"download_expires_at"` Status ComplianceBatchJobStatus `json:"status"` Error string `json:"error"` // contains filtered or unexported fields }
ComplianceBatchJobObj is the compliance batch job
func (ComplianceBatchJobObj) Download ¶
func (c ComplianceBatchJobObj) Download(ctx context.Context) (*ComplianceBatchJobDownloadResponse, error)
Download will download the results of the job
type ComplianceBatchJobRaw ¶
type ComplianceBatchJobRaw struct {
Job *ComplianceBatchJobObj `json:"data"`
}
ComplianceBatchJobRaw is the raw data from a response
type ComplianceBatchJobResponse ¶
type ComplianceBatchJobResponse struct { Raw *ComplianceBatchJobRaw RateLimit *RateLimit }
ComplianceBatchJobResponse is the compliance batch job response
type ComplianceBatchJobResult ¶
type ComplianceBatchJobResult struct { ID string `json:"id"` Action string `json:"action"` CreatedAt string `json:"created_at"` RedactedAt string `json:"redacted_at"` Reason string `json:"reason"` }
ComplianceBatchJobResult is the downloaded result
type ComplianceBatchJobStatus ¶
type ComplianceBatchJobStatus string
ComplianceBatchJobStatus is the compliance batch job status
const ( // ComplianceBatchJobStatusCreated is the created status ComplianceBatchJobStatusCreated ComplianceBatchJobStatus = "created" // ComplianceBatchJobStatusComplete is the complete status ComplianceBatchJobStatusComplete ComplianceBatchJobStatus = "complete" // ComplianceBatchJobStatusInProgress is the in_progress status ComplianceBatchJobStatusInProgress ComplianceBatchJobStatus = "in_progress" // ComplianceBatchJobStatusFailed is the failed status ComplianceBatchJobStatusFailed ComplianceBatchJobStatus = "failed" // ComplianceBatchJobStatusExpired is the expired status ComplianceBatchJobStatusExpired ComplianceBatchJobStatus = "expired" )
type ComplianceBatchJobType ¶
type ComplianceBatchJobType string
ComplianceBatchJobType is the compliance batch job type
const ( // ComplianceBatchJobTypeTweets is the tweets job ComplianceBatchJobTypeTweets ComplianceBatchJobType = "tweets" // ComplianceBatchJobTypeUsers is the users job ComplianceBatchJobTypeUsers ComplianceBatchJobType = "users" )
type ComplianceBatchJobsRaw ¶
type ComplianceBatchJobsRaw struct {
Jobs []*ComplianceBatchJobObj `json:"data"`
}
ComplianceBatchJobsRaw is the jobs
type CreateComplianceBatchJobOpts ¶
CreateComplianceBatchJobOpts are the create compliance batch job options
type CreateComplianceBatchJobResponse ¶
type CreateComplianceBatchJobResponse struct { Raw *ComplianceBatchJobRaw RateLimit *RateLimit }
CreateComplianceBatchJobResponse is the response from creating a compliance batch job
type CreateTweetData ¶
CreateTweetData is the data returned when creating a tweet
type CreateTweetGeo ¶
type CreateTweetGeo struct {
PlaceID string `json:"place_id,omitempty"`
}
CreateTweetGeo allows for the tweet to coontain geo
type CreateTweetMedia ¶
type CreateTweetMedia struct { IDs []string `json:"media_ids,omitempty"` TaggedUserIDs []string `json:"tagged_user_ids,omitempty"` }
CreateTweetMedia allows for updated media to attached. If the tagged user ids are present, then ids must be present.
type CreateTweetPoll ¶
type CreateTweetPoll struct { DurationMinutes int `json:"duration_minutes,omitempty"` Options []string `json:"options,omitempty"` }
CreateTweetPoll allows for a poll to be posted as the tweet
type CreateTweetReply ¶
type CreateTweetReply struct { ExcludeReplyUserIDs []string `json:"exclude_reply_user_ids,omitempty"` InReplyToTweetID string `json:"in_reply_to_tweet_id,omitempty"` }
CreateTweetReply sets the reply setting for the tweet
type CreateTweetRequest ¶
type CreateTweetRequest 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"` ReplySettings string `json:"reply_settings,omitempty"` Geo *CreateTweetGeo `json:"geo,omitempty"` Media *CreateTweetMedia `json:"media,omitempty"` Poll *CreateTweetPoll `json:"poll,omitempty"` Reply *CreateTweetReply `json:"reply,omitempty"` }
CreateTweetRequest is the details of a tweet to create
type CreateTweetResponse ¶
type CreateTweetResponse struct { Tweet *CreateTweetData `json:"data"` RateLimit *RateLimit }
CreateTweetResponse is the response returned by the create tweet
type DeleteTweetData ¶
type DeleteTweetData struct {
Deleted bool `json:"deleted"`
}
DeleteTweetData is the indication of the deletion of tweet
type DeleteTweetResponse ¶
type DeleteTweetResponse struct { Tweet *DeleteTweetData `json:"data"` RateLimit *RateLimit }
DeleteTweetResponse is the response returned by the delete tweet
type DeleteUserLikesResponse ¶
type DeleteUserLikesResponse struct { Data *UserLikesData `json:"data"` RateLimit *RateLimit }
DeleteUserLikesResponse the response for the user unlike
type DeleteUserRetweetResponse ¶
type DeleteUserRetweetResponse struct { Data *RetweetData `json:"data"` RateLimit *RateLimit }
DeleteUserRetweetResponse is the response with a user retweet
type EntitiesObj ¶
type EntitiesObj struct { Annotations []EntityAnnotationObj `json:"annotations"` URLs []EntityURLObj `json:"urls"` HashTags []EntityTagObj `json:"hashtags"` Mentions []EntityMentionObj `json:"mentions"` CashTags []EntityTagObj `json:"cashtags"` }
EntitiesObj contains details about text that has a special meaning.
type EntityAnnotationObj ¶
type EntityAnnotationObj struct { EntityObj Probability float64 `json:"probability"` Type string `json:"type"` NormalizedText string `json:"normalized_text"` }
EntityAnnotationObj contains details about annotations relative to the text.
type EntityMentionObj ¶
EntityMentionObj contains details about text recognized as a user mention.
type EntityTagObj ¶
EntityTagObj contains details about text recognized as a tag
type EntityURLObj ¶
type EntityURLObj struct { EntityObj URL string `json:"url"` ExpandedURL string `json:"expanded_url"` DisplayURL string `json:"display_url"` Status int `json:"status"` Title string `json:"title"` Description string `json:"description"` UnwoundURL string `json:"unwound_url"` }
EntityURLObj contains details about text recognized as a URL.
type Error ¶
type Error struct { Parameters interface{} `json:"parameters"` Message string `json:"message"` }
Error is part of the HTTP response error
type ErrorObj ¶
type ErrorObj struct { Title string `json:"title"` Detail string `json:"detail"` Type string `json:"type"` ResourceType string `json:"resource_type"` Parameter string `json:"parameter"` Value interface{} `json:"value"` }
ErrorObj is part of the partial errors in the response
type ErrorResponse ¶
type ErrorResponse struct { StatusCode int Errors []Error `json:"errors"` Title string `json:"title"` Detail string `json:"detail"` Type string `json:"type"` RateLimit *RateLimit `json:"-"` }
ErrorResponse is returned by a non-success callout
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
type Expansion ¶
type Expansion string
Expansion can expand objects referenced in the payload
const ( // ExpansionAttachmentsPollIDs returns a poll object containing metadata for the poll included in the Tweet ExpansionAttachmentsPollIDs Expansion = "attachments.poll_ids" // ExpansionAttachmentsMediaKeys returns a media object representing the images, videos, GIFs included in the Tweet ExpansionAttachmentsMediaKeys Expansion = "attachments.media_keys" // ExpansionAuthorID returns a user object representing the Tweet’s author ExpansionAuthorID Expansion = "author_id" // ExpansionEntitiesMentionsUserName returns a user object for the user mentioned in the Tweet ExpansionEntitiesMentionsUserName Expansion = "entities.mentions.username" // ExpansionGeoPlaceID returns a place object containing metadata for the location tagged in the Tweet ExpansionGeoPlaceID Expansion = "geo.place_id" // ExpansionInReplyToUserID returns a user object representing the Tweet author this requested Tweet is a reply of ExpansionInReplyToUserID Expansion = "in_reply_to_user_id" // ExpansionReferencedTweetsID returns a Tweet object that this Tweet is referencing (either as a Retweet, Quoted Tweet, or reply) ExpansionReferencedTweetsID Expansion = "referenced_tweets.id" // ExpansionReferencedTweetsIDAuthorID returns a user object for the author of the referenced Tweet ExpansionReferencedTweetsIDAuthorID Expansion = "referenced_tweets.id.author_id" // ExpansionPinnedTweetID returns a Tweet object representing the Tweet pinned to the top of the user’s profile ExpansionPinnedTweetID Expansion = "pinned_tweet_id" // ExpansionOwnerID returns an owner in the includes ExpansionOwnerID Expansion = "owner_id" // ExpansionCreatorID returns the creator id ExpansionCreatorID Expansion = "creator_id" // ExpansionSpeakerIDS returns the speaker ids ExpansionSpeakerIDS Expansion = "speaker_ids" // ExpansionInvitedUserIDs returns the invited user ids ExpansionInvitedUserIDs Expansion = "invited_user_ids" // ExpansionHostIDs returns the host ids ExpansionHostIDs Expansion = "host_ids" )
type Granularity ¶
type Granularity string
Granularity is the granularity that you want the timeseries count data to be grouped by
const ( // GranularityMinute will group tweet in minutes GranularityMinute Granularity = "minute" // GranularityHour is the default granularity GranularityHour Granularity = "hour" // GranularityDay will group tweet on a daily basis GranularityDay Granularity = "day" )
type HTTPError ¶
HTTPError is a response error where the body is not JSON, but XML. This commonly seen in 404 errors.
type ListAddMemberResponse ¶
type ListAddMemberResponse struct { List *ListMemberData `json:"data"` RateLimit *RateLimit }
ListAddMemberResponse is the list add member response
type ListCreateData ¶
ListCreateData is the data returned from creating a list
type ListCreateResponse ¶
type ListCreateResponse struct { List *ListCreateData `json:"data"` RateLimit *RateLimit }
ListCreateResponse is the response to creating a list
type ListDeleteData ¶
type ListDeleteData struct {
Deleted bool `json:"deleted"`
}
ListDeleteData is the data returned from deleting a list
type ListDeleteResponse ¶
type ListDeleteResponse struct { List *ListDeleteData `json:"data"` RateLimit *RateLimit }
ListDeleteResponse is the response to deleting a list
type ListField ¶
type ListField string
ListField are the optional fields that can be included in the response
const ( // ListFieldCreatedAt is the UTC datetime that the List was created on Twitter. ListFieldCreatedAt ListField = "created_at" // ListFieldFollowerCount shows how many users follow this List ListFieldFollowerCount ListField = "follower_count" // ListFieldMemberCount shows how many members are part of this List. ListFieldMemberCount ListField = "member_count" // ListFieldPrivate indicates if the list is private ListFieldPrivate ListField = "private" // ListFieldDescription is a brief description to let users know about the List. ListFieldDescription ListField = "description" // ListFieldOwnerID is unique identifier of this List's owner. ListFieldOwnerID ListField = "owner_id" )
type ListLookupOpts ¶
ListLookupOpts are the options for the list lookup
type ListLookupResponse ¶
ListLookupResponse is the response from the list lookup
type ListMemberData ¶
type ListMemberData struct {
Member bool `json:"is_member"`
}
ListMemberData is the list member data
type ListMetaData ¶
type ListMetaData struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Private *bool `json:"private,omitempty"` }
ListMetaData is a list meta data
type ListObj ¶
type ListObj struct { ID string `json:"id"` Name string `json:"name"` CreatedAt string `json:"created_at"` Description string `json:"description"` FollowerCount int `json:"follower_count"` MemberCount int `json:"member_count"` Private bool `json:"private"` OwnerID string `json:"owner_id"` }
ListObj is the metadata for twitter lists
type ListRaw ¶
type ListRaw struct { List *ListObj `json:"data"` Includes *ListRawIncludes `json:"includes,omitempty"` Errors []*ErrorObj `json:"errors,omitempty"` }
ListRaw the raw list response
type ListRawIncludes ¶
type ListRawIncludes struct {
Users []*UserObj `json:"users,omitempty"`
}
ListRawIncludes the data include from the expansion
type ListRemoveMemberResponse ¶
type ListRemoveMemberResponse struct { List *ListMemberData `json:"data"` RateLimit *RateLimit }
ListRemoveMemberResponse is the list remove member response
type ListTweetLookupMeta ¶
type ListTweetLookupMeta struct { ResultCount int `json:"result_count"` PreviousToken string `json:"previous_token"` NextToken string `json:"next_token"` }
ListTweetLookupMeta is the meta data associated with the list tweet lookup
type ListTweetLookupOpts ¶
type ListTweetLookupOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField MaxResults int PaginationToken string }
ListTweetLookupOpts are the response field options
type ListTweetLookupResponse ¶
type ListTweetLookupResponse struct { Raw *TweetRaw Meta *ListTweetLookupMeta `json:"meta"` RateLimit *RateLimit }
ListTweetLookupResponse is the response to the list tweet lookup
type ListUpdateData ¶
type ListUpdateData struct {
Updated bool `json:"updated"`
}
ListUpdateData is the data returned from updating a list
type ListUpdateResponse ¶
type ListUpdateResponse struct { List *ListUpdateData `json:"data"` RateLimit *RateLimit }
ListUpdateResponse is the response to updating a list
type ListUserFollowersMeta ¶
type ListUserFollowersMeta struct { ResultCount int `json:"result_count"` PreviousToken string `json:"previous_token"` NextToken string `json:"next_token"` }
ListUserFollowersMeta is the meta for the list followers
type ListUserFollowersOpts ¶
type ListUserFollowersOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField MaxResults int PaginationToken string }
ListUserFollowersOpts is the list followers options
type ListUserFollowersResponse ¶
type ListUserFollowersResponse struct { Raw *UserRaw Meta *ListUserFollowersMeta `json:"meta"` RateLimit *RateLimit }
ListUserFollowersResponse is the response for the list followers
type ListUserMembersMeta ¶
type ListUserMembersMeta struct { ResultCount int `json:"result_count"` PreviousToken string `json:"previous_token"` NextToken string `json:"next_token"` }
ListUserMembersMeta is the meta data of the response
type ListUserMembersOpts ¶
type ListUserMembersOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField MaxResults int PaginationToken string }
ListUserMembersOpts is the list user member options
type ListUserMembersResponse ¶
type ListUserMembersResponse struct { Raw *UserRaw Meta *ListUserMembersMeta `json:"meta"` RateLimit *RateLimit }
ListUserMembersResponse is the response to the list user members
type MediaField ¶
type MediaField string
MediaField can expand the fields that are returned in the media object
const ( // MediaFieldDurationMS available when type is video. Duration in milliseconds of the video. MediaFieldDurationMS MediaField = "duration_ms" // MediaFieldHeight of this content in pixels. MediaFieldHeight MediaField = "height" // MediaFieldMediaKey unique identifier of the expanded media content. MediaFieldMediaKey MediaField = "media_key" // MediaFieldPreviewImageURL is the URL to the static placeholder preview of this content. MediaFieldPreviewImageURL MediaField = "preview_image_url" // MediaFieldType is the type of content (animated_gif, photo, video) MediaFieldType MediaField = "type" // MediaFieldURL is the URL of the content MediaFieldURL MediaField = "url" // MediaFieldWidth is the width of this content in pixels MediaFieldWidth MediaField = "width" // MediaFieldPublicMetrics is the public engagement metrics for the media content at the time of the request. MediaFieldPublicMetrics MediaField = "public_metrics" // MediaFieldNonPublicMetrics is the non-public engagement metrics for the media content at the time of the request. MediaFieldNonPublicMetrics MediaField = "non_public_metrics" // MediaFieldOrganicMetrics is the engagement metrics for the media content, tracked in an organic context, at the time of the request. MediaFieldOrganicMetrics MediaField = "organic_metrics" // MediaFieldPromotedMetrics is the URL to the static placeholder preview of this content. MediaFieldPromotedMetrics MediaField = "promoted_metrics" )
type MediaMetricsObj ¶
type MediaMetricsObj struct { Playback0 int `json:"playback_0_count"` Playback100 int `json:"playback_100_count"` Playback25 int `json:"playback_25_count"` Playback50 int `json:"playback_50_count"` Playback75 int `json:"playback_75_count"` Views int `json:"view_count"` }
MediaMetricsObj engagement metrics for the media content at the time of the request
type MediaObj ¶
type MediaObj struct { Key string `json:"media_key"` Type string `json:"type"` URL string `json:"url"` DurationMS int `json:"duration_ms"` Height int `json:"height,omitempty"` NonPublicMetrics *MediaMetricsObj `json:"non_public_metrics,omitempty"` OrganicMetrics *MediaMetricsObj `json:"organic_metrics,omitempty"` PreviewImageURL string `json:"preview_image_url,omitempty"` PromotedMetrics *MediaMetricsObj `json:"promoted_metrics,omitempty"` PublicMetrics *MediaMetricsObj `json:"public_metrics,omitempty"` Width int `json:"width,omitempty"` }
MediaObj refers to any image, GIF, or video attached to a Tweet
type PlaceField ¶
type PlaceField string
PlaceField can expand the tweet primary object
const ( // PlaceFieldContainedWithin returns the identifiers of known places that contain the referenced place. PlaceFieldContainedWithin PlaceField = "contained_within" // PlaceFieldCountry is the full-length name of the country this place belongs to. PlaceFieldCountry PlaceField = "country" // PlaceFieldCountryCode is the ISO Alpha-2 country code this place belongs to. PlaceFieldCountryCode PlaceField = "country_code" // PlaceFieldFullName is a longer-form detailed place name. PlaceFieldFullName PlaceField = "full_name" // PlaceFieldGeo contains place details in GeoJSON format. PlaceFieldGeo PlaceField = "geo" // PlaceFieldID is the unique identifier of the expanded place, if this is a point of interest tagged in the Tweet. PlaceFieldID PlaceField = "id" // PlaceFieldName is the short name of this place PlaceFieldName PlaceField = "name" // PlaceFieldPlaceType is specified the particular type of information represented by this place information, such as a city name, or a point of interest. PlaceFieldPlaceType PlaceField = "place_type" )
type PlaceGeoObj ¶
type PlaceGeoObj struct { Type string `json:"type"` BBox []float64 `json:"bbox"` Properties map[string]interface{} `json:"properties"` }
PlaceGeoObj contains place details
type PlaceObj ¶
type PlaceObj struct { FullName string `json:"full_name,omitempty"` ID string `json:"id"` ContainedWithin []string `json:"contained_within,omitempty"` Country string `json:"country,omitempty"` CountryCode string `json:"country_code,omitempty"` Geo *PlaceGeoObj `json:"geo,omitempty"` Name string `json:"name"` PlaceType string `json:"place_type,omitempty"` }
PlaceObj tagged in a Tweet is not a primary object on any endpoint
type PollField ¶
type PollField string
PollField defines the fields of the expanded tweet
const ( // PollFieldDurationMinutes specifies the total duration of this poll. PollFieldDurationMinutes PollField = "duration_minutes" // PollFieldEndDateTime specifies the end date and time for this poll. PollFieldEndDateTime PollField = "end_datetime" // PollFieldID is unique identifier of the expanded poll. PollFieldID PollField = "id" // PollFieldOptions contains objects describing each choice in the referenced poll. PollFieldOptions PollField = "options" // PollFieldVotingStatus indicates if this poll is still active and can receive votes, or if the voting is now closed. PollFieldVotingStatus PollField = "voting_status" )
type PollObj ¶
type PollObj struct { ID string `json:"id"` Options []*PollOptionObj `json:"options,omitempty"` DurationMinutes int `json:"duration_minutes,omitempty"` EndDateTime string `json:"end_datetime,omitempty"` VotingStatus string `json:"voting_status,omitempty"` }
PollObj included in a Tweet is not a primary object on any endpoint
type PollOptionObj ¶
type PollOptionObj struct { Position int `json:"position"` Label string `json:"label"` Votes int `json:"votes"` }
PollOptionObj contains objects describing each choice in the referenced poll.
type QuoteTweetsLookupMeta ¶
type QuoteTweetsLookupMeta struct { ResultCount int `json:"result_count"` NextToken string `json:"next_token"` }
QuoteTweetsLookupMeta is the meta data from the response
type QuoteTweetsLookupOpts ¶
type QuoteTweetsLookupOpts struct { MaxResults int PaginationToken string Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField }
QuoteTweetsLookupOpts are the options for the quote tweets
type QuoteTweetsLookupResponse ¶
type QuoteTweetsLookupResponse struct { Raw *TweetRaw Meta *QuoteTweetsLookupMeta RateLimit *RateLimit }
QuoteTweetsLookupResponse is the response from the quote tweet
type RateLimit ¶
RateLimit are the rate limit values from the response header
func RateLimitFromError ¶
RateLimitFromError returns the rate limits from an error. If there are not any limits, false is returned.
type RemoveTweetBookmarkResponse ¶
type RemoveTweetBookmarkResponse struct { Tweet *TweetBookmarkData `json:"data"` RateLimit *RateLimit }
RemoveTweetBookmarkResponse is the response for removing a bookmark
type ResponseDecodeError ¶
ResponseDecodeError is an error when a response has a decoding error, JSON.
func (*ResponseDecodeError) Error ¶
func (r *ResponseDecodeError) Error() string
func (*ResponseDecodeError) Unwrap ¶
func (r *ResponseDecodeError) Unwrap() error
Unwrap will return the wrapped error
type RetweetData ¶
type RetweetData struct {
Retweeted bool `json:"retweeted"`
}
RetweetData will be returned by the manage retweet APIs
type SpaceBuyersLookupOpts ¶
type SpaceBuyersLookupOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField }
SpaceBuyersLookupOpts are the options for the space buyer lookup
type SpaceBuyersLookupResponse ¶
SpaceBuyersLookupResponse is the space buyers lookup response
type SpaceField ¶
type SpaceField string
SpaceField are the space field options
const ( // SpaceFieldHostIDs is the space host ids field SpaceFieldHostIDs SpaceField = "host_ids" // SpaceFieldCreatedAt is the space created at field SpaceFieldCreatedAt SpaceField = "created_at" // SpaceFieldCreatorID is the space creator id field SpaceFieldCreatorID SpaceField = "creator_id" // SpaceFieldID is the space field id field SpaceFieldID SpaceField = "id" // SpaceFieldLang is the space language field SpaceFieldLang SpaceField = "lang" // SpaceFieldInvitedUserIDs is the space invited user ids field SpaceFieldInvitedUserIDs SpaceField = "invited_user_ids" // SpaceFieldParticipantCount is the space participant count field SpaceFieldParticipantCount SpaceField = "participant_count" // SpaceFieldSpeakerIDs is the space speaker ids field SpaceFieldSpeakerIDs SpaceField = "speaker_ids" // SpaceFieldStartedAt is the space started at field SpaceFieldStartedAt SpaceField = "started_at" // SpaceFieldEndedAt is the space ended at field SpaceFieldEndedAt SpaceField = "ended_at" // SpaceFieldSubscriberCount is the space subscriber count field SpaceFieldSubscriberCount SpaceField = "subscriber_count" // SpaceFieldTopicIDs is the space topic ids field SpaceFieldTopicIDs SpaceField = "topic_ids" // SpaceFieldState is the space state field SpaceFieldState SpaceField = "state" // SpaceFieldTitle is the space title field SpaceFieldTitle SpaceField = "title" // SpaceFieldUpdatedAt is the space updated at field SpaceFieldUpdatedAt SpaceField = "updated_at" // SpaceFieldScheduledStart is the space scheduled start field SpaceFieldScheduledStart SpaceField = "scheduled_start" // SpaceFieldTicketed is the space is ticketed field SpaceFieldTicketed SpaceField = "is_ticketed" )
type SpaceObj ¶
type SpaceObj struct { ID string `json:"id"` State string `json:"state"` CreatedAt string `json:"created_at"` EndedAt string `json:"ended_at"` HostIDs []string `json:"host_ids"` Lang string `json:"lang"` Ticketed bool `json:"is_ticketed"` InvitedUserIDs []string `json:"invited_user_ids"` ParticipantCount int `json:"participant_count"` ScheduledStart string `json:"scheduled_start"` SpeakerIDs []string `json:"speaker_ids"` StartedAt string `json:"started_at"` Title string `json:"title"` TopicIDs []string `json:"topic_ids"` UpdatedAt string `json:"updated_at"` CreatorID string `json:"creator_id"` SubscriberCount int `json:"subscriber_count"` }
SpaceObj is the spaces object
type SpaceState ¶
type SpaceState string
SpaceState is the enumeration of the space states
const ( // SpaceStateAll is for all of the possible states SpaceStateAll SpaceState = "all" // SpaceStateLive is for only live states SpaceStateLive SpaceState = "live" // SpaceStateScheduled is for only scheduled states SpaceStateScheduled SpaceState = "scheduled" )
type SpaceTweetsLookupMeta ¶
type SpaceTweetsLookupMeta struct {
ResultCount int `json:"result_count"`
}
SpaceTweetsLookupMeta is the space tweets lookup meta
type SpaceTweetsLookupOpts ¶
type SpaceTweetsLookupOpts struct { Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField }
SpaceTweetsLookupOpts are the options for the space tweets lookup
type SpaceTweetsLookupResponse ¶
type SpaceTweetsLookupResponse struct { Raw *TweetRaw Meta *SpaceTweetsLookupMeta `json:"meta"` RateLimit *RateLimit }
SpaceTweetsLookupResponse is the response for the space tweets lookup
type SpacesByCreatorLookupOpts ¶
type SpacesByCreatorLookupOpts struct { Expansions []Expansion SpaceFields []SpaceField TopicFields []TopicField UserFields []UserField }
SpacesByCreatorLookupOpts are the options for the space by creator
type SpacesByCreatorLookupResponse ¶
type SpacesByCreatorLookupResponse struct { Raw *SpacesRaw Meta *SpacesByCreatorMeta `json:"meta"` RateLimit *RateLimit }
SpacesByCreatorLookupResponse is the response to the space by creator
type SpacesByCreatorMeta ¶
type SpacesByCreatorMeta struct {
ResultCount int `json:"result_count"`
}
SpacesByCreatorMeta the meta for the space by creator
type SpacesLookupOpts ¶
type SpacesLookupOpts struct { Expansions []Expansion SpaceFields []SpaceField TopicFields []TopicField UserFields []UserField }
SpacesLookupOpts are the options for the space lookup
type SpacesLookupResponse ¶
SpacesLookupResponse is the response for the space lookup
type SpacesRaw ¶
type SpacesRaw struct { Spaces []*SpaceObj `json:"data"` Includes *SpacesRawIncludes `json:"includes,omitempty"` Errors []*ErrorObj `json:"errors,omitempty"` }
SpacesRaw the raw space objects
type SpacesRawIncludes ¶
type SpacesRawIncludes struct { Users []*UserObj `json:"users,omitempty"` Topics []*TopicObj `json:"topics,omitempty"` }
SpacesRawIncludes are the includes for a space
type SpacesSearchMeta ¶
type SpacesSearchMeta struct {
ResultCount int `json:"result_count"`
}
SpacesSearchMeta is the search meta
type SpacesSearchOpts ¶
type SpacesSearchOpts struct { Expansions []Expansion SpaceFields []SpaceField TopicFields []TopicField UserFields []UserField State SpaceState }
SpacesSearchOpts are the space search options
type SpacesSearchResponse ¶
type SpacesSearchResponse struct { Raw *SpacesRaw Meta *SpacesSearchMeta `json:"meta"` RateLimit *RateLimit }
SpacesSearchResponse is the respones from the search
type StreamError ¶
type StreamError struct { Type StreamErrorType Msg string Err error }
StreamError is the error from the streaming
func (StreamError) Error ¶
func (e StreamError) Error() string
func (*StreamError) Is ¶
func (e *StreamError) Is(target error) bool
Is will compare the error against the stream error and type
func (*StreamError) Unwrap ¶
func (e *StreamError) Unwrap() error
Unwrap will return any error associated
type SystemMessage ¶
SystemMessage is the system stream message
type SystemMessageType ¶
type SystemMessageType string
SystemMessageType stream system message types
type TopicField ¶
type TopicField string
TopicField are the topic field options
const ( // TopicFieldID is the topic id field TopicFieldID TopicField = "id" // TopicFieldName is the topic name field TopicFieldName TopicField = "name" // TopicFieldDescription is the topic description field TopicFieldDescription TopicField = "description" )
type TopicObj ¶
type TopicObj struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` }
TopicObj is the topic object
type TweetAllCountsMeta ¶
type TweetAllCountsMeta struct { TotalTweetCount int `json:"total_tweet_count"` NextToken string `json:"next_token"` }
TweetAllCountsMeta is the meta data from the all counts information
type TweetAllCountsOpts ¶
type TweetAllCountsOpts struct { StartTime time.Time EndTime time.Time SinceID string UntilID string Granularity Granularity NextToken string }
TweetAllCountsOpts are the optional paramters that can be passed to the tweet all counts callout
type TweetAllCountsResponse ¶
type TweetAllCountsResponse struct { TweetCounts []*TweetCount `json:"data"` Meta *TweetAllCountsMeta `json:"meta"` RateLimit *RateLimit }
TweetAllCountsResponse contain all fo the information from a tweet all counts
type TweetAttachmentsObj ¶
type TweetAttachmentsObj struct { MediaKeys []string `json:"media_keys"` PollIDs []string `json:"poll_ids"` }
TweetAttachmentsObj specifics the type of attachment present in the tweet
type TweetBookmarkData ¶
type TweetBookmarkData struct {
Bookmarked bool `json:"bookmarked"`
}
TweetBookmarkData is the data from adding or removing a bookmark
type TweetBookmarksLookupMeta ¶
type TweetBookmarksLookupMeta struct { ResultCount int `json:"result_count"` NextToken string `json:"next_token"` }
TweetBookmarksLookupMeta is the meta for the bookmark lookup
type TweetBookmarksLookupOpts ¶
type TweetBookmarksLookupOpts struct { MaxResults int PaginationToken string Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField }
TweetBookmarksLookupOpts are the tweet bookmark lookup options
type TweetBookmarksLookupResponse ¶
type TweetBookmarksLookupResponse struct { Raw *TweetRaw Meta *TweetBookmarksLookupMeta RateLimit *RateLimit }
TweetBookmarksLookupResponse is the response to the bookmark lookup
type TweetContextAnnotationObj ¶
type TweetContextAnnotationObj struct { Domain TweetContextObj `json:"domain"` Entity TweetContextObj `json:"entity"` }
TweetContextAnnotationObj contain the context annotation
type TweetContextObj ¶
type TweetContextObj struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` }
TweetContextObj contains the elements which identify detailed information regarding the domain classification based on the Tweet text
type TweetCount ¶
type TweetCount struct { Start string `json:"start"` End string `json:"end"` TweetCount int `json:"tweet_count"` }
TweetCount is the object on the tweet counts endpoints
type TweetDictionary ¶
type TweetDictionary struct { Tweet TweetObj Author *UserObj InReplyUser *UserObj Place *PlaceObj AttachmentPolls []*PollObj AttachmentMedia []*MediaObj Mentions []*TweetMention ReferencedTweets []*TweetReference }
TweetDictionary is a struct of a tweet and all of the reference objects
func CreateTweetDictionary ¶
func CreateTweetDictionary(tweet TweetObj, includes *TweetRawIncludes) *TweetDictionary
CreateTweetDictionary will create a dictionary from a tweet and the includes
type TweetField ¶
type TweetField string
TweetField defines the fields of the basic building block of all things twitter
const ( // TweetFieldID is the unique identifier of the requested Tweet. TweetFieldID TweetField = "id" // TweetFieldText is the actual UTF-8 text of the Tweet. See twitter-text for details on what characters are currently considered valid. TweetFieldText TweetField = "text" // TweetFieldAttachments specifies the type of attachments (if any) present in this Tweet. TweetFieldAttachments TweetField = "attachments" // TweetFieldAuthorID is the unique identifier of the User who posted this Tweet TweetFieldAuthorID TweetField = "author_id" // TweetFieldContextAnnotations contains context annotations for the Tweet. TweetFieldContextAnnotations TweetField = "context_annotations" // TweetFieldConversationID is the Tweet ID of the original Tweet of the conversation (which includes direct replies, replies of replies). TweetFieldConversationID TweetField = "conversation_id" // TweetFieldCreatedAt is the creation time of the Tweet. TweetFieldCreatedAt TweetField = "created_at" // TweetFieldEntities are the entities which have been parsed out of the text of the Tweet. Additionally see entities in Twitter Objects. TweetFieldEntities TweetField = "entities" // TweetFieldGeo contains details about the location tagged by the user in this Tweet, if they specified one. TweetFieldGeo TweetField = "geo" // TweetFieldInReplyToUserID will contain the original Tweet’s author ID TweetFieldInReplyToUserID TweetField = "in_reply_to_user_id" // TweetFieldLanguage is the language of the Tweet, if detected by Twitter. Returned as a BCP47 language tag. TweetFieldLanguage TweetField = "lang" // TweetFieldNonPublicMetrics are the non-public engagement metrics for the Tweet at the time of the request. TweetFieldNonPublicMetrics TweetField = "non_public_metrics" // TweetFieldPublicMetrics are the public engagement metrics for the Tweet at the time of the request. TweetFieldPublicMetrics TweetField = "public_metrics" // TweetFieldOrganicMetrics are the engagement metrics, tracked in an organic context, for the Tweet at the time of the request. TweetFieldOrganicMetrics TweetField = "organic_metrics" // TweetFieldPromotedMetrics are the engagement metrics, tracked in a promoted context, for the Tweet at the time of the request. TweetFieldPromotedMetrics TweetField = "promoted_metrics" // TweetFieldPossiblySensitve is an indicator that the URL contained in the Tweet may contain content or media identified as sensitive content. TweetFieldPossiblySensitve TweetField = "possibly_sensitive" // TweetFieldReferencedTweets is a list of Tweets this Tweet refers to. TweetFieldReferencedTweets TweetField = "referenced_tweets" // TweetFieldSource is the name of the app the user Tweeted from. TweetFieldSource TweetField = "source" // TweetFieldWithHeld contains withholding details TweetFieldWithHeld TweetField = "withheld" )
type TweetGeoCoordinatesObj ¶
type TweetGeoCoordinatesObj struct { Type string `json:"type"` Coordinates []float64 `json:"coordinates"` }
TweetGeoCoordinatesObj contains details about the coordinates of the location tagged by the user in this Tweet, if they specified one.
type TweetGeoObj ¶
type TweetGeoObj struct { PlaceID string `json:"place_id"` Coordinates TweetGeoCoordinatesObj `json:"coordinates"` }
TweetGeoObj contains details about the location tagged by the user in this Tweet, if they specified one.
type TweetHideReplyData ¶
type TweetHideReplyData struct {
Hidden bool `json:"hidden"`
}
TweetHideReplyData is the hide reply data
type TweetHideReplyResponse ¶
type TweetHideReplyResponse struct { Reply *TweetHideReplyData `json:"data"` RateLimit *RateLimit }
TweetHideReplyResponse is the response from the hide replies
type TweetLikesLookupOpts ¶
type TweetLikesLookupOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField MaxResults int PaginationToken string }
TweetLikesLookupOpts the user like lookup options
type TweetLikesLookupResponse ¶
type TweetLikesLookupResponse struct { Raw *UserRaw Meta *TweetLikesMeta `json:"meta"` RateLimit *RateLimit }
TweetLikesLookupResponse is the user from the tweet likes
type TweetLikesMeta ¶
type TweetLikesMeta struct { ResultCount int `json:"result_count"` NextToken string `json:"next_token"` PreviousToken string `json:"previous_token"` }
TweetLikesMeta is the meta data from the response
type TweetLookupOpts ¶
type TweetLookupOpts struct { Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField }
TweetLookupOpts are the optional paramters that can be passed to the lookup callout
type TweetLookupResponse ¶
TweetLookupResponse contains all of the information from a tweet lookup callout
type TweetMention ¶
type TweetMention struct { Mention *EntityMentionObj User *UserObj }
TweetMention is the mention and the user associated with it
type TweetMessage ¶
type TweetMessage struct {
Raw *TweetRaw
}
TweetMessage is the tweet stream message
type TweetMetricsObj ¶
type TweetMetricsObj struct { Impressions int `json:"impression_count"` URLLinkClicks int `json:"url_link_clicks"` UserProfileClicks int `json:"user_profile_clicks"` Likes int `json:"like_count"` Replies int `json:"reply_count"` Retweets int `json:"retweet_count"` Quotes int `json:"quote_count"` }
TweetMetricsObj engagement metrics for the Tweet at the time of the request
type TweetObj ¶
type TweetObj struct { ID string `json:"id"` Text string `json:"text"` Attachments *TweetAttachmentsObj `json:"attachments,omitempty"` AuthorID string `json:"author_id,omitempty"` ContextAnnotations []*TweetContextAnnotationObj `json:"context_annotations,omitempty"` ConversationID string `json:"conversation_id,omitempty"` CreatedAt string `json:"created_at,omitempty"` Entities *EntitiesObj `json:"entities,omitempty"` Geo *TweetGeoObj `json:"geo,omitempty"` InReplyToUserID string `json:"in_reply_to_user_id,omitempty"` Language string `json:"lang,omitempty"` NonPublicMetrics *TweetMetricsObj `json:"non_public_metrics,omitempty"` OrganicMetrics *TweetMetricsObj `json:"organic_metrics,omitempty"` PossiblySensitive bool `json:"possibly_sensitive,omitempty"` PromotedMetrics *TweetMetricsObj `json:"promoted_metrics,omitempty"` PublicMetrics *TweetMetricsObj `json:"public_metrics,omitempty"` ReferencedTweets []*TweetReferencedTweetObj `json:"referenced_tweets,omitempty"` Source string `json:"source,omitempty"` WithHeld *WithHeldObj `json:"withheld,omitempty"` }
TweetObj is the primary object on the tweets endpoints
type TweetRaw ¶
type TweetRaw struct { Tweets []*TweetObj `json:"data"` Includes *TweetRawIncludes `json:"includes,omitempty"` Errors []*ErrorObj `json:"errors,omitempty"` // contains filtered or unexported fields }
TweetRaw is the raw response from the tweet lookup endpoint
func (*TweetRaw) TweetDictionaries ¶
func (t *TweetRaw) TweetDictionaries() map[string]*TweetDictionary
TweetDictionaries create a map of tweet dictionaries from the raw tweet response
type TweetRawIncludes ¶
type TweetRawIncludes struct { Tweets []*TweetObj `json:"tweets,omitempty"` Users []*UserObj `json:"users,omitempty"` Places []*PlaceObj `json:"places,omitempty"` Media []*MediaObj `json:"media,omitempty"` Polls []*PollObj `json:"polls,omitempty"` // contains filtered or unexported fields }
TweetRawIncludes contains any additional information from the tweet callout
func (*TweetRawIncludes) MediaByKeys ¶
func (t *TweetRawIncludes) MediaByKeys() map[string]*MediaObj
MediaByKeys will return a map of media keys to object
func (*TweetRawIncludes) PlacesByID ¶
func (t *TweetRawIncludes) PlacesByID() map[string]*PlaceObj
PlacesByID will return a map of place ids to object
func (*TweetRawIncludes) PollsByID ¶
func (t *TweetRawIncludes) PollsByID() map[string]*PollObj
PollsByID will return a map of poll ids to object
func (*TweetRawIncludes) TweetsByID ¶
func (t *TweetRawIncludes) TweetsByID() map[string]*TweetObj
TweetsByID will return a map of tweet ids to object
func (*TweetRawIncludes) UsersByID ¶
func (t *TweetRawIncludes) UsersByID() map[string]*UserObj
UsersByID will return a map of user ids to object
func (*TweetRawIncludes) UsersByUserName ¶
func (t *TweetRawIncludes) UsersByUserName() map[string]*UserObj
UsersByUserName will return a map of user names to object
type TweetRecentCountsMeta ¶
type TweetRecentCountsMeta struct {
TotalTweetCount int `json:"total_tweet_count"`
}
TweetRecentCountsMeta contains the meta data from the recent counts information
type TweetRecentCountsOpts ¶
type TweetRecentCountsOpts struct { StartTime time.Time EndTime time.Time SinceID string UntilID string Granularity Granularity }
TweetRecentCountsOpts are the optional paramters that can be passed to the tweet recent counts callout
type TweetRecentCountsResponse ¶
type TweetRecentCountsResponse struct { TweetCounts []*TweetCount `json:"data"` Meta *TweetRecentCountsMeta `json:"meta"` RateLimit *RateLimit }
TweetRecentCountsResponse contains all of the information from a tweet recent counts
type TweetRecentSearchMeta ¶
type TweetRecentSearchMeta struct { NewestID string `json:"newest_id"` OldestID string `json:"oldest_id"` ResultCount int `json:"result_count"` NextToken string `json:"next_token"` }
TweetRecentSearchMeta contains the recent search information
type TweetRecentSearchOpts ¶
type TweetRecentSearchOpts struct { Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField StartTime time.Time EndTime time.Time SortOrder TweetSearchSortOrder MaxResults int NextToken string SinceID string UntilID string }
TweetRecentSearchOpts are the optional parameters for the recent search API
type TweetRecentSearchResponse ¶
type TweetRecentSearchResponse struct { Raw *TweetRaw Meta *TweetRecentSearchMeta `json:"meta"` RateLimit *RateLimit }
TweetRecentSearchResponse contains all of the information from a tweet recent search
type TweetReference ¶
type TweetReference struct { Reference *TweetReferencedTweetObj TweetDictionary *TweetDictionary }
TweetReference is the tweet referenced and it's dictionary
type TweetReferencedTweetObj ¶
TweetReferencedTweetObj is a Tweet this Tweet refers to
type TweetSampleStreamOpts ¶
type TweetSampleStreamOpts struct { BackfillMinutes int Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField }
TweetSampleStreamOpts are the options for sample tweet stream
type TweetSearchMeta ¶
type TweetSearchMeta struct { NewestID string `json:"newest_id"` OldestID string `json:"oldest_id"` ResultCount int `json:"result_count"` NextToken string `json:"next_token"` }
TweetSearchMeta is the tweet search meta data
type TweetSearchOpts ¶
type TweetSearchOpts struct { Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField StartTime time.Time EndTime time.Time SortOrder TweetSearchSortOrder MaxResults int NextToken string SinceID string UntilID string }
TweetSearchOpts are the tweet search options
type TweetSearchResponse ¶
type TweetSearchResponse struct { Raw *TweetRaw Meta *TweetSearchMeta `json:"meta"` RateLimit *RateLimit }
TweetSearchResponse is the tweet search response
type TweetSearchSortOrder ¶
type TweetSearchSortOrder string
TweetSearchSortOrder specifies the order the tweets are returned
const ( // TweetSearchSortOrderRecency will return the tweets in order of recency TweetSearchSortOrderRecency TweetSearchSortOrder = "recency" // TweetSearchSortOrderRelevancy will return the tweets in order of relevancy TweetSearchSortOrderRelevancy TweetSearchSortOrder = "relevancy" )
type TweetSearchStreamAddRuleResponse ¶
type TweetSearchStreamAddRuleResponse struct { Rules []*TweetSearchStreamRuleEntity `json:"data"` Meta *TweetSearchStreamRuleMeta `json:"meta"` Errors []*ErrorObj `json:"errors,omitempty"` RateLimit *RateLimit }
TweetSearchStreamAddRuleResponse is the response from adding rules
type TweetSearchStreamDeleteRuleResponse ¶
type TweetSearchStreamDeleteRuleResponse struct { Meta *TweetSearchStreamRuleMeta `json:"meta"` Errors []*ErrorObj `json:"errors,omitempty"` RateLimit *RateLimit }
TweetSearchStreamDeleteRuleResponse is the response from deleting rules
type TweetSearchStreamOpts ¶
type TweetSearchStreamOpts struct { BackfillMinutes int Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField }
TweetSearchStreamOpts are the options for the search stream
type TweetSearchStreamRule ¶
TweetSearchStreamRule is the search stream filter rule
type TweetSearchStreamRuleEntity ¶
type TweetSearchStreamRuleEntity struct { ID TweetSearchStreamRuleID `json:"id"` TweetSearchStreamRule }
TweetSearchStreamRuleEntity is the search filter rule entity
type TweetSearchStreamRuleID ¶
type TweetSearchStreamRuleID string
TweetSearchStreamRuleID is the filter rule id
type TweetSearchStreamRuleMeta ¶
type TweetSearchStreamRuleMeta struct { Sent time.Time `json:"sent"` Summary TweetSearchStreamRuleSummary `json:"summary"` }
TweetSearchStreamRuleMeta is the meta data object from the request
type TweetSearchStreamRuleSummary ¶
type TweetSearchStreamRuleSummary struct { Created int `json:"created"` NotCreated int `json:"not_created"` Deleted int `json:"deleted"` NotDeleted int `json:"not_deleted"` }
TweetSearchStreamRuleSummary is the summary of the search filters
type TweetSearchStreamRulesResponse ¶
type TweetSearchStreamRulesResponse struct { Rules []*TweetSearchStreamRuleEntity `json:"data"` Meta *TweetSearchStreamRuleMeta `json:"meta"` Errors []*ErrorObj `json:"errors,omitempty"` RateLimit *RateLimit }
TweetSearchStreamRulesResponse is the response to getting the search rules
type TweetStream ¶
type TweetStream struct { RateLimit *RateLimit // contains filtered or unexported fields }
TweetStream is the stream handler
func StartTweetStream ¶
func StartTweetStream(stream io.ReadCloser) *TweetStream
StartTweetStream will start the tweet streaming
func (*TweetStream) Close ¶
func (ts *TweetStream) Close()
Close will close the stream and all channels
func (*TweetStream) Connection ¶
func (ts *TweetStream) Connection() bool
Connection returns if the connect is still alive
func (*TweetStream) Err ¶
func (ts *TweetStream) Err() <-chan error
Err will return the channel to receive any stream errors
func (*TweetStream) SystemMessages ¶
func (ts *TweetStream) SystemMessages() <-chan map[SystemMessageType]SystemMessage
SystemMessages will return the channel to receive system stream messages
func (*TweetStream) Tweets ¶
func (ts *TweetStream) Tweets() <-chan *TweetMessage
Tweets will return the channel to receive tweet stream messages
type UserBlocksData ¶
type UserBlocksData struct {
Blocking bool `json:"blocking"`
}
UserBlocksData indicates if the user is blocked
type UserBlocksLookupMeta ¶
type UserBlocksLookupMeta struct { ResultCount int `json:"result_count"` NextToken string `json:"next_token"` PreviousToken string `json:"previous_token"` }
UserBlocksLookupMeta is the meta associated with the blocked users lookup
type UserBlocksLookupOpts ¶
type UserBlocksLookupOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField MaxResults int PaginationToken string }
UserBlocksLookupOpts are the options for the users blocked API
type UserBlocksLookupResponse ¶
type UserBlocksLookupResponse struct { Raw *UserRaw Meta *UserBlocksLookupMeta `json:"meta"` RateLimit *RateLimit }
UserBlocksLookupResponse is the list of users that are blocked
type UserBlocksResponse ¶
type UserBlocksResponse struct { Data *UserBlocksData `json:"data"` RateLimit *RateLimit }
UserBlocksResponse is when a user blocks another
type UserDeleteBlocksResponse ¶
type UserDeleteBlocksResponse struct { Data *UserBlocksData `json:"data"` RateLimit *RateLimit }
UserDeleteBlocksResponse is when a user unblocks another
type UserDeleteFollowsData ¶
type UserDeleteFollowsData struct {
Following bool `json:"following"`
}
UserDeleteFollowsData is the data from the unfollows API
type UserDeleteFollowsResponse ¶
type UserDeleteFollowsResponse struct { Data *UserDeleteFollowsData `json:"data"` RateLimit *RateLimit }
UserDeleteFollowsResponse is the response from the unfollows API
type UserDeleteMutesResponse ¶
type UserDeleteMutesResponse struct { Data *UserMutesData `json:"data"` RateLimit *RateLimit }
UserDeleteMutesResponse is when a user unmutes another
type UserDictionary ¶
UserDictionary is a struct of an user and all of the reference objects
func CreateUserDictionary ¶
func CreateUserDictionary(user UserObj, includes *UserRawIncludes) *UserDictionary
CreateUserDictionary will create a dictionary from a user and the includes
type UserField ¶
type UserField string
UserField defines the twitter user account metadata fields
const ( // UserFieldCreatedAt is the UTC datetime that the user account was created on Twitter. UserFieldCreatedAt UserField = "created_at" // UserFieldDescription is the text of this user's profile description (also known as bio), if the user provided one. UserFieldDescription UserField = "description" // UserFieldEntities contains details about text that has a special meaning in the user's description. UserFieldEntities UserField = "entities" // UserFieldID is the unique identifier of this user. UserFieldID UserField = "id" // UserFieldLocation is the location specified in the user's profile, if the user provided one. UserFieldLocation UserField = "location" // UserFieldName is the name of the user, as they’ve defined it on their profile UserFieldName UserField = "name" // UserFieldPinnedTweetID is the unique identifier of this user's pinned Tweet. UserFieldPinnedTweetID UserField = "pinned_tweet_id" // UserFieldProfileImageURL is the URL to the profile image for this user, as shown on the user's profile. UserFieldProfileImageURL UserField = "profile_image_url" // UserFieldProtected indicates if this user has chosen to protect their Tweets (in other words, if this user's Tweets are private). UserFieldProtected UserField = "protected" // UserFieldPublicMetrics contains details about activity for this user. UserFieldPublicMetrics UserField = "public_metrics" // UserFieldURL is the URL specified in the user's profile, if present. UserFieldURL UserField = "url" // UserFieldUserName is the Twitter screen name, handle, or alias that this user identifies themselves with UserFieldUserName UserField = "username" // UserFieldVerified indicates if this user is a verified Twitter User. UserFieldVerified UserField = "verified" // UserFieldWithHeld contains withholding details UserFieldWithHeld UserField = "withheld" )
type UserFollowListData ¶
type UserFollowListData struct {
Following bool `json:"following"`
}
UserFollowListData is the list following data
type UserFollowListResponse ¶
type UserFollowListResponse struct { List *UserFollowListData `json:"data"` RateLimit *RateLimit }
UserFollowListResponse is the user follow response
type UserFollowedListsMeta ¶
type UserFollowedListsMeta struct { ResultCount int `json:"result_count"` PreviousToken string `json:"previous_token"` NextToken string `json:"next_token"` }
UserFollowedListsMeta is the meta for the user followed
type UserFollowedListsOpts ¶
type UserFollowedListsOpts struct { Expansions []Expansion ListFields []ListField UserFields []UserField MaxResults int PaginationToken string }
UserFollowedListsOpts are the options for the user followed lists
type UserFollowedListsRaw ¶
type UserFollowedListsRaw struct { Lists []*ListObj `json:"data"` Includes *ListRawIncludes `json:"includes,omitempty"` Errors []*ErrorObj `json:"errors,omitempty"` }
UserFollowedListsRaw is the raw response for the user followed
type UserFollowedListsResponse ¶
type UserFollowedListsResponse struct { Raw *UserFollowedListsRaw Meta *UserFollowedListsMeta `json:"meta"` RateLimit *RateLimit }
UserFollowedListsResponse is the user followed response
type UserFollowersLookupOpts ¶
type UserFollowersLookupOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField MaxResults int PaginationToken string }
UserFollowersLookupOpts are the options for the user followers API
type UserFollowersLookupResponse ¶
type UserFollowersLookupResponse struct { Raw *UserRaw Meta *UserFollowershMeta `json:"meta"` RateLimit *RateLimit }
UserFollowersLookupResponse is the response for the user followers API
type UserFollowershMeta ¶
type UserFollowershMeta struct { ResultCount int `json:"result_count"` NextToken string `json:"next_token"` PreviousToken string `json:"previous_token"` }
UserFollowershMeta is the meta data returned by the user followers API
type UserFollowingLookupOpts ¶
type UserFollowingLookupOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField MaxResults int PaginationToken string }
UserFollowingLookupOpts are the options for the user following API
type UserFollowingLookupResponse ¶
type UserFollowingLookupResponse struct { Raw *UserRaw Meta *UserFollowingMeta `json:"meta"` RateLimit *RateLimit }
UserFollowingLookupResponse is the response for the user following API
type UserFollowingMeta ¶
type UserFollowingMeta struct { ResultCount int `json:"result_count"` NextToken string `json:"next_token"` PreviousToken string `json:"previous_token"` }
UserFollowingMeta is the meta data returned by the user following API
type UserFollowsData ¶
type UserFollowsData struct { Following bool `json:"following"` PendingFollow bool `json:"pending_follow"` }
UserFollowsData is the data from the follows API
type UserFollowsResponse ¶
type UserFollowsResponse struct { Data *UserFollowsData `json:"data"` RateLimit *RateLimit }
UserFollowsResponse is the response from the follows API
type UserLikesData ¶
type UserLikesData struct {
Liked bool `json:"liked"`
}
UserLikesData is the data from the user like management
type UserLikesLookupOpts ¶
type UserLikesLookupOpts struct { Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField MaxResults int PaginationToken string }
UserLikesLookupOpts the tweet like lookup options
type UserLikesLookupResponse ¶
type UserLikesLookupResponse struct { Raw *TweetRaw Meta *UserLikesMeta `json:"meta"` RateLimit *RateLimit }
UserLikesLookupResponse is the tweets from the user likes
type UserLikesMeta ¶
type UserLikesMeta struct { ResultCount int `json:"result_count"` NextToken string `json:"next_token"` PreviousToken string `json:"previous_token"` }
UserLikesMeta is the meta data from the response
type UserLikesResponse ¶
type UserLikesResponse struct { Data *UserLikesData `json:"data"` RateLimit *RateLimit }
UserLikesResponse the response for the user likes
type UserListLookupMeta ¶
type UserListLookupMeta struct { ResultCount int `json:"result_count"` PreviousToken string `json:"previous_token"` NextToken string `json:"next_token"` }
UserListLookupMeta is the meta data for the lists
type UserListLookupOpts ¶
type UserListLookupOpts struct { Expansions []Expansion ListFields []ListField UserFields []UserField MaxResults int PaginationToken string }
UserListLookupOpts are the response field options
type UserListLookupResponse ¶
type UserListLookupResponse struct { Raw *UserListRaw Meta *UserListLookupMeta `json:"meta"` RateLimit *RateLimit }
UserListLookupResponse is the raw response with meta
type UserListMembershipsMeta ¶
type UserListMembershipsMeta struct { ResultCount int `json:"result_count"` PreviousToken string `json:"previous_token"` NextToken string `json:"next_token"` }
UserListMembershipsMeta the response meta data
type UserListMembershipsOpts ¶
type UserListMembershipsOpts struct { Expansions []Expansion ListFields []ListField UserFields []UserField MaxResults int PaginationToken string }
UserListMembershipsOpts the user list member options
type UserListMembershipsRaw ¶
type UserListMembershipsRaw struct { Lists []*ListObj `json:"data"` Includes *ListRawIncludes `json:"includes,omitempty"` Errors []*ErrorObj `json:"errors,omitempty"` }
UserListMembershipsRaw the raw data from the user list memberships
type UserListMembershipsResponse ¶
type UserListMembershipsResponse struct { Raw *UserListMembershipsRaw Meta *UserListMembershipsMeta `json:"meta"` RateLimit *RateLimit }
UserListMembershipsResponse the user list membership response
type UserListRaw ¶
type UserListRaw struct { Lists []*ListObj `json:"data"` Includes *ListRawIncludes `json:"includes,omitempty"` Errors []*ErrorObj `json:"errors,omitempty"` }
UserListRaw is the raw response
type UserLookupOpts ¶
type UserLookupOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField }
UserLookupOpts are the optional paramters that can be passed to the lookup callout
type UserLookupResponse ¶
UserLookupResponse contains all of the information from an user lookup callout
type UserMentionTimelineOpts ¶
type UserMentionTimelineOpts struct { Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField StartTime time.Time EndTime time.Time MaxResults int PaginationToken string SinceID string UntilID string }
UserMentionTimelineOpts are the options for the user mention timeline request
type UserMentionTimelineResponse ¶
type UserMentionTimelineResponse struct { Raw *TweetRaw Meta *UserTimelineMeta `json:"meta"` RateLimit *RateLimit }
UserMentionTimelineResponse contains the information from the user mention timeline callout
type UserMetricsObj ¶
type UserMetricsObj struct { Followers int `json:"followers_count"` Following int `json:"following_count"` Tweets int `json:"tweet_count"` Listed int `json:"listed_count"` }
UserMetricsObj contains details about activity for this user
type UserMutesData ¶
type UserMutesData struct {
Muting bool `json:"muting"`
}
UserMutesData indicates if the user is muted
type UserMutesLookupMeta ¶
type UserMutesLookupMeta struct { ResultCount int `json:"result_count"` NextToken string `json:"next_token"` PreviousToken string `json:"previous_token"` }
UserMutesLookupMeta is the meta associated with the muted users lookup
type UserMutesLookupOpts ¶
type UserMutesLookupOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField MaxResults int PaginationToken string }
UserMutesLookupOpts are the options for the users muted API
type UserMutesLookupResponse ¶
type UserMutesLookupResponse struct { Raw *UserRaw Meta *UserMutesLookupMeta `json:"meta"` RateLimit *RateLimit }
UserMutesLookupResponse is the list of users that are muted
type UserMutesResponse ¶
type UserMutesResponse struct { Data *UserMutesData `json:"data"` RateLimit *RateLimit }
UserMutesResponse is when a user mutes another
type UserObj ¶
type UserObj struct { ID string `json:"id"` Name string `json:"name"` UserName string `json:"username"` CreatedAt string `json:"created_at,omitempty"` Description string `json:"description,omitempty"` Entities *EntitiesObj `json:"entities,omitempty"` Location string `json:"location,omitempty"` PinnedTweetID string `json:"pinned_tweet_id,omitempty"` ProfileImageURL string `json:"profile_image_url,omitempty"` Protected bool `json:"protected,omitempty"` PublicMetrics *UserMetricsObj `json:"public_metrics,omitempty"` URL string `json:"url,omitempty"` Verified bool `json:"verified,omitempty"` WithHeld *WithHeldObj `json:"withheld,omitempty"` }
UserObj contains Twitter user account metadata describing the referenced user
type UserPinListData ¶
type UserPinListData struct {
Pinned bool `json:"pinned"`
}
UserPinListData pinned data
type UserPinListResponse ¶
type UserPinListResponse struct { List *UserPinListData `json:"data"` RateLimit *RateLimit }
UserPinListResponse pin list response
type UserPinnedListsMeta ¶
type UserPinnedListsMeta struct {
ResultCount int `json:"result_count"`
}
UserPinnedListsMeta the meta for pinned lists
type UserPinnedListsOpts ¶
type UserPinnedListsOpts struct { Expansions []Expansion ListFields []ListField UserFields []UserField }
UserPinnedListsOpts pinned list options
type UserPinnedListsRaw ¶
type UserPinnedListsRaw struct { Lists []*ListObj `json:"data"` Includes *ListRawIncludes `json:"includes,omitempty"` Errors []*ErrorObj `json:"errors,omitempty"` }
UserPinnedListsRaw the raw data for pinned lists
type UserPinnedListsResponse ¶
type UserPinnedListsResponse struct { Raw *UserPinnedListsRaw Meta *UserPinnedListsMeta `json:"meta"` RateLimit *RateLimit }
UserPinnedListsResponse pinned list response
type UserRaw ¶
type UserRaw struct { Users []*UserObj `json:"data"` Includes *UserRawIncludes `json:"includes,omitempty"` Errors []*ErrorObj `json:"errors,omitempty"` // contains filtered or unexported fields }
UserRaw is the raw response from the user lookup endpoint
func (*UserRaw) UserDictionaries ¶
func (u *UserRaw) UserDictionaries() map[string]*UserDictionary
UserDictionaries create a map of user dictionaries from the raw user response
type UserRawIncludes ¶
type UserRawIncludes struct { Tweets []*TweetObj `json:"tweets,omitempty"` // contains filtered or unexported fields }
UserRawIncludes contains any additional information from the user callout
func (*UserRawIncludes) TweetsByID ¶
func (u *UserRawIncludes) TweetsByID() map[string]*TweetObj
TweetsByID will return a map of tweet ids to object
type UserRetweetLookupOpts ¶
type UserRetweetLookupOpts struct { Expansions []Expansion TweetFields []TweetField UserFields []UserField MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField MaxResults int PaginationToken string }
UserRetweetLookupOpts are the options for the user retweet loopup
type UserRetweetLookupResponse ¶
type UserRetweetLookupResponse struct { Raw *UserRetweetRaw Meta *UserRetweetMeta `json:"meta"` RateLimit *RateLimit }
UserRetweetLookupResponse os the response that contains the users
type UserRetweetMeta ¶
type UserRetweetMeta struct { ResultCount int `json:"result_count"` NextToken string `json:"next_token"` PreviousToken string `json:"previous_token"` }
UserRetweetMeta is the meta data returned by the retweet user lookup
type UserRetweetRaw ¶
type UserRetweetRaw struct { Users []*UserObj `json:"data"` Includes *UserRetweetRawIncludes `json:"includes,omitempty"` Errors []*ErrorObj `json:"errors,omitempty"` }
UserRetweetRaw is the raw data and includes from the response
type UserRetweetRawIncludes ¶
type UserRetweetRawIncludes struct {
Tweets []*TweetObj `json:"tweets,omitempty"`
}
UserRetweetRawIncludes are the includes from the options
type UserRetweetResponse ¶
type UserRetweetResponse struct { Data *RetweetData `json:"data"` RateLimit *RateLimit }
UserRetweetResponse is the response with a user retweet
type UserReverseChronologicalTimelineMeta ¶ added in v2.1.0
type UserReverseChronologicalTimelineMeta struct { ResultCount int `json:"result_count"` NewestID string `json:"newest_id"` OldestID string `json:"oldest_id"` NextToken string `json:"next_token"` PreviousToken string `json:"previous_token"` }
UserReverseChronologicalTimelineMeta has the meta data from the reverse chronological timeline
type UserTimelineMeta ¶
type UserTimelineMeta struct { ResultCount int `json:"result_count"` NewestID string `json:"newest_id"` OldestID string `json:"oldest_id"` NextToken string `json:"next_token"` PreviousToken string `json:"previous_token"` }
UserTimelineMeta contains the meta data from the timeline callout
type UserTweetReverseChronologicalTimelineOpts ¶ added in v2.1.0
type UserTweetReverseChronologicalTimelineOpts struct { Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField Excludes []Exclude StartTime time.Time EndTime time.Time MaxResults int PaginationToken string SinceID string UntilID string }
UserTweetReverseChronologicalTimelineOpts are the options for the user tweet reverse chronological timeline
type UserTweetReverseChronologicalTimelineResponse ¶ added in v2.1.0
type UserTweetReverseChronologicalTimelineResponse struct { Raw *TweetRaw Meta *UserReverseChronologicalTimelineMeta `json:"meta"` RateLimit *RateLimit }
UserTweetReverseChronologicalTimelineResponse contains the tweet timeline for the reverse chronological timeline
type UserTweetTimelineOpts ¶
type UserTweetTimelineOpts struct { Expansions []Expansion MediaFields []MediaField PlaceFields []PlaceField PollFields []PollField TweetFields []TweetField UserFields []UserField Excludes []Exclude StartTime time.Time EndTime time.Time MaxResults int PaginationToken string SinceID string UntilID string }
UserTweetTimelineOpts are the options for the user tweet timeline request
type UserTweetTimelineResponse ¶
type UserTweetTimelineResponse struct { Raw *TweetRaw Meta *UserTimelineMeta `json:"meta"` RateLimit *RateLimit }
UserTweetTimelineResponse contains the information from the user tweet timeline callout
type UserUnfollowListResponse ¶
type UserUnfollowListResponse struct { List *UserFollowListData `json:"data"` RateLimit *RateLimit }
UserUnfollowListResponse is the user unfollow response
type UserUnpinListResponse ¶
type UserUnpinListResponse struct { List *UserPinListData `json:"data"` RateLimit *RateLimit }
UserUnpinListResponse unpin list response
type WithHeldObj ¶
type WithHeldObj struct { Copyright bool `json:"copyright"` CountryCodes []string `json:"country_codes"` }
WithHeldObj contains withholding details
Source Files ¶
- auth.go
- client.go
- common_obj.go
- compliance_batch.go
- compliance_batch_obj.go
- endpoints.go
- error_obj.go
- errors.go
- excludes.go
- expansions.go
- list_lookup.go
- list_manage.go
- list_obj.go
- media_obj.go
- place_obj.go
- poll_obj.go
- rate_limits.go
- space_lookup.go
- space_obj.go
- space_search.go
- topic_obj.go
- tweet_bookmarks.go
- tweet_counts.go
- tweet_counts_options.go
- tweet_dictionary.go
- tweet_likes.go
- tweet_manage.go
- tweet_obj.go
- tweet_options.go
- tweet_quote.go
- tweet_raw.go
- tweet_search.go
- tweet_stream.go
- user_blocks.go
- user_dictionary.go
- user_likes.go
- user_mutes.go
- user_obj.go
- user_options.go
- user_raw.go
- user_retweet.go