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

CopyrightThis file is part of the package themoviedb. It is subject to
the license terms in the LICENSE file found in the top-level
directory of this distribution and at:

https://github.com/pjones/themoviedb

No part of this package including this file may be copied
modified propagated or distributed except according to the terms
contained in the LICENSE file.
LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Network.API.TheMovieDB.Internal.TheMovieDB

Description

 
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

:: Settings

Library settings.

-> 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.

-> Settings

Library settings.

-> 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.