getBookmarks(for_fields_expansions_paginationToken_maxResults_) - daneden/Twift GitHub Wiki

getBookmarks(for:fields:expansions:paginationToken:maxResults:)

Allows you to get an authenticated user's 800 most recent bookmarked Tweets.

public func getBookmarks(for userId: User.ID,
                           fields: Set<Tweet.Field> = [],
                           expansions: [Tweet.Expansions] = [],
                           paginationToken: String? = nil,
                           maxResults: Int = 10
  )

Equivalent to GET /2/users/:id/bookmarks

Parameters

  • userId: User ID of an authenticated user to request bookmarked Tweets for.
  • fields: Any additional fields to include on returned objects
  • expansions: Objects and their corresponding fields that should be expanded in the includes property
  • paginationToken: When iterating over pages of results, you can pass in the nextToken from the previously-returned value to get the next page of results
  • maxResults: The maximum number of results to fetch.

Returns

A Twitter API response object containing an array of Tweet structs representing the authenticated user's bookmarked Tweets