ProviderWebViewApi

abstract class ProviderWebViewApi(val client: OkHttpClient, val provider: Provider, val context: Context) : ProviderApi

The base class for every provider api that uses a WebView.

An api will provide source links for a given film. It could also be used to search for films and retrieve detailed information about them.

Constructors

Link copied to clipboard
constructor(client: OkHttpClient, provider: Provider, context: Context)

Properties

Link copied to clipboard
open val baseUrl: String

The base URL used for network requests. Defaults to an empty string.

Link copied to clipboard

The list of ProviderCatalogs that this provider provides. Defaults to an empty list.

Link copied to clipboard
val client: OkHttpClient

The dirty OkHttpClient instance used for network requests.

Link copied to clipboard
Link copied to clipboard

The list of Filters that this provider's search method supports. Defaults to an empty list.

Link copied to clipboard

The Provider object representing the provider's information.

Link copied to clipboard

The Film to use for testing purposes. Defaults to The Godfather (1972).

Functions

Link copied to clipboard
open suspend fun getCatalogItems(catalog: ProviderCatalog, page: Int = 1): SearchResponseData<FilmSearchItem>

Obtains a list of Film items from the provider's catalogs.

Link copied to clipboard
open suspend fun getFilmDetails(film: Film): FilmDetails

Retrieves detailed information about a film.

Link copied to clipboard
open suspend fun getLinks(watchId: String, film: FilmDetails, episode: Episode? = null, onLinkFound: (MediaLink) -> Unit)
open suspend fun getLinks(watchId: String, film: FilmMetadata, episode: Episode? = null, onLinkFound: (MediaLink) -> Unit)

Obtains resource links for the provided film, season, and episode.

Link copied to clipboard
open suspend fun getMetadata(film: Film): FilmMetadata

Retrieves detailed information about a film.

Link copied to clipboard

WARNING: THIS MUST ONLY BE CALLED ON THE MAIN THREAD.

Link copied to clipboard
open suspend fun search(title: String, page: Int = 1, id: String? = null, imdbId: String? = null, tmdbId: Int? = null, filters: FilterList = this.filters): SearchResponseData<FilmSearchItem>

Searches for films based on the provided criteria.