fetchChannelsByCategory

abstract suspend fun fetchChannelsByCategory(    category: String,     excludedCategories: List<String>? = null,     limit: Int = 100,     offset: Int = 0): RainbowResult<List<Channel>>

Fetch channels by specified categories.

This method allows you to search and retrieve channels based on categories. You must provide at least one of the following:

  • category: to fetch channels belonging to a specific category.

  • excludedCategories: to fetch channels that do not belong to the specified categories.

The result is returned as a list of Channel objects matching the filters applied.

Return

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

Parameters

category

A String representing the category to filter channels by (case-sensitive). Only channels with this category will be returned.

excludedCategories

A List<String>? representing categories to exclude from the search. Channels that belong to any of these categories will not be included in the result.

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).