Skip to content

Commit

Permalink
fix(provider): change required ProviderApi methods to optional
Browse files Browse the repository at this point in the history
  • Loading branch information
rhenwinch committed Jun 6, 2024
1 parent c498dfb commit aa5de00
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions provider/src/main/kotlin/com/flixclusive/provider/ProviderApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ abstract class ProviderApi(
/**
* The base URL used for network requests. Defaults to an empty string.
*/
protected open val baseUrl: String = ""
open val baseUrl: String = ""

/**
* The list of supported extractors, embeds, or servers for this provider instance.
*/
protected open val supportedExtractors: List<Extractor> = emptyList()
open val supportedExtractors: List<Extractor> = emptyList()

/**
* Whether this provider needs to use a WebView to scrape content
Expand All @@ -48,21 +48,25 @@ abstract class ProviderApi(
* @param page The page number for paginated results. Defaults to 1.
* @return a [SearchResults] instance containing the search results.
*/
abstract suspend fun search(
open suspend fun search(
film: Film,
page: Int = 1,
): SearchResults
): SearchResults {
TODO("OPTIONAL: Not yet implemented")
}

/**
* Retrieves detailed information about a film.
* @param filmId The ID of the film. The ID must come from the [search] method.
* @param filmType The type of film.
* @return a [FilmInfo] instance containing the film's information.
*/
abstract suspend fun getFilmInfo(
open suspend fun getFilmInfo(
filmId: String,
filmType: FilmType,
): FilmInfo
): FilmInfo {
TODO("OPTIONAL: Not yet implemented")
}

/**
* Obtains source links for the provided film, season, and episode.
Expand Down

0 comments on commit aa5de00

Please sign in to comment.