getUsers(__fields_expansions_) - daneden/Twift GitHub Wiki

getUsers(_:fields:expansions:)

Returns a variety of information about one or more users specified by the requested IDs.

public func getUsers(_ userIds: [User.ID],
                       fields: Set<User.Field> = [],
                       expansions: [User.Expansions] = []
  )

Equivalent to GET /2/users.

Parameters

  • userIds: The list of user IDs. Up to 100 are allowed in a single request.
  • fields: Any additional fields to include on returned objects
  • expansions: Objects and their corresponding fields that should be expanded in the includes property

Returns

A Twitter API response object containing an array of User structs and any pinned tweets in the includes property

⚠️ **GitHub.com Fallback** ⚠️