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

Safe HaskellNone
LanguageHaskell2010

Network.API.TheMovieDB.Internal.TheMovieDB

Synopsis

Documentation

data TheMovieDB a Source #

Result type for operations involving TheMovieDB API.

Instances
Monad TheMovieDB Source # 
Instance details

Defined in Network.API.TheMovieDB.Internal.TheMovieDB

Methods

(>>=) :: TheMovieDB a -> (a -> TheMovieDB b) -> TheMovieDB b #

(>>) :: TheMovieDB a -> TheMovieDB b -> TheMovieDB b #

return :: a -> TheMovieDB a #

fail :: String -> TheMovieDB a #

Functor TheMovieDB Source # 
Instance details

Defined in Network.API.TheMovieDB.Internal.TheMovieDB

Methods

fmap :: (a -> b) -> TheMovieDB a -> TheMovieDB b #

(<$) :: a -> TheMovieDB b -> TheMovieDB a #

Applicative TheMovieDB Source # 
Instance details

Defined in Network.API.TheMovieDB.Internal.TheMovieDB

Methods

pure :: a -> TheMovieDB a #

(<*>) :: TheMovieDB (a -> b) -> TheMovieDB a -> TheMovieDB b #

liftA2 :: (a -> b -> c) -> TheMovieDB a -> TheMovieDB b -> TheMovieDB c #

(*>) :: TheMovieDB a -> TheMovieDB b -> TheMovieDB b #

(<*) :: TheMovieDB a -> TheMovieDB b -> TheMovieDB a #

MonadIO TheMovieDB Source # 
Instance details

Defined in Network.API.TheMovieDB.Internal.TheMovieDB

Methods

liftIO :: IO a -> TheMovieDB a #

type RequestFunction = Path -> QueryText -> IO (Either Error Body) Source #

The type for functions that make requests to the API (or pretend to make a request for testing purposes).

getAndParse :: FromJSON a => Path -> QueryText -> TheMovieDB a Source #

Helper function to preform an HTTP GET and decode the JSON result.

tmdbError :: Error -> TheMovieDB a Source #

Create a TheMovieDB value representing an error.

runTheMovieDB Source #

Arguments

:: Key

The API key to include in all requests.

-> TheMovieDB a

The API calls to make.

-> IO (Either Error a)

Response or error.

Execute requests for TheMovieDB with the given API key and produce either an error or a result.

This version creates a temporary Manager using tlsManagerSettings. If you want to use an existing Manager you should use runTheMovieDBWithManager instead.

runTheMovieDBWithManager Source #

Arguments

:: Manager

The Manager to use.

-> Key

The API key to include in all requests.

-> TheMovieDB a

The API calls to make.

-> IO (Either Error a)

Response or error.

Execute requests for TheMovieDB with the given API key and produce either an error or a result.

This version allows you to provide a Manager value which should have been created to allow TLS requests (e.g., with tlsManagerSettings).

runTheMovieDBWithRequestFunction Source #

Arguments

:: RequestFunction

The request function to use.

-> TheMovieDB a

The API calls to make.

-> IO (Either Error a)

Response.

Low-level interface for executing a TheMovieDB using the given request function.