-
Notifications
You must be signed in to change notification settings - Fork 4
/
TheMovieDB.hs
85 lines (81 loc) · 2.14 KB
/
TheMovieDB.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
-- |
--
-- Copyright:
-- This 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.
--
-- License: MIT
--
-- This library provides some data types and functions for fetching movie
-- metadata from <http://TheMovieDB.org>. To use this library start by
-- requesting an API key from <http://docs.themoviedb.apiary.io>.
--
-- Example:
--
-- @
-- import Network.API.TheMovieDB
--
-- main :: IO ()
-- main = do
-- -- The API key assigned to you (as a 'Text' value).
-- let key = "your API key"
--
-- -- The 'fetch' function will get a 'Movie' record based on its ID.
-- result <- runTheMovieDB (defaultSettings key) (fetchMovie 9340)
--
-- -- Do something with the result (or error).
-- putStrLn (show result)
-- @
--
-- This library also includes an example executable in the @example@
-- directory.
module Network.API.TheMovieDB
( -- * Types
Movie (..),
TV (..),
Season (..),
Episode (..),
Genre (..),
Error (..),
ItemID,
-- * Library Settings
Settings (..),
defaultSettings,
Key,
LanguageCode,
-- * API Functions
TheMovieDB,
runTheMovieDB,
runTheMovieDBWithManager,
searchMovies,
fetchMovie,
searchTV,
fetchTV,
fetchTVSeason,
fetchFullTVSeries,
-- * Utility Types and Functions
Configuration,
config,
moviePosterURLs,
tvPosterURLs,
seasonPosterURLs,
episodeStillURLs,
)
where
import Network.API.TheMovieDB.Actions
import Network.API.TheMovieDB.Internal.Configuration
import Network.API.TheMovieDB.Internal.Settings
import Network.API.TheMovieDB.Internal.TheMovieDB
import Network.API.TheMovieDB.Internal.Types
import Network.API.TheMovieDB.Types.Episode
import Network.API.TheMovieDB.Types.Genre
import Network.API.TheMovieDB.Types.Movie
import Network.API.TheMovieDB.Types.Season
import Network.API.TheMovieDB.Types.TV