0PricingLogin
Kotlin Multiplatform Academy · Lesson

Wrap the API Behind the Repository

Hide Ktor and serialization from callers.

Now Build the Real Thing

With the interface set, you write a concrete implementation that actually fetches data behind the scenes.

Implement the Interface

Create a class that uses implements the repository interface, promising to fulfill every method it declares.

class UserRepositoryImpl : UserRepository

All lessons in this course

  1. Define a Repository Interface
  2. Wrap the API Behind the Repository
  3. Map DTOs to Domain Models
  4. Expose Results as Flow
← Back to Kotlin Multiplatform Academy