rick-and-morty-kmp
0.3indexedCreates an HTTP client library for accessing the Rick and Morty API, supporting asynchronous operations, JSON serialization, and integration with Android and iOS platforms.
Creates an HTTP client library for accessing the Rick and Morty API, supporting asynchronous operations, JSON serialization, and integration with Android and iOS platforms.
A Kotlin Multiplatform project that creates an Http client library around the Rick and Morty API.
The Rick and Morty API client supports both Android & iOS and can be added to the common main dependencies. Replace $version with the latest version:
buildScript {
repositories {
mavenCentral()
}
}
commonMain {
dependencies {
implementation("com.plusmobileapps:rick-and-morty-api:$version")
}
}
The API client itself can be accessed through RickAndMortyApi.instance where all of the following methods can be used.
// in a coroutine
val characters = RickAndMortyApi.instance.getCharacters(page = 1)
You can run the Android app itself from Android Studio or run the following command from the terminal to build and install on an Android device that is running.
./gradlew :sample:androidApp:installDebug
Open the sample/iosApp/iosApp.xcworkspace file or run the following command to open the iOS project.
cd sample/iosApp/
pod install
xed .
Surfaced from shared tags and platforms — no rankings paid for.