Api lib with similar patron as a Builder Pattern + Builded with kotlin + Kotlin Coroutines 🎈
with Gradle
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation("com.github.darkryh:MonosChinosApi:$version")
}
ViewModel() {
fun getHome(context : Context) = viewModelScope.launch(IO) {
val home : Home = MonosChinos.getHome()
val lastChapter : List<HomeChapter> = home.lastChapters
val recentSeries : List<HomeAnime> = home.recentSeries
}
}
ViewModel() {
fun getAnimes(context : Context) = viewModelScope.launch(IO) {
val animeList : List<Anime> = MonosChinos.searchQuery("death note")
}
}
ViewModel() {
fun getAnimes(context : Context) = viewModelScope.launch(IO) {
val animeList : List<Anime> = MonosChinos.searchQuery("death note")
val anime = animeList.first()
//the seo is the id set the query
val animeDetail = MonosChinos.player(anime.seo)
}
}
- Home : the function homePage().get() return a list
- Player : the function playerPager(seo : String).get() return a Player?, the server options
- Search : the function searchPage(name : String).get() return a list
- AnimeDetail : the function animeDetailPage(seo : String) return AnimeDetail?
- Chapters : the function chaptersPage(seo : String) return a list
data class Home(
val lastChapters : List<HomeChapter>,
val recentSeries : List<HomeAnime>
)
data class HomeAnime(
val seo : String,
val title : String,
val type : String,
val image : String,
val url : String
)
data class HomeChapter(
val seo : String,
val title : String,
val number : Int,
val type : String,
val image : String,
val url : String
)
data class Anime(
val seo : String,
val title : String,
val type : String,
val year : Int,
val image : String,
val url : String
)
data class AnimeDetail(
val title : String,
val alternativeTitle : String?,
val status : String,
val coverImage : String,
val profileImage : String,
val release : String,
val synopsis : String,
val genres : List<String>
)
data class Episode(
val seo : String,
val number : Int,
val image : String,
val url : String
)
data class Player(
val options : List<String>,
val downloads : List<String>
)
No problem sr, just contact me in my X account @Darkryh or just make a request.