browseChannels

abstract suspend fun browseChannels(    categories: List<String>? = null,     excludedCategories: List<String>? = null,     subscribed: Boolean? = null,     limit: Int = 100,     offset: Int = 0,     sortField: String = "subscribers_count",     sortOrder: Int = SORT_DESCENDING): RainbowResult<List<Channel>>

Browse and filter channels based on specified criteria.

This method allows you to search and filter channels by various parameters, including categories, subscription status, sorting options, and pagination. It returns a list of channels that match the provided criteria. The result is wrapped in a RainbowResult to indicate success or failure.

Return

A RainbowResult containing a list of Channel objects matching the provided filters. In case of failure, the result will contain error details.

Parameters

categories

A list of String categories to filter channels by (case-sensitive). If provided, only channels with a matching category will be included.

excludedCategories

A list of String categories to exclude from the search. Channels belonging to any of these categories will be excluded from the result.

subscribed

A Boolean? indicating whether to filter channels by subscription status. Set to true to retrieve only subscribed channels, false for non-subscribed, or null for no filtering on subscription status.

limit

An Int specifying the maximum number of channels to retrieve (default is 100).

offset

An Int specifying the starting position of the first channel to retrieve (default is 0).

sortField

A String indicating the field to sort channels by (default is "subscribers_count"). Authorized values: name, topic, creationDate, subscribers_count.

sortOrder

An Int indicating the sort order. Use SORT_ASCENDING for ascending order or SORT_DESCENDING for descending order (default is SORT_DESCENDING).