Format code with ktlint via Spotless
mainTivi uses ktlint for code style, managed by the spotless Gradle plugin. To automatically fix code style conflicts and apply formatting, run the following command in your terminal:
./gradlew spotlessApplyrepository·main·Indexed 27 days ago
https://github.com/chrisbanes/tiviA TV show tracking application connecting to Trakt.tv, built with Kotlin Multiplatform and Compose Multiplatform for Android, iOS, and Desktop JVM. Includes developer guides for API configuration, environment setup, and details on the TiviTrakt client and data models.
Tivi uses ktlint for code style, managed by the spotless Gradle plugin. To automatically fix code style conflicts and apply formatting, run the following command in your terminal:
./gradlew spotlessApplyTivi is a standard Gradle project. You can open it using recent versions of Android Studio or IntelliJ IDEA.
android-app/app/ (:android-app:app)desktop-app/ (:desktop-app)The iOS project is an Xcode project that uses CocoaPods for dependency management. Follow these steps to set up your environment:
rbenv is recommended)..xcode-version file.bundle install to install Ruby dependencies and pod install for CocoaPods.ios-app/Tivi/Tivi.xcworkspace in Xcode.# Setup Ruby environment
brew install rbenv
rbenv init
rbenv install 3.3.4
rbenv global 3.3.4
gem install bundler
# Install project dependencies
cd /path/to/tivi/checkout
bundle install
pod install --project-directory=ios-app/TiviTo run the application, you must provide API and client keys for Trakt.tv and TMDb. These should be added to your local ~/.gradle/gradle.properties file.
Trakt.tv OAuth Configuration: When creating your Trakt API project, you must set the OAuth redirect URI based on the build type:
app.tivi.debug://auth/oauth2callbackapp.tivi://auth/oauth2callback# Get these from Trakt.tv
TIVI_TRAKT_CLIENT_ID=<insert>
TIVI_TRAKT_CLIENT_SECRET=<insert>
# Get this from TMDb
TIVI_TMDB_API_KEY=<insert>invalidateAuth() on your TiviTrakt instance to force the underlying Ktor client to re-fetch bearer tokens. This is useful if the current tokens are invalid or need to be refreshed immediately.TiviTrakt DSL function to instantiate a new Trakt client. You must provide a traktApiKey within the configuration block. The client provides access to various Trakt API modules such as movies, shows, search, and users.TiviTrakt client exposes the following API modules for interacting with Trakt.tv services:MultipleEntry interface represents an entry that involves more than one show. It extends Entry and adds an otherShowId property of type Long.PaginatedEntry interface represents an entry that belongs to a specific page in a paginated list. It extends Entry and adds a page property of type Int.Entry interface represents a core application entity that is associated with a specific show. It extends TiviEntity and requires a showId property of type Long.