TmdbImageUrlBuilder

Functions

Link copied to clipboard
fun build(image: TmdbImage, sizeKey: String): String
fun build(image: TmdbImage, width: Int, height: Int): String
fun build(imagePath: String, type: TmdbImageType, width: Int, height: Int): String

fun build(imagePath: String, sizeKey: String): String

Building the URL has three parts: The base URL will look like: http://image.tmdb.org/t/p/. Then you will need a ‘size’, which will be one of the following: "w92", "w154", "w185", "w342", "w500", "w780", or "original". For most phones we recommend using “w185”. And finally the poster path returned by the query, in this case “/nBNZadXqJSdt05SHLqgT0HuC5Gm.jpg”

Link copied to clipboard

Builds fallback URLs with the largest sizes, which should everytime available on TMDB.

Link copied to clipboard
Link copied to clipboard
fun buildPoster(image: TmdbPosterMedia, width: Int): String?
Link copied to clipboard
fun buildYoutube(video: TmdbVideo, width: Int): String?
fun buildYoutube(youtubeKey: String, width: Int): String

fun buildYoutube(youtubeKey: String, imageFileSize: String): String

default 120x90 mqdefault 320x180 hqdefault 480x360 Example http://img.youtube.com/vi//default.jpg

Link copied to clipboard