themoviedb-1.1.4.0: Haskell API bindings for http://themoviedb.org

Safe HaskellNone
LanguageHaskell2010

Network.API.TheMovieDB.Internal.Configuration

Description

Internal configuration information for TheMovieDB API.

Synopsis

Documentation

data Configuration Source #

TheMovieDB API tries to preserve bandwidth by omitting information (such as full URLs for poster images) from most of the API calls. Therefore in order to construct a complete URL for a movie poster you'll need to use the config function to retrieve API configuration information.

A helper function is provided (moviePosterURLs) that constructs a list of all poster URLs given a Movie and Configuration.

According to the API documentation for TheMovieDB, you should cache the Configuration value and only request it every few days. Therefore, it is an instance of the Binary class so it can be serialized to and from a cache file on disk.

Alternatively, the FromJSON and ToJSON instances can be used to cache the Configuration value.

Constructors

Configuration 

Fields

posterURLs :: Configuration -> Text -> [Text] Source #

Return a list of URLs for all possible posters posters.