Companion

object Companion

Types

Link copied to clipboard

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 rated_at: 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 total_episodes: 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
class RatingMediaObject(val title: String?, val year: Int?, val ids: SimklApi.Companion.MediaObject.Ids?, val rating: Int, val rated_at: 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 watched_at: String? = getDateTime(unixTime)) : SimklApi.Companion.MediaObject
Link copied to clipboard
Link copied to clipboard

Set of sync services simkl is compatible with. Add more as required: https://simkl.docs.apiary.io/#reference/search/id-lookup/get-items-by-id

Link copied to clipboard
data class TokenRequest(val code: String, val client_id: String = clientId, val client_secret: String = clientSecret, val redirect_uri: String = "://simkl", val grant_type: String = "authorization_code")
Link copied to clipboard
data class TokenResponse(val access_token: String, val token_type: 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

The ID string is a way to keep a collection of services in one single ID using a map This adds a database service (like imdb) to the string and returns the new string.

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?
Link copied to clipboard

Read the id string to get all other ids