getListMemberships(for_fields_expansions_paginationToken_maxResults_) - daneden/Twift GitHub Wiki

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

Returns all Lists a specified user is a member of.

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

Equivalent to GET /2/user/:user_id/list_memberships

Parameters

  • userId: The user ID whose List memberships you would like to retrieve.
  • 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 response object containing an array of Lists the user is a member of, any expanded objects, and a meta object with pagination tokens.

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