themoviedb- Haskell API bindings for

Safe HaskellNone



Internal configuration information for TheMovieDB API.



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.




cfgImageBaseURL :: Text

The base URL for images.

cfgImageSecBaseURL :: Text

Base URL for secure images.

cfgPosterSizes :: [Text]

List of possible image sizes.

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

Return a list of URLs for all possible posters posters.