searchSpaces(query_fields_expansions_state_) - daneden/Twift GitHub Wiki
searchSpaces(query:fields:expansions:state:)
Return live or scheduled Spaces matching your specified search terms. This endpoint performs a keyword search, meaning that it will return Spaces that are an exact case-insensitive match of the specified search term. The search term will match the original title of the Space.
public func searchSpaces(query: String,
fields: Set<Space.Field> = [],
expansions: [Space.Expansions] = [],
state: SearchSpacesState = .all
)
Equivalent to GET /2/spaces/search
Parameters
- query: Your search term. This can be any text (including mentions and Hashtags) present in the title of the Space.
- fields: Any additional fields to include on returned objects
- expansions: Objects and their corresponding fields that should be expanded in the
includes
property - state: Determines the type of results to return. This endpoint returns all Spaces by default.
Returns
A response object containing an array of Spaces matching the search query, any requested expansions, and a meta object with result count information.