Home - daneden/Twift GitHub Wiki
Types
Twift.Authentication :
A convenience class for acquiring user access token
Twift.AuthenticationType :
The available authentication types for initializing new Twift
client instances
Twift.AuthenticationTypeRepresentation :
A convenience enum for representing AuthenticationType
without associated values in auth-related errors
OAuth2Scope :
The available access scopes for Twitter's OAuth 2.0 user authentication.
TwiftError :
The error types relating to Twift instances and methods.
MediaCategory
MediaUploadResponse.MediaProcessingInfo.State
SearchSpacesState
TweetExclusion
List.Expansions :
Fields that can be expanded on the List
type
MediaType
GeoJSONType
Poll.VotingStatus :
The voting status for the associated poll
Space.Expansions :
Available expansions for Spaces
Topic.Field
Tweet.ReplyAudience :
The audience that can reply to an associated Tweet
Tweet.ReferencedTweet.ReferenceType :
The type of reference for referenced Tweets
Tweet.Expansions :
Available fields that can be expanded on Tweet objects
User.Expansions :
Available object expansions for the User
type
WithheldInformation.Scope :
Scopes for withheld information
TwitterAPIData :
The response object from the Twitter API containing the requested object(s) in the data
property
TwitterAPIDataAndMeta :
The response object from the Twitter API containing the requested object(s) in the data
property
TwitterAPIDataAndIncludes :
A response object from the Twitter API containing the requested object(s) in the data
property, and expansions in the includes
property
TwitterAPIDataIncludesAndMeta :
A response object from the Twitter API containing the requested object(s) in the data
property, expansions in the includes
property, and additional information (such as pagination tokens) in the meta
property
Meta :
An object containing pagination information for paginated requests
OAuth2User :
An OAuth 2.0 user authentication object
BlockResponse :
A response object containing information relating to a block status.
BookmarkResponse :
A response object containing information relating to Bookmark-related API requests
TwitterAPIError :
An error returned from the Twitter API
ErrorDetail
FollowResponse :
A response object containing information relating to a follow status.
LikeResponse :
A response object containing information relating to Like-related API requests
ListMembershipResponse :
A response object containing information relating to a list membership request.
PinnedResponse :
A response object containing information relating to a pinned list request.
CreatedListResponse :
A response object containing information relating to newly-created lists
UpdatedListResponse :
A response object containing information relating to updated lists
MediaUploadResponse :
A response object containing information about the uploaded media
MediaUploadResponse.MediaProcessingInfo :
An object containing information about the media's processing status.
MediaUploadResponse.MediaProcessingInfo.ProcessingError :
An error associated with media processing
MuteResponse :
A response object containing information relating to a mute status.
RetweetResponse :
A Twitter API response object pertaining to Retweet requests
PostTweetResponse :
A response object containing the newly-posted Tweet's ID and text content
MutableTweet :
A mutable Tweet object for creating new Tweets via the postTweet
method
MutableTweet.Reply :
An object describing how to form a reply to a Tweet
MutableMedia :
A mutable Media object for posting media with MutableTweet
MutablePoll :
A mutable Poll object for posting polls with MutableTweet
DeleteResponse :
A response object pertaining to requests that delete objects
HiddenResponse :
A response object pertaining to requests for hiding/unhiding Tweets
List :
The list object contains Twitter Lists metadata describing the referenced List. The List object is the primary object returned in the List lookup endpoint.
List.Includes :
Expanded objects included alongside the List
Media :
Media refers to any image, GIF, or video attached to a Tweet. The media object is not a primary object on any endpoint, but can be found and expanded in the Tweet object.
Media.Metrics
Media.PublicMetrics
Media.Variant
Place :
The place tagged in a Tweet is not a primary object on any endpoint, but can be found and expanded in the Tweet resource.
GeoJSON
Geo :
An object containing details for a location
Geo.Coordinates
Poll :
A poll included in a Tweet is not a primary object on any endpoint, but can be found and expanded in the Tweet object.
Poll.Option :
A single option in a Tweet poll
Space :
Spaces allow expression and interaction via live audio conversations. The Space data dictionary contains relevant metadata about a Space; all the details are updated in real time.
Space.Includes
Topic
FilteredStreamRuleMeta :
An object containing data relating to the creation and deletion of filtered stream rules
FilteredStreamRuleMeta.Summary
FilteredStreamRule
MutableFilteredStreamRule :
A mutable version of FilteredStreamRule
for creating new rules
Tweet
Tweet.Attachments
Tweet.Entities
Tweet.AnnotationEntity
Tweet.URLEntity
Tweet.NonPublicMetrics :
Tweet engagement metrics only visible to the Tweet author/promoter
Tweet.OrganicMetrics :
Tweet engagement metrics only visible to the Tweet author/promoter
Tweet.PromotedMetrics :
Tweet engagement metrics only visible to the Tweet author/promoter
Tweet.PublicMetrics :
Tweet engagement metrics that are visible to everyone on Twitter
Tweet.ReferencedTweet
Tweet.Includes :
A structure containing any requested expansions for this Tweet request
User :
The user object contains Twitter user account metadata describing the referenced user.
User.Includes :
Additional objects that can be requested with Users by expanding the pinnedTweetId
field
User.UserProfileMetrics :
Public metrics relating to the user
User.Entities :
Contains details about text that has a special meaning in the user's description
User.DescriptionEntity :
Contains details about text that has a special meaning in the user's description
User.URLEntity :
Contains details about text that has a special meaning in the user's description
User.URLEntityDetails :
Contains details about text that has a special meaning in the user's description
OAuthCredentials :
A structure containing OAuth key and secret tokens
TagEntity :
A tag entity (such as a hashtag or cashtag) found in a string, with indices in its parent string
MentionEntity :
An @username mention entity found in a string, with indices in its parent string
WithheldInformation :
Information about reasons why and/or countries where the associated content is withheld
More information: https://help.twitter.com/en/rules-and-policies/tweet-withheld-by-country
Global Functions
authenticateUser(clientId:redirectUri:scope:presentationContextProvider:) :
Authenticates the user using Twitter's OAuth 2.0 PKCE flow.
authenticateUser(clientId:redirectUri:scope:presentationContextProvider:) :
Authenticates the user using Twitter's OAuth 2.0 PKCE flow.
getBlockedUsers(for:fields:expansions:paginationToken:maxResults:) :
Returns a list of users who are blocked by the specified user ID.
blockUser(sourceUserId:targetUserId:) :
Causes the source user to block the target user. The source user ID must match the currently authenticated user ID.
unblockUser(sourceUserId:targetUserId:) :
Causes the source user to block the target user. The source user ID must match the currently authenticated user ID.
getBookmarks(for:fields:expansions:paginationToken:maxResults:) :
Allows you to get an authenticated user's 800 most recent bookmarked Tweets.
addBookmark(_:userId:) :
Causes the user ID of an authenticated user identified in the path parameter to Bookmark the target Tweet
deleteBookmark(_:userId:) :
Allows a user or authenticated user ID to remove a Bookmark of a Tweet.
getFollowing(_:fields:expansions:paginationToken:maxResults:) :
Returns a list of users the specified user ID is following.
getFollowers(_:fields:expansions:paginationToken:maxResults:) :
Returns a list of users who are followers of the specified user ID.
followUser(sourceUserId:targetUserId:) :
Allows a user ID to follow another user.
unfollowUser(sourceUserId:targetUserId:) :
Allows a user ID to unfollow another user.
likeTweet(_:userId:) :
Causes the user ID to Like the target Tweet.
unlikeTweet(_:userId:) :
Causes the user ID to unlike the target Tweet.
getLikingUsers(for:fields:expansions:paginationToken:maxResults:) :
Allows you to get information about a Tweet’s liking users.
getLikedTweets(for:fields:expansions:paginationToken:maxResults:) :
Allows you to get information about a user’s liked Tweets.
getListTweets(_:fields:expansions:paginationToken:maxResults:) :
Returns a list of Tweets from the specified List.
getList(_:fields:expansions:) :
Returns the details of a specified List.
getUserOwnedLists(_:fields:expansions:paginationToken:maxResults:) :
Returns all Lists owned by the specified user.
deleteList(_:) :
Enables the authenticated user to delete a List that they own.
createList(name:description:isPrivate:) :
Enables the authenticated user to create a new List.
updateList(id:name:description:isPrivate:) :
Enables the authenticated user to create a new List.
getListMemberships(for:fields:expansions:paginationToken:maxResults:) :
Returns all Lists a specified user is a member of.
getListMembers(for:fields:expansions:paginationToken:maxResults:) :
Returns a list of users who are members of the specified List.
deleteListMember(_:from:) :
Enables the authenticated user to remove a member from a List they own.
addListMember(_:to:) :
Enables the authenticated user to add a member to a List they own.
unfollowList(_:userId:) :
Enables the authenticated user to unfollow a List.
followList(_:userId:) :
Enables the authenticated user to follow a List.
getListFollowers(_:fields:expansions:paginationToken:maxResults:) :
Returns a list of users who are followers of the specified List.
getFollowedLists(_:fields:expansions:paginationToken:maxResults:) :
Returns all Lists a specified user follows.
pinList(_:userId:) :
Enables the authenticated user to pin a List.
unpinList(_:userId:) :
Enables the authenticated user to unpin a List.
getPinnedLists(_:fields:expansions:) :
Returns all Lists a specified user has pinned.
upload(mediaData:mimeType:category:progress:) :
Uploads media data and returns an ID string that can be used to attach media to Tweets
addAltText(to:text:) :
Allows the user to provide alt text for the mediaId
. This feature is currently only supported for images and GIFs.
checkMediaUploadSuccessful(_:) :
Checks to see whether the mediaId
has finished processing successfully. This method will wait for the GET /1.1/media/upload.json?command=STATUS
endpoint to return either succeeded
or failed
; for large videos, this may take some time.
getMutedUsers(for:fields:expansions:paginationToken:maxResults:) :
Returns a list of users who are muted by the specified user ID.
muteUser(sourceUserId:targetUserId:) :
Causes the source user to mute the target user. The source user ID must match the currently authenticated user ID.
unmuteUser(sourceUserId:targetUserId:) :
Causes the source user to mute the target user. The source user ID must match the currently authenticated user ID.
retweet(_:userId:) :
Causes the user ID to Retweet the target Tweet
unretweet(_:userId:) :
Causes the user ID to remove the Retweet of a Tweet
retweets(for:fields:expansions:paginationToken:maxResults:) :
Allows you to get information about who has Retweeted a Tweet.
quoteTweets(for:fields:expansions:paginationToken:maxResults:) :
Returns Quote Tweets for a Tweet specified by the requested Tweet ID.
searchRecentTweets(query:fields:expansions:endTime:startTime:maxResults:nextToken:sinceId:untilId:) :
The recent search endpoint returns Tweets from the last seven days that match a search query.
searchAllTweets(query:fields:expansions:endTime:startTime:maxResults:nextToken:sinceId:untilId:) :
This endpoint is only available to those users who have been approved for Academic Research access .
getSpace(_:fields:expansions:) :
Returns a variety of information about a single Space specified by the requested ID.
getSpaces(_:fields:expansions:) :
Returns details about multiple Spaces. Up to 100 comma-separated Spaces IDs can be looked up using this endpoint.
searchSpaces(query:fields:expansions:state:) :
Return live or scheduled Spaces matching your specified search terms. This endpoint performs a keyword search, meaning that it will return Spaces that are an exact case-insensitive match of the specified search term. The search term will match the original title of the Space.
getSpaceBuyers(_:fields:expansions:) :
Returns a list of user who purchased a ticket to the requested Space. You must authenticate the request using the access token of the creator of the requested Space.
getSpaceTweets(_:fields:expansions:) :
Returns Tweets shared in the requested Spaces.
getSpacesByCreatorIds(_:fields:expansions:) :
Returns live or scheduled Spaces created by the specified user IDs. Up to 100 comma-separated IDs can be looked up using this endpoint.
volumeStream(fields:expansions:backfillMinutes:) :
Streams about 1% of all Tweets in real-time.
filteredStream(fields:expansions:backfillMinutes:) :
Streams Tweets in real-time based on a specific set of filter rules.
getFilteredStreamRules(ids:) :
Return a list of rules currently active on the streaming endpoint, either as a list or individually.
modifyFilteredStreamRules(add:delete:dryRun:) :
Add or delete rules to your stream.
getTweet(_:fields:expansions:) :
Returns a variety of information about a single Tweet specified by the requested ID.
getTweets(_:fields:expansions:) :
Returns a variety of information about the Tweet specified by the requested ID or list of IDs.
userTimeline(_:startTime:endTime:exclude:sinceId:untilId:fields:expansions:paginationToken:maxResults:) :
Returns Tweets composed by a single user, specified by the requested user ID. By default, the most recent ten Tweets are returned per request. Using pagination, the most recent 3,200 Tweets can be retrieved.
userMentions(_:fields:expansions:startTime:endTime:exclude:sinceId:untilId:paginationToken:maxResults:) :
Returns Tweets mentioning a single user specified by the requested user ID. By default, the most recent ten Tweets are returned per request. Using pagination, up to the most recent 800 Tweets can be retrieved.
reverseChronologicalTimeline(_:fields:expansions:startTime:endTime:exclude:sinceId:untilId:paginationToken:maxResults:) :
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.
deleteTweet(_:) :
Allows a user or authenticated user ID to delete a Tweet.
postTweet(_:) :
Creates a Tweet on behalf of an authenticated user.
hideReply(_:) :
Hides a reply to a Tweet.
unhideReply(_:) :
Unhides a reply to a Tweet.
getUser(_:fields:expansions:) :
Returns a variety of information about a single user specified by the requested ID.
getUserBy(username:fields:expansions:) :
Returns a variety of information about a single user specified by the requested username.
getMe(fields:expansions:) :
Returns a variety of information about the currently-authenticated user
getUsers(_:fields:expansions:) :
Returns a variety of information about one or more users specified by the requested IDs.
getUsersBy(usernames:fields:expansions:) :
Returns a variety of information about one or more users specified by the requested usernames (handles).
refreshOAuth2AccessToken(onlyIfExpired:) :
Refreshes the OAuth 2.0 token, optionally forcing a refresh even if the token is still valid
After a successful refresh, a user-defined callback is performed. (optional)
Global Variables
Extensions
🗂️ Page Index for this GitHub Wiki