getMe(userFields_expansions_tweetFields_) - daneden/Twift GitHub Wiki

getMe(userFields:expansions:tweetFields:)

Returns a variety of information about the currently-authenticated user

public func getMe(userFields: [User.Fields] = [],
                    expansions: [User.Expansions] = [],
                    tweetFields: [Tweet.Fields] = []
  )

Equivalent to GET /2/users/me.

Parameters

  • 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 returned TwitterAPIDataAndIncludes struct.

Returns

A Twitter API response object containing the User and any pinned tweets