-
Notifications
You must be signed in to change notification settings - Fork 26
getUser(__userFields_tweetFields_)
daneden edited this page Jan 13, 2022
·
2 revisions
Returns a variety of information about a single user specified by the requested ID.
public func getUser(_ userId: User.ID,
userFields: [User.Fields] = [],
tweetFields: [Tweet.Fields] = []
)
Equivalent to GET /2/users/:id
.
- wrappedUserID: The ID or screen name of the user to lookup.
- userFields: This fields parameter enables you to select which specific user fields will deliver with each returned users objects. These specified user fields will display directly in the returned user struct.
- tweetFields: This fields parameter enables you to select which specific Tweet fields will deliver in each returned pinned Tweet. The Tweet fields will only return if the user has a pinned Tweet. While the referenced Tweet ID will be located in the original Tweet object, you will find this ID and all additional Tweet fields in the
includes
property on the returnedTwitterAPIDataAndIncludes
.
A Twitter API response object containing the User and any pinned tweets
Generated at 2022-11-07T15:07:20+0000 using swift-doc 1.0.0-rc.1.
Types
- BlockResponse
- BookmarkResponse
- CreatedListResponse
- DeleteResponse
- ErrorDetail
- FilteredStreamRule
- FilteredStreamRuleMeta
- FilteredStreamRuleMeta.Summary
- FollowResponse
- Geo
- Geo.Coordinates
- GeoJSON
- GeoJSONType
- HiddenResponse
- LikeResponse
- List
- List.Expansions
- List.Includes
- ListMembershipResponse
- Media
- Media.Metrics
- Media.PublicMetrics
- Media.Variant
- MediaCategory
- MediaType
- MediaUploadResponse
- MediaUploadResponse.MediaProcessingInfo
- MediaUploadResponse.MediaProcessingInfo.ProcessingError
- MediaUploadResponse.MediaProcessingInfo.State
- MentionEntity
- Meta
- MutableFilteredStreamRule
- MutableMedia
- MutablePoll
- MutableTweet
- MutableTweet.Reply
- MuteResponse
- OAuth2Scope
- OAuth2User
- OAuthCredentials
- PinnedResponse
- Place
- Poll
- Poll.Option
- Poll.VotingStatus
- PostTweetResponse
- RetweetResponse
- SearchSpacesState
- Space
- Space.Expansions
- Space.Includes
- TagEntity
- Topic
- Topic.Field
- Tweet
- Tweet.AnnotationEntity
- Tweet.Attachments
- Tweet.Entities
- Tweet.Expansions
- Tweet.Includes
- Tweet.NonPublicMetrics
- Tweet.OrganicMetrics
- Tweet.PromotedMetrics
- Tweet.PublicMetrics
- Tweet.ReferencedTweet
- Tweet.ReferencedTweet.ReferenceType
- Tweet.ReplyAudience
- Tweet.URLEntity
- TweetExclusion
- Twift.Authentication
- Twift.AuthenticationType
- Twift.AuthenticationTypeRepresentation
- TwiftError
- TwitterAPIData
- TwitterAPIDataAndIncludes
- TwitterAPIDataAndMeta
- TwitterAPIDataIncludesAndMeta
- TwitterAPIError
- UpdatedListResponse
- User
- User.DescriptionEntity
- User.Entities
- User.Expansions
- User.Includes
- User.URLEntity
- User.URLEntityDetails
- User.UserProfileMetrics
- WithheldInformation
- WithheldInformation.Scope
Global Variables
Global Functions
- addAltText(to:text:)
- addBookmark(_:userId:)
- addListMember(_:to:)
- authenticateUser(clientId:redirectUri:scope:presentationContextProvider:)
- blockUser(sourceUserId:targetUserId:)
- checkMediaUploadSuccessful(_:)
- createList(name:description:isPrivate:)
- deleteBookmark(_:userId:)
- deleteList(_:)
- deleteListMember(_:from:)
- deleteTweet(_:)
- filteredStream(fields:expansions:backfillMinutes:)
- followList(_:userId:)
- followUser(sourceUserId:targetUserId:)
- getBlockedUsers(for:fields:expansions:paginationToken:maxResults:)
- getBookmarks(for:fields:expansions:paginationToken:maxResults:)
- getFilteredStreamRules(ids:)
- getFollowedLists(_:fields:expansions:paginationToken:maxResults:)
- getFollowers(_:fields:expansions:paginationToken:maxResults:)
- getFollowing(_:fields:expansions:paginationToken:maxResults:)
- getLikedTweets(for:fields:expansions:paginationToken:maxResults:)
- getLikingUsers(for:fields:expansions:paginationToken:maxResults:)
- getList(_:fields:expansions:)
- getListFollowers(_:fields:expansions:paginationToken:maxResults:)
- getListMembers(for:fields:expansions:paginationToken:maxResults:)
- getListMemberships(for:fields:expansions:paginationToken:maxResults:)
- getListTweets(_:fields:expansions:paginationToken:maxResults:)
- getMe(fields:expansions:)
- getMutedUsers(for:fields:expansions:paginationToken:maxResults:)
- getPinnedLists(_:fields:expansions:)
- getSpace(_:fields:expansions:)
- getSpaceBuyers(_:fields:expansions:)
- getSpaceTweets(_:fields:expansions:)
- getSpaces(_:fields:expansions:)
- getSpacesByCreatorIds(_:fields:expansions:)
- getTweet(_:fields:expansions:)
- getTweets(_:fields:expansions:)
- getUser(_:fields:expansions:)
- getUserBy(username:fields:expansions:)
- getUserOwnedLists(_:fields:expansions:paginationToken:maxResults:)
- getUsers(_:fields:expansions:)
- getUsersBy(usernames:fields:expansions:)
- hideReply(_:)
- likeTweet(_:userId:)
- modifyFilteredStreamRules(add:delete:dryRun:)
- muteUser(sourceUserId:targetUserId:)
- pinList(_:userId:)
- postTweet(_:)
- quoteTweets(for:fields:expansions:paginationToken:maxResults:)
- refreshOAuth2AccessToken(onlyIfExpired:)
- retweet(_:userId:)
- retweets(for:fields:expansions:paginationToken:maxResults:)
- reverseChronologicalTimeline(_:fields:expansions:startTime:endTime:exclude:sinceId:untilId:paginationToken:maxResults:)
- searchAllTweets(query:fields:expansions:endTime:startTime:maxResults:nextToken:sinceId:untilId:)
- searchRecentTweets(query:fields:expansions:endTime:startTime:maxResults:nextToken:sinceId:untilId:)
- searchSpaces(query:fields:expansions:state:)
- unblockUser(sourceUserId:targetUserId:)
- unfollowList(_:userId:)
- unfollowUser(sourceUserId:targetUserId:)
- unhideReply(_:)
- unlikeTweet(_:userId:)
- unmuteUser(sourceUserId:targetUserId:)
- unpinList(_:userId:)
- unretweet(_:userId:)
- updateList(id:name:description:isPrivate:)
- upload(mediaData:mimeType:category:progress:)
- userMentions(_:fields:expansions:startTime:endTime:exclude:sinceId:untilId:paginationToken:maxResults:)
- userTimeline(_:startTime:endTime:exclude:sinceId:untilId:fields:expansions:paginationToken:maxResults:)
- volumeStream(fields:expansions:backfillMinutes:)