Companion

Types

Link copied to clipboard
Link copied to clipboard
data class AllItemsResponse(    val shows: List<SimklApi.Companion.AllItemsResponse.ShowMetadata> = emptyList(),     val anime: List<SimklApi.Companion.AllItemsResponse.ShowMetadata> = emptyList(),     val movies: List<SimklApi.Companion.AllItemsResponse.MovieMetadata> = emptyList())

https://simkl.docs.apiary.io/#reference/sync/get-all-items/get-all-items-in-the-user's-watchlist

Link copied to clipboard
data class EpisodeMetadata(val title: String?, val description: String?, val season: Int?, val episode: Int, val img: String?)

https://simkl.docs.apiary.io/#reference/tv/episodes/get-tv-show-episodes

Link copied to clipboard
class HistoryMediaObject(    val title: String? = null,     val year: Int? = null,     val ids: SimklApi.Companion.MediaObject.Ids? = null,     val seasons: List<SimklApi.Companion.MediaObject.Season>? = null,     val episodes: List<SimklApi.Companion.MediaObject.Season.Episode>? = null,     val rating: Int? = null,     val ratedAt: String? = null) : SimklApi.Companion.MediaObject
Link copied to clipboard
open class MediaObject(    val title: String?,     val year: Int?,     val ids: SimklApi.Companion.MediaObject.Ids?,     val totalEpisodes: Int? = null,     val status: String? = null,     val poster: String? = null,     val type: String? = null,     val seasons: List<SimklApi.Companion.MediaObject.Season>? = null,     val episodes: List<SimklApi.Companion.MediaObject.Season.Episode>? = null)

https://simkl.docs.apiary.io/#introduction/about-simkl-api/standard-media-objects Useful for finding shows from metadata

Link copied to clipboard
data class PinAuthResponse(val result: String, val deviceCode: String, val userCode: String, val verificationUrl: String, val expiresIn: Int, val interval: Int)
Link copied to clipboard
data class PinExchangeResponse(val result: String, val message: String? = null, val accessToken: String? = null)
Link copied to clipboard
class RatingMediaObject(    val title: String?,     val year: Int?,     val ids: SimklApi.Companion.MediaObject.Ids?,     val rating: Int,     val ratedAt: String? = getDateTime(unixTime)) : SimklApi.Companion.MediaObject
Link copied to clipboard

https://simkl.docs.apiary.io/#reference/users/settings/receive-settings

Link copied to clipboard
Link copied to clipboard
class StatusMediaObject(    val title: String?,     val year: Int?,     val ids: SimklApi.Companion.MediaObject.Ids?,     val to: String,     val watchedAt: String? = getDateTime(unixTime)) : SimklApi.Companion.MediaObject
Link copied to clipboard
Link copied to clipboard
data class TokenRequest(    val code: String,     val clientId: String = CLIENT_ID,     val clientSecret: String = CLIENT_SECRET,     val redirectUri: String = "://simkl",     val grantType: String = "authorization_code")
Link copied to clipboard
data class TokenResponse(val accessToken: String, val tokenType: String, val scope: String)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun getDateTime(unixTime: Long?): String?

1409562611 -> 2014-09-01T09:10:11Z

Link copied to clipboard
suspend fun getEpisodes(simklId: Int?, type: String?, episodes: Int?, hasEnded: Boolean?): Array<SimklApi.Companion.EpisodeMetadata>?
Link copied to clipboard
fun getPosterUrl(poster: String): String
Link copied to clipboard
fun getUnixTime(string: String?): Long?