-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Reddit API bindings -- -- See the README at https://gitlab.com/ngua/heddit @package heddit @version 0.0.2 module Network.Reddit.Types.Internal -- | "Thing"s are the base class of Reddit's OOP model. Each thing has -- several properties, but here we are only interested in one, the -- "fullname". This is a combination of a thing's type (here represented -- as a RedditKind), and its unique ID class Thing a -- | A fullname is an identifier with a "type prefix" attached. -- See RedditKind for possible prefixes. This prefixed form is -- required in various places by the Reddit API fullname :: Thing a => a -> Text -- | A RedditKind represents a textual prefix that Reddit uses to -- denote types in its API data RedditKind CommentKind :: RedditKind AccountKind :: RedditKind SubmissionKind :: RedditKind MessageKind :: RedditKind SubredditKind :: RedditKind AwardKind :: RedditKind ListingKind :: RedditKind UserListKind :: RedditKind KarmaListKind :: RedditKind TrophyListKind :: RedditKind MoreKind :: RedditKind RelKind :: RedditKind SubredditSettingsKind :: RedditKind StylesheetKind :: RedditKind WikiPageKind :: RedditKind WikiPageListingKind :: RedditKind WikiPageSettingsKind :: RedditKind LabeledMultiKind :: RedditKind ModActionKind :: RedditKind LiveThreadKind :: RedditKind LiveUpdateKind :: RedditKind -- | Represents requests that can take additional options in a -- Paginator. This can be used to filter/sort Listing -- endpoints class Paginable a where { type family PaginateOptions (a :: Type); type family PaginateThing (a :: Type); } -- | Default PaginateOptions for this type defaultOpts :: Paginable a => PaginateOptions a -- | Get the fullname of the Thing type associated with this type, -- if any getFullname :: Paginable a => a -> PaginateThing a -- | Get the fullname of the Thing type associated with this type, -- if any getFullname :: (Paginable a, PaginateThing a ~ Text) => a -> PaginateThing a -- | Convert the PaginateOptions options to a Form optsToForm :: Paginable a => PaginateOptions a -> Form -- | Convert the PaginateOptions options to a Form optsToForm :: (Paginable a, ToForm (PaginateOptions a)) => PaginateOptions a -> Form -- | This represents the protocol that Reddit uses to control paginating -- and filtering entries. These can be applied to Listing -- endpoints. The first four fields below are common parameters that are -- applied to each Listing. The opts field takes extended -- PaginateOptions based on the second type parameter data Paginator t a Paginator :: Maybe t -> Maybe t -> Word -> Bool -> Bool -> PaginateOptions a -> Paginator t a -- | The pagination controls. These should be Thing instances, in -- order to provide the fullname params that Reddit requires [$sel:before:Paginator] :: Paginator t a -> Maybe t [$sel:after:Paginator] :: Paginator t a -> Maybe t -- | The maximum number of items to return in an individual slice. Defaults -- to 25, with a maximum of 100 [$sel:limit:Paginator] :: Paginator t a -> Word -- | A control to disable filtering, e.g. hiding links that one has voted -- on. At the moment, turning this option on is a no-op [$sel:showAll:Paginator] :: Paginator t a -> Bool -- | Whether or not to expand subreddits [$sel:srDetail:Paginator] :: Paginator t a -> Bool -- | Additional options, depending on the type parameter a [$sel:opts:Paginator] :: Paginator t a -> PaginateOptions a -- | Certain API endpoints are listings, which can be paginated -- and filtered using a Paginator data Listing t a Listing :: Maybe t -> Maybe t -> Seq a -> Listing t a -- | Anchor of previous slice [$sel:before:Listing] :: Listing t a -> Maybe t -- | Anchor of next slice [$sel:after:Listing] :: Listing t a -> Maybe t -- | The actual items returned in the response [$sel:children:Listing] :: Listing t a -> Seq a -- | This exists to derive case-insensitive Eq instances for types -- that are isomorphic to Text newtype CIText a CIText :: a -> CIText a type family HKD f a -- | Options that can be applied to comments or submissions, as represented -- by the phantom type parameter data ItemOpts a ItemOpts :: Maybe ItemSort -> Maybe ItemType -> Maybe Time -> Maybe Word -> ItemOpts a [$sel:itemSort:ItemOpts] :: ItemOpts a -> Maybe ItemSort [$sel:itemType:ItemOpts] :: ItemOpts a -> Maybe ItemType [$sel:itemTime:ItemOpts] :: ItemOpts a -> Maybe Time [$sel:context:ItemOpts] :: ItemOpts a -> Maybe Word -- | Defaults for fetching items, like comments or submissions defaultItemOpts :: ItemOpts a -- | How to sort items in certain Listings. Not every option is -- guaranteed to be accepted by a given endpoint data ItemSort Hot :: ItemSort New :: ItemSort Top :: ItemSort Controversial :: ItemSort Old :: ItemSort Random :: ItemSort QA :: ItemSort Live :: ItemSort Confidence :: ItemSort -- | A user- or moderator-generated report on a submission data ItemReport ItemReport :: Text -> Word -> ItemReport -- | The textual report reason/description [$sel:reason:ItemReport] :: ItemReport -> Text [$sel:count:ItemReport] :: ItemReport -> Word -- | Sigils that a moderator can add to distinguish comments or -- submissions. Note that the Admin and Special -- distinctions require special privileges to use data Distinction -- | Adds "[M]" Moderator :: Distinction -- | Removes an existing distinction when sent Undistinguished :: Distinction -- | Adds "[A]" Admin :: Distinction -- | User-specific distinction Special :: Distinction -- | Time range when fetching comments or submissions data Time Hour :: Time Day :: Time Week :: Time Month :: Time Year :: Time AllTime :: Time -- | Type of comments, for filtering in Listings data ItemType Comments :: ItemType Submissions :: ItemType -- | A URL pointing to a resource hosted by Reddit. These should only be -- obtained by parsing the JSON of existing resources or through -- particular actions that perform the upload transaction and return the -- URL, e.g. uploadWidgetImage data UploadURL -- | Type synonym for bodies of submissions, comments, messages, etc... type Body = Text -- | Type synonym for titles of submissions, etc... type Title = Text -- | Type synonym for URLs type URL = Text -- | Type synonym for subjects of messages, etc... type Subject = Text -- | Type synonym RGB color strings type RGBText = Text -- | Type synonym for names of items type Name = Text -- | Type synonym for domains type Domain = Text -- | Type synonym for fieldLabelModifiers in FromJSON -- instances type Modifier = [Char] -> [Char] -- | Type synonym the raw body of an HTTP response type RawBody m = ConduitM () ByteString m () -- | Base exception type for Reddit API client data RedditException -- | Exceptions generated within the Reddit API client data ClientException InvalidRequest :: Text -> ClientException InvalidResponse :: Text -> ClientException MalformedCredentials :: Text -> ClientException OtherError :: Text -> ClientException ConfigurationError :: Text -> ClientException -- | Exceptions returned from API endpoints data APIException ErrorWithStatus :: StatusMessage -> APIException ErrorWithMessage :: ErrorMessage -> APIException InvalidCredentials :: OAauthError -> APIException -- | Sent if errors occur when posting JSON InvalidJSON :: JSONError -> APIException -- | With the response body, for further debugging JSONParseError :: Text -> ByteString -> APIException -- | If the API action should not allow automatic redirects, this error -- returns the possible redirected request Redirected :: Maybe Request -> APIException -- | Thrown when exceptions occur during websocket handling WebsocketError :: Text -> SomeException -> APIException -- | When an error occurs uploading media to Reddit's servers UploadFailed :: APIException -- | An error which occurs when attempting to authenticate via OAuth data OAauthError OAauthError :: Text -> Maybe Text -> OAauthError -- | The type of the error, e.g. "invalid_grant" [$sel:errorType:OAauthError] :: OAauthError -> Text -- | This field may be absent. If it exists, it describes the error [$sel:description:OAauthError] :: OAauthError -> Maybe Text -- | A specific error message data ErrorMessage EmptyError :: ErrorMessage OtherErrorMessage :: [Value] -> ErrorMessage Ratelimited :: Integer -> Text -> ErrorMessage CommentDeleted :: ErrorMessage BadSRName :: ErrorMessage SubredditNotExists :: ErrorMessage SubredditRequired :: ErrorMessage AlreadySubmitted :: ErrorMessage NoURL :: ErrorMessage NoName :: ErrorMessage NoText :: ErrorMessage TooShort :: ErrorMessage BadCaptcha :: ErrorMessage UserRequired :: ErrorMessage -- | Type synonym for status codes in responses type StatusCode = Int -- | Details about a non-200 HTTP response data StatusMessage StatusMessage :: StatusCode -> Text -> StatusMessage [$sel:statusCode:StatusMessage] :: StatusMessage -> StatusCode [$sel:message:StatusMessage] :: StatusMessage -> Text -- | Details about a non-200 response when posting JSON data JSONError JSONError :: [Text] -> Text -> Text -> Text -> JSONError -- | The fields of the object containing errors [$sel:fields:JSONError] :: JSONError -> [Text] [$sel:explanation:JSONError] :: JSONError -> Text [$sel:message:JSONError] :: JSONError -> Text [$sel:reason:JSONError] :: JSONError -> Text -- | Drop the leading textual representation of a RedditKind from a -- Reddit identifier, or return the entire identifier if there is no -- prefix dropTypePrefix :: RedditKind -> Text -> Parser Text -- | Convert an Integer to UTCTime integerToUTC :: Integer -> UTCTime -- | Ensures that the kind field of a JSON object corresponds to -- the expected RedditKind of the response and runs a parsing -- function on its data field withKind :: FromJSON b => RedditKind -> [Char] -> (b -> Parser a) -> Value -> Parser a -- | Convert a RedditKind to its textual representation textKind :: RedditKind -> Text -- | Opposite of dropTypePrefix: joins the textual representation of -- a RedditKind to an identifier with an underscore prependType :: RedditKind -> Text -> Text -- | Show a ByteString bshow :: Show a => a -> ByteString -- | Show some Text tshow :: Show a => a -> Text -- | Parse the edited field in comments or submissions, which can -- either be false or a Unix timestamp editedP :: Value -> Parser (Maybe UTCTime) -- | Verify that some name corresponds to specifiable Reddit naming rules validateName :: (MonadThrow m, Coercible a Text) => Maybe [Char] -> Maybe (Int, Int) -> Text -> Text -> m a -- | Make a comma-separated sequence of query params joinParams :: (Foldable t, ToHttpApiData a) => t a -> Text -- | Return Nothing if a text field is empty nothingTxtNull :: FromJSON a => Text -> Parser (Maybe a) -- | Encode a list of Pairs to strict Text textObject :: [Pair] -> Text -- | Encode a ToJSON instance to strict Text textEncode :: ToJSON a => a -> Text -- | Like withKind, but can be used in the exceptional circumstances -- that a container of values have heterogeneous kinds withKinds :: FromJSON b => [RedditKind] -> [Char] -> (b -> Parser a) -> Value -> Parser a -- | Split a JSON identifier on "_"; if it matches the given type prefix, -- returning the remaining text. Otherwise, return the identifier whole -- if there is no remaining text breakOnType :: Coercible a Text => Text -> Text -> Parser a -- | Get all of the values from a HashMap and place them in a -- Seq, discarding the keys getVals :: FromJSON b => HashMap Text Value -> Parser (Seq b) -- | Make a form from [(Text, Text)] pairs mkTextForm :: [(Text, Text)] -> Form instance GHC.Classes.Eq Network.Reddit.Types.Internal.RedditKind instance GHC.Generics.Generic (Network.Reddit.Types.Internal.Listing t a) instance (GHC.Classes.Eq t, GHC.Classes.Eq a) => GHC.Classes.Eq (Network.Reddit.Types.Internal.Listing t a) instance (GHC.Show.Show t, GHC.Show.Show a) => GHC.Show.Show (Network.Reddit.Types.Internal.Listing t a) instance GHC.Generics.Generic (Network.Reddit.Types.Internal.Paginator t a) instance GHC.Generics.Generic Network.Reddit.Types.Internal.ItemSort instance GHC.Classes.Eq Network.Reddit.Types.Internal.ItemSort instance GHC.Show.Show Network.Reddit.Types.Internal.ItemSort instance GHC.Generics.Generic Network.Reddit.Types.Internal.ItemType instance GHC.Classes.Eq Network.Reddit.Types.Internal.ItemType instance GHC.Show.Show Network.Reddit.Types.Internal.ItemType instance GHC.Generics.Generic Network.Reddit.Types.Internal.ItemReport instance GHC.Classes.Eq Network.Reddit.Types.Internal.ItemReport instance GHC.Show.Show Network.Reddit.Types.Internal.ItemReport instance GHC.Generics.Generic Network.Reddit.Types.Internal.Distinction instance GHC.Classes.Eq Network.Reddit.Types.Internal.Distinction instance GHC.Show.Show Network.Reddit.Types.Internal.Distinction instance GHC.Generics.Generic Network.Reddit.Types.Internal.Time instance GHC.Classes.Eq Network.Reddit.Types.Internal.Time instance GHC.Show.Show Network.Reddit.Types.Internal.Time instance GHC.Generics.Generic (Network.Reddit.Types.Internal.ItemOpts a) instance GHC.Classes.Eq (Network.Reddit.Types.Internal.ItemOpts a) instance GHC.Show.Show (Network.Reddit.Types.Internal.ItemOpts a) instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Internal.UploadURL instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Internal.UploadURL instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Internal.UploadURL instance GHC.Classes.Eq Network.Reddit.Types.Internal.UploadURL instance GHC.Generics.Generic Network.Reddit.Types.Internal.UploadURL instance GHC.Show.Show Network.Reddit.Types.Internal.UploadURL instance GHC.Generics.Generic Network.Reddit.Types.Internal.ClientException instance GHC.Show.Show Network.Reddit.Types.Internal.ClientException instance GHC.Classes.Eq Network.Reddit.Types.Internal.ClientException instance GHC.Generics.Generic Network.Reddit.Types.Internal.OAauthError instance GHC.Classes.Eq Network.Reddit.Types.Internal.OAauthError instance GHC.Show.Show Network.Reddit.Types.Internal.OAauthError instance GHC.Generics.Generic Network.Reddit.Types.Internal.ErrorMessage instance GHC.Classes.Eq Network.Reddit.Types.Internal.ErrorMessage instance GHC.Show.Show Network.Reddit.Types.Internal.ErrorMessage instance GHC.Generics.Generic Network.Reddit.Types.Internal.StatusMessage instance GHC.Show.Show Network.Reddit.Types.Internal.StatusMessage instance GHC.Classes.Eq Network.Reddit.Types.Internal.StatusMessage instance GHC.Generics.Generic Network.Reddit.Types.Internal.JSONError instance GHC.Classes.Eq Network.Reddit.Types.Internal.JSONError instance GHC.Show.Show Network.Reddit.Types.Internal.JSONError instance GHC.Generics.Generic Network.Reddit.Types.Internal.APIException instance GHC.Show.Show Network.Reddit.Types.Internal.APIException instance (GHC.Show.Show t, GHC.Show.Show (Network.Reddit.Types.Internal.PaginateOptions a)) => GHC.Show.Show (Network.Reddit.Types.Internal.Paginator t a) instance (GHC.Classes.Eq t, GHC.Classes.Eq (Network.Reddit.Types.Internal.PaginateOptions a)) => GHC.Classes.Eq (Network.Reddit.Types.Internal.Paginator t a) instance GHC.Exception.Type.Exception Network.Reddit.Types.Internal.APIException instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Internal.APIException instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Internal.JSONError instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Internal.StatusMessage instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Internal.ErrorMessage instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Internal.OAauthError instance GHC.Exception.Type.Exception Network.Reddit.Types.Internal.ClientException instance GHC.Show.Show Network.Reddit.Types.Internal.RedditException instance GHC.Exception.Type.Exception Network.Reddit.Types.Internal.RedditException instance Web.Internal.FormUrlEncoded.ToForm (Network.Reddit.Types.Internal.ItemOpts a) instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Internal.Time instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Internal.Distinction instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Internal.Distinction instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Internal.ItemReport instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Internal.ItemType instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Internal.ItemSort instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Internal.ItemSort instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Internal.ItemSort instance GHC.Types.Coercible a Data.Text.Internal.Text => GHC.Classes.Eq (Network.Reddit.Types.Internal.CIText a) instance (Network.Reddit.Types.Internal.Thing t, Network.Reddit.Types.Internal.Paginable a) => Web.Internal.FormUrlEncoded.ToForm (Network.Reddit.Types.Internal.Paginator t a) instance (Data.Generics.Product.Fields.HasField' name (Network.Reddit.Types.Internal.Paginator t a) s, a GHC.Types.~ b, s GHC.Types.~ u) => Data.Generics.Product.Fields.HasField name (Network.Reddit.Types.Internal.Paginator t a) (Network.Reddit.Types.Internal.Paginator t b) s u instance GHC.Classes.Ord t => GHC.Base.Semigroup (Network.Reddit.Types.Internal.Listing t a) instance GHC.Classes.Ord t => GHC.Base.Monoid (Network.Reddit.Types.Internal.Listing t a) instance (Data.Aeson.Types.FromJSON.FromJSON a, Data.Aeson.Types.FromJSON.FromJSON t) => Data.Aeson.Types.FromJSON.FromJSON (Network.Reddit.Types.Internal.Listing t a) instance (Data.Foldable.Foldable t, Network.Reddit.Types.Internal.Thing a) => Network.Reddit.Types.Internal.Thing (t a) instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Internal.RedditKind module Network.Reddit.Types -- | The monad tranformer in which Reddit API transactions can be executed data RedditT m a -- | Run a RedditT action runRedditT :: Client -> RedditT m a -> m a -- | Synonym for constraints that RedditT actions must satisfy type MonadReddit m = (MonadUnliftIO m, MonadThrow m, MonadCatch m, MonadReader Client m) -- | A unique user agent to identify your application; Reddit applies -- rate-limiting to common agents, and actively bans misleading ones data UserAgent UserAgent :: Text -> Text -> Text -> Text -> UserAgent -- | The target platform [$sel:platform:UserAgent] :: UserAgent -> Text -- | A unique application ID [$sel:appID:UserAgent] :: UserAgent -> Text [$sel:version:UserAgent] :: UserAgent -> Text -- | Your username as contact information [$sel:author:UserAgent] :: UserAgent -> Text -- | A client site corresponds to a field in your auth configuration ini -- file. For instance, the ClientSite "mybot" should map to -- section such as: -- --
-- [MYBOT] -- id = <clientID> -- ... ---- -- in your auth.ini file. -- -- Note: The ClientSite and the corresponding ini section -- are case insensitive! type ClientSite = Text -- | A client facilitating access to Reddit's API data Client Client :: AuthConfig -> Manager -> IORef ClientState -> Maybe TokenManager -> Client [$sel:authConfig:Client] :: Client -> AuthConfig [$sel:manager:Client] :: Client -> Manager [$sel:clientState:Client] :: Client -> IORef ClientState [$sel:tokenManager:Client] :: Client -> Maybe TokenManager -- | Stateful data that may be updated over the course of a Client -- lifetime data ClientState ClientState :: AccessToken -> POSIXTime -> Maybe RateLimits -> ClientState [$sel:accessToken:ClientState] :: ClientState -> AccessToken -- | The approximate time at which the token was obtained. This is useful -- to compare against the expiresIn field of the -- AccessToken [$sel:tokenObtained:ClientState] :: ClientState -> POSIXTime [$sel:limits:ClientState] :: ClientState -> Maybe RateLimits -- | For conveniently reading some field from the IORef -- ClientState inside a Client readClientState :: MonadReddit m => Lens' ClientState a -> m a -- | Data, either as JSON or URL-encoded form, to be attached to requests data WithData WithJSON :: Value -> WithData WithForm :: Form -> WithData WithMultipart :: [Part] -> WithData NoData :: WithData -- | Rate limit info data RateLimits RateLimits :: Integer -> Integer -> POSIXTime -> POSIXTime -> RateLimits -- | The number of requests remaining in the current rate-limiting window [$sel:remaining:RateLimits] :: RateLimits -> Integer [$sel:used:RateLimits] :: RateLimits -> Integer -- | Timestamp of the upper bound on rate-limiting counter reset [$sel:reset:RateLimits] :: RateLimits -> POSIXTime -- | Epoch time at which the next request should be made in order to stay -- within the current rate limit bounds [$sel:nextRequest:RateLimits] :: RateLimits -> POSIXTime -- | Extract rate limit info from response headers. This should only be -- called after making a request readRateLimits :: POSIXTime -> ResponseHeaders -> Maybe RateLimits -- | The three forms of application that may use the Reddit API, each -- having different API access patterns data AppType -- | The simplest type of application. May only be used by the developer -- who owns the account. This requires supplying the usernme and password -- associated with the account ScriptApp :: ClientSecret -> PasswordFlow -> AppType -- | For applications running on a server backend WebApp :: ClientSecret -> CodeFlow -> AppType -- | For applications installed on devices that the developer does not own -- (e.g., a mobile application) InstalledApp :: CodeFlow -> AppType ApplicationOnly :: ClientSecret -> AppType -- | A configuration data AuthConfig AuthConfig :: ClientID -> AppType -> UserAgent -> AuthConfig -- | Your application's client ID [$sel:clientID:AuthConfig] :: AuthConfig -> ClientID -- | The type of your application. This will determine how OAuth -- credentials are obtained [$sel:appType:AuthConfig] :: AuthConfig -> AppType -- | Your unique user agent; will be used in the client that is obtained -- after authenticating [$sel:userAgent:AuthConfig] :: AuthConfig -> UserAgent -- | Token received after authentication data AccessToken AccessToken :: Token -> NominalDiffTime -> [Scope] -> Maybe Token -> AccessToken [$sel:token:AccessToken] :: AccessToken -> Token [$sel:expiresIn:AccessToken] :: AccessToken -> NominalDiffTime [$sel:scope:AccessToken] :: AccessToken -> [Scope] [$sel:refreshToken:AccessToken] :: AccessToken -> Maybe Token -- | Type synonym for the text of a token type Token = Text -- | Type synonym for the text of codes returned from auth URLs, for -- WebApps and InstalledApps type Code = Text -- | Represents a specific Reddit functionality that must be explicitly -- requested data Scope -- | Corresponds to "account" in text form Accounts :: Scope Creddits :: Scope Edit :: Scope Flair :: Scope History :: Scope Identity :: Scope LiveManage :: Scope ModConfig :: Scope ModContributors :: Scope ModFlair :: Scope ModLog :: Scope ModMail :: Scope ModOthers :: Scope ModPosts :: Scope ModSelf :: Scope ModTraffic :: Scope ModWiki :: Scope MySubreddits :: Scope PrivateMessages :: Scope Read :: Scope Report :: Scope Save :: Scope StructuredStyles :: Scope Submit :: Scope Subscribe :: Scope Vote :: Scope WikiEdit :: Scope WikiRead :: Scope -- | For all scopes, corresponds to "*" Unlimited :: Scope -- | Simple user credentials for authenticating via ScriptApps -- -- Note: These credentials will be kept in memory! data PasswordFlow PasswordFlow :: Text -> Text -> PasswordFlow -- | The name of the user you are authenticating as [$sel:username:PasswordFlow] :: PasswordFlow -> Text -- | The password of the user you are authenticating as [$sel:password:PasswordFlow] :: PasswordFlow -> Text -- | Details for OAuth "code flow", for WebApps and -- InstalledApps data CodeFlow CodeFlow :: URL -> Code -> CodeFlow -- | This must exactly match the redirect URL you entered when making your -- application on Reddit [$sel:redirectURI:CodeFlow] :: CodeFlow -> URL -- | This is the code that is obtained after a user grants permissions by -- visiting the URL generated by getAuthURL. If you are using a -- TokenManager with newClientWithManager, you can leave -- this field as empty text, since it won't be used to get the initial -- refresh token [$sel:code:CodeFlow] :: CodeFlow -> Code -- | Type synonym for client IDs type ClientID = Text -- | Type synonym for client secrets type ClientSecret = Text -- | The duration of the access token for WebApps and -- InstalledApps data TokenDuration -- | Generates one-hour access tokens without a refresh token Temporary :: TokenDuration -- | Generates a one-hour access tokens with a refresh token that can be -- used to indefinitely obtain new access tokens Permanent :: TokenDuration -- | Monadic actions to load and save Tokens, specifically refresh -- tokens, when creating new Clients for WebApps and -- InstalledApps data TokenManager TokenManager :: (forall m. (MonadIO m, MonadThrow m) => m Token) -> (forall m. (MonadIO m, MonadThrow m) => Maybe Token -> m ()) -> TokenManager -- | Load an existing refresh token, for instance from a file or database [$sel:loadToken:TokenManager] :: TokenManager -> forall m. (MonadIO m, MonadThrow m) => m Token -- | Store the new refresh token that is received when exchanging the -- existing one for a new AccessToken. -- -- This action must take a Maybe Token as its argument, as it is -- possible (albeit perhaps unlikely) that Reddit does not return a new -- token when exchanging the existing refresh token for a new access -- token [$sel:putToken:TokenManager] :: TokenManager -> forall m. (MonadIO m, MonadThrow m) => Maybe Token -> m () -- | An API request parameterized by the type it evaluates to when executed data APIAction a APIAction :: Method -> [PathSegment] -> WithData -> Bool -> Bool -> Bool -> (Request -> Response BodyReader -> IO ()) -> APIAction a [$sel:method:APIAction] :: APIAction a -> Method [$sel:pathSegments:APIAction] :: APIAction a -> [PathSegment] [$sel:requestData:APIAction] :: APIAction a -> WithData [$sel:needsAuth:APIAction] :: APIAction a -> Bool [$sel:followRedirects:APIAction] :: APIAction a -> Bool [$sel:rawJSON:APIAction] :: APIAction a -> Bool [$sel:checkResponse:APIAction] :: APIAction a -> Request -> Response BodyReader -> IO () -- | HTTP method, excluding those not used in the Reddit API data Method GET :: Method POST :: Method DELETE :: Method PUT :: Method PATCH :: Method -- | Type synonym for a segment of a URL path type PathSegment = Text instance GHC.Generics.Generic Network.Reddit.Types.UserAgent instance GHC.Classes.Eq Network.Reddit.Types.UserAgent instance GHC.Show.Show Network.Reddit.Types.UserAgent instance GHC.Generics.Generic Network.Reddit.Types.RateLimits instance GHC.Classes.Eq Network.Reddit.Types.RateLimits instance GHC.Show.Show Network.Reddit.Types.RateLimits instance GHC.Generics.Generic Network.Reddit.Types.PasswordFlow instance GHC.Classes.Eq Network.Reddit.Types.PasswordFlow instance GHC.Show.Show Network.Reddit.Types.PasswordFlow instance GHC.Generics.Generic Network.Reddit.Types.CodeFlow instance GHC.Classes.Eq Network.Reddit.Types.CodeFlow instance GHC.Show.Show Network.Reddit.Types.CodeFlow instance GHC.Generics.Generic Network.Reddit.Types.AppType instance GHC.Classes.Eq Network.Reddit.Types.AppType instance GHC.Show.Show Network.Reddit.Types.AppType instance GHC.Generics.Generic Network.Reddit.Types.AuthConfig instance GHC.Classes.Eq Network.Reddit.Types.AuthConfig instance GHC.Show.Show Network.Reddit.Types.AuthConfig instance GHC.Generics.Generic Network.Reddit.Types.TokenDuration instance GHC.Classes.Eq Network.Reddit.Types.TokenDuration instance GHC.Show.Show Network.Reddit.Types.TokenDuration instance GHC.Enum.Enum Network.Reddit.Types.Scope instance GHC.Classes.Ord Network.Reddit.Types.Scope instance GHC.Show.Show Network.Reddit.Types.Scope instance GHC.Classes.Eq Network.Reddit.Types.Scope instance GHC.Generics.Generic Network.Reddit.Types.Scope instance GHC.Generics.Generic Network.Reddit.Types.AccessToken instance GHC.Classes.Eq Network.Reddit.Types.AccessToken instance GHC.Show.Show Network.Reddit.Types.AccessToken instance GHC.Generics.Generic Network.Reddit.Types.ClientState instance GHC.Classes.Eq Network.Reddit.Types.ClientState instance GHC.Show.Show Network.Reddit.Types.ClientState instance GHC.Generics.Generic Network.Reddit.Types.Client instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (Network.Reddit.Types.RedditT m) instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (Network.Reddit.Types.RedditT m) instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader Network.Reddit.Types.Client (Network.Reddit.Types.RedditT m) instance Control.Monad.IO.Unlift.MonadUnliftIO m => Control.Monad.IO.Unlift.MonadUnliftIO (Network.Reddit.Types.RedditT m) instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Network.Reddit.Types.RedditT m) instance GHC.Base.Monad m => GHC.Base.Monad (Network.Reddit.Types.RedditT m) instance GHC.Base.Applicative m => GHC.Base.Applicative (Network.Reddit.Types.RedditT m) instance GHC.Base.Functor m => GHC.Base.Functor (Network.Reddit.Types.RedditT m) instance GHC.Generics.Generic Network.Reddit.Types.Method instance GHC.Classes.Eq Network.Reddit.Types.Method instance GHC.Show.Show Network.Reddit.Types.Method instance GHC.Generics.Generic Network.Reddit.Types.WithData instance GHC.Show.Show Network.Reddit.Types.WithData instance GHC.Generics.Generic (Network.Reddit.Types.APIAction a) instance Network.HTTP.Client.Types.HasHttpManager Network.Reddit.Types.Client instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.AccessToken instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Scope instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Scope instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.TokenDuration instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.AppType instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.CodeFlow instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.PasswordFlow module Network.Reddit.Types.Subreddit -- | The name of a subreddit data SubredditName -- | Smart constructor for SubredditName, which must be between 3 -- and 20 chars, and may only include upper/lowercase alphanumeric chars, -- underscores, and hyphens mkSubredditName :: MonadThrow m => Text -> m SubredditName -- | Unique site-wide identifier for a subreddit newtype SubredditID SubredditID :: Text -> SubredditID -- | Information about a subreddit. Fields prefixed with userIs -- below apply to the currently authenticated user data Subreddit Subreddit :: SubredditID -> SubredditName -> Title -> UTCTime -> Body -> Maybe Body -> Body -> Integer -> Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Bool -> Subreddit [$sel:subredditID:Subreddit] :: Subreddit -> SubredditID [$sel:name:Subreddit] :: Subreddit -> SubredditName [$sel:title:Subreddit] :: Subreddit -> Title [$sel:created:Subreddit] :: Subreddit -> UTCTime -- | The description of the subreddit in markdown [$sel:description:Subreddit] :: Subreddit -> Body [$sel:descriptionHTML:Subreddit] :: Subreddit -> Maybe Body -- | Description as shown in searches [$sel:publicDescription:Subreddit] :: Subreddit -> Body [$sel:subscribers:Subreddit] :: Subreddit -> Integer [$sel:over18:Subreddit] :: Subreddit -> Bool [$sel:userIsBanned:Subreddit] :: Subreddit -> Maybe Bool [$sel:userIsModerator:Subreddit] :: Subreddit -> Maybe Bool [$sel:userIsSubscriber:Subreddit] :: Subreddit -> Maybe Bool -- | Whether users can assign their own link flair [$sel:canAssignLinkFlair:Subreddit] :: Subreddit -> Maybe Bool -- | Whether users can assign their own user flair [$sel:canAssignUserFlair:Subreddit] :: Subreddit -> Maybe Bool -- | Whether the subreddit is quarantined [$sel:quarantine:Subreddit] :: Subreddit -> Bool -- | Wrapper for parsing an array of recommended SubredditNames, -- which are given as single-field JSON objects data RecsList -- | Wrapper for parsing an object of SubredditName results when -- searching subreddits by name data NameSearchResults -- | A Subreddit rule. If you are a moderator, you can update the -- shortName, description, violationReason, -- and ruleType fields. See reorderSubredditRules. New -- rules may also be created with NewSubredditRules data SubredditRule SubredditRule :: Body -> Body -> Name -> UTCTime -> Word -> Maybe Text -> Maybe RuleType -> SubredditRule [$sel:description:SubredditRule] :: SubredditRule -> Body [$sel:descriptionHTML:SubredditRule] :: SubredditRule -> Body [$sel:shortName:SubredditRule] :: SubredditRule -> Name [$sel:created:SubredditRule] :: SubredditRule -> UTCTime [$sel:priority:SubredditRule] :: SubredditRule -> Word [$sel:violationReason:SubredditRule] :: SubredditRule -> Maybe Text [$sel:ruleType:SubredditRule] :: SubredditRule -> Maybe RuleType -- | Wrapper to parse JSON from endpoints that list SubredditRules data RuleList -- | Represents a new SubredditRule that can be created by -- moderators data NewSubredditRule NewSubredditRule :: Name -> RuleType -> Body -> Maybe Text -> NewSubredditRule [$sel:shortName:NewSubredditRule] :: NewSubredditRule -> Name [$sel:ruleType:NewSubredditRule] :: NewSubredditRule -> RuleType [$sel:description:NewSubredditRule] :: NewSubredditRule -> Body -- | If Nothing, will be set to the same text as the -- shortName provided [$sel:violationReason:NewSubredditRule] :: NewSubredditRule -> Maybe Text -- | Wrapper for parsing newly created SubredditRules, after POSTing -- a NewSubredditRule. Rather unbelievably, Reddit transmits these -- new rules as a JSON object ... in a single element array ... -- encoded as a string ... inside another object! data PostedSubredditRule -- | The type of item that a SubredditRule applies to data RuleType CommentRule :: RuleType LinkRule :: RuleType AllRule :: RuleType -- | Mod-created requirements for posting in a subreddit data PostRequirements PostRequirements :: [Text] -> BodyRestriction -> [Text] -> [Text] -> Bool -> [Text] -> [Text] -> Maybe Word -> Maybe Word -> PostRequirements [$sel:bodyBlacklistedStrings:PostRequirements] :: PostRequirements -> [Text] [$sel:bodyRestrictionPolicy:PostRequirements] :: PostRequirements -> BodyRestriction [$sel:domainBlacklist:PostRequirements] :: PostRequirements -> [Text] -- | If present, submissions must be from one of the listed domains [$sel:domainWhitelist:PostRequirements] :: PostRequirements -> [Text] [$sel:isFlairRequired:PostRequirements] :: PostRequirements -> Bool [$sel:titleBlacklistedStrings:PostRequirements] :: PostRequirements -> [Text] -- | If present, submission titles must contain one of the given strings [$sel:titleRequiredStrings:PostRequirements] :: PostRequirements -> [Text] [$sel:titleTextMaxLength:PostRequirements] :: PostRequirements -> Maybe Word [$sel:titleTextMinLength:PostRequirements] :: PostRequirements -> Maybe Word -- | Rules concerning the presence of self-text bodies in posts data BodyRestriction BodyRequired :: BodyRestriction BodyNotAllowed :: BodyRestriction NoRestriction :: BodyRestriction instance GHC.Classes.Eq Network.Reddit.Types.Subreddit.SubredditName instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Subreddit.SubredditName instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Subreddit.SubredditName instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.SubredditName instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.SubredditName instance GHC.Show.Show Network.Reddit.Types.Subreddit.SubredditName instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.SubredditID instance GHC.Classes.Eq Network.Reddit.Types.Subreddit.SubredditID instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.SubredditID instance GHC.Show.Show Network.Reddit.Types.Subreddit.SubredditID instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.Subreddit instance GHC.Classes.Eq Network.Reddit.Types.Subreddit.Subreddit instance GHC.Show.Show Network.Reddit.Types.Subreddit.Subreddit instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.RecsList instance GHC.Show.Show Network.Reddit.Types.Subreddit.RecsList instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.NameSearchResults instance GHC.Show.Show Network.Reddit.Types.Subreddit.NameSearchResults instance GHC.Classes.Ord Network.Reddit.Types.Subreddit.RuleType instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.RuleType instance GHC.Classes.Eq Network.Reddit.Types.Subreddit.RuleType instance GHC.Show.Show Network.Reddit.Types.Subreddit.RuleType instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.NewSubredditRule instance GHC.Classes.Eq Network.Reddit.Types.Subreddit.NewSubredditRule instance GHC.Show.Show Network.Reddit.Types.Subreddit.NewSubredditRule instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.SubredditRule instance GHC.Classes.Eq Network.Reddit.Types.Subreddit.SubredditRule instance GHC.Show.Show Network.Reddit.Types.Subreddit.SubredditRule instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.PostedSubredditRule instance GHC.Show.Show Network.Reddit.Types.Subreddit.PostedSubredditRule instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.RuleList instance GHC.Show.Show Network.Reddit.Types.Subreddit.RuleList instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.BodyRestriction instance GHC.Classes.Eq Network.Reddit.Types.Subreddit.BodyRestriction instance GHC.Show.Show Network.Reddit.Types.Subreddit.BodyRestriction instance GHC.Generics.Generic Network.Reddit.Types.Subreddit.PostRequirements instance GHC.Classes.Eq Network.Reddit.Types.Subreddit.PostRequirements instance GHC.Show.Show Network.Reddit.Types.Subreddit.PostRequirements instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.PostRequirements instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.BodyRestriction instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.RuleList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.PostedSubredditRule instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.SubredditRule instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Subreddit.SubredditRule instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Subreddit.NewSubredditRule instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.RuleType instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Subreddit.RuleType instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.NameSearchResults instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.RecsList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Subreddit.Subreddit instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Subreddit.Subreddit instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Subreddit.SubredditID module Network.Reddit.Types.Account -- | Reddit username data Username -- | Smart constructor for Username, which must be between 3 and 20 -- chars, and may only include upper/lowercase alphanumeric chars, -- underscores, or hyphens mkUsername :: MonadThrow m => Text -> m Username -- | A unique, site-wide ID for an account newtype UserID UserID :: Text -> UserID -- | Account information. Maybe fields denote data that Reddit -- sets to null if the requester does not own the account in question. -- Note that this does not include all of the possible fields that -- may be present in Reddit's response - which are quite numerous in -- total and poorly documented data Account Account :: UserID -> Username -> UTCTime -> Int -> Bool -> Bool -> Int -> Maybe Integer -> Maybe Text -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Account [$sel:userID:Account] :: Account -> UserID [$sel:username:Account] :: Account -> Username [$sel:created:Account] :: Account -> UTCTime [$sel:commentKarma:Account] :: Account -> Int [$sel:isGold:Account] :: Account -> Bool [$sel:isMod:Account] :: Account -> Bool [$sel:linkKarma:Account] :: Account -> Int [$sel:inboxCount:Account] :: Account -> Maybe Integer [$sel:modHash:Account] :: Account -> Maybe Text [$sel:over18:Account] :: Account -> Maybe Bool [$sel:hasMail:Account] :: Account -> Maybe Bool [$sel:hasModMail:Account] :: Account -> Maybe Bool [$sel:hasVerifiedEmail:Account] :: Account -> Maybe Bool -- | Options for search Listings of Accounts data AccountSearchOpts AccountSearchOpts :: AccountSearchSort -> Maybe Bool -> Maybe Text -> AccountSearchOpts [$sel:resultSort:AccountSearchOpts] :: AccountSearchOpts -> AccountSearchSort [$sel:typeaheadActive:AccountSearchOpts] :: AccountSearchOpts -> Maybe Bool -- | A UUID. This is not clearly documented in the API docs. Presumably, it -- refers to an identifier for an existing search [$sel:searchQueryID:AccountSearchOpts] :: AccountSearchOpts -> Maybe Text -- | The item sort for Account searches data AccountSearchSort RelevantAccounts :: AccountSearchSort ActiveAccounts :: AccountSearchSort -- | A user's friend data Friend Friend :: Username -> UserID -> UTCTime -> Maybe Text -> Friend [$sel:username:Friend] :: Friend -> Username [$sel:userID:Friend] :: Friend -> UserID [$sel:since:Friend] :: Friend -> UTCTime [$sel:note:Friend] :: Friend -> Maybe Text -- | Wrapper for parsing JSON objects listing Friends data FriendList -- | Information about a user's karma data Karma Karma :: SubredditName -> Integer -> Integer -> Karma [$sel:subreddit:Karma] :: Karma -> SubredditName [$sel:commentKarma:Karma] :: Karma -> Integer [$sel:linkKarma:Karma] :: Karma -> Integer -- | Wrapper for parsing JSON array of Karma data KarmaList -- | A Reddit award, such as the "one-year club" data Trophy Trophy :: Name -> Maybe Text -> Maybe Text -> Maybe Body -> Maybe UTCTime -> Trophy [$sel:name:Trophy] :: Trophy -> Name [$sel:trophyID:Trophy] :: Trophy -> Maybe Text [$sel:awardID:Trophy] :: Trophy -> Maybe Text [$sel:description:Trophy] :: Trophy -> Maybe Body [$sel:grantedAt:Trophy] :: Trophy -> Maybe UTCTime -- | Wrapper for parsing JSON objects listing Trophys data TrophyList -- | A brief summary of a user, with significantly less information than a -- Account data UserSummary UserSummary :: Maybe UserID -> Username -> Integer -> Integer -> UTCTime -> URL -> Maybe RGBText -> Bool -> UserSummary -- | This field will be absent unless the UserSummary is obtained -- from a specific endpoint using getUserSummaries. User summaries -- are sent as a JSON object with the user IDs as keys, so this field -- doesn't exist until the larger structure is parsed [$sel:userID:UserSummary] :: UserSummary -> Maybe UserID [$sel:name:UserSummary] :: UserSummary -> Username [$sel:commentKarma:UserSummary] :: UserSummary -> Integer [$sel:linkKarma:UserSummary] :: UserSummary -> Integer [$sel:created:UserSummary] :: UserSummary -> UTCTime [$sel:profilePicture:UserSummary] :: UserSummary -> URL [$sel:profileColor:UserSummary] :: UserSummary -> Maybe RGBText [$sel:profileOver18:UserSummary] :: UserSummary -> Bool -- | Wrapper for parsing a JSON object of UserSummarys which has -- user IDs as keys data UserSummaryList -- | User preferences data Preferences Preferences :: ItemSort -> MediaPreference -> MediaPreference -> Int -> Int -> Int -> Int -> Text -> AcceptPMs -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Preferences -- | Default comment sort [$sel:defaultCommentSort:Preferences] :: Preferences -> ItemSort -- | Thumbnail preference [$sel:media:Preferences] :: Preferences -> MediaPreference -- | Media preview preference [$sel:mediaPreview:Preferences] :: Preferences -> MediaPreference -- | Minimum score for displaying comments, must be between -100 and 100 [$sel:minCommentScore:Preferences] :: Preferences -> Int -- | Minimum score for displaying submissions, must be between -100 and 100 [$sel:minLinkScore:Preferences] :: Preferences -> Int -- | Default number of comments to display, must be between 1 and 500 [$sel:numComments:Preferences] :: Preferences -> Int -- | Number of submissions to display at once, must be between 1 and 100 [$sel:numSites:Preferences] :: Preferences -> Int -- | Interface language, should be in IETF format, with components -- separated with underscores [$sel:lang:Preferences] :: Preferences -> Text -- | If True, all users can send PMs. Otherwise, only whitelisted -- users can [$sel:acceptPMs:Preferences] :: Preferences -> AcceptPMs -- | Allows Reddit to use activity to show more relevant ads [$sel:activityRelevantAds:Preferences] :: Preferences -> Bool -- | Allows Reddit to log outbound clicks for personalization [$sel:allowClicktracking:Preferences] :: Preferences -> Bool -- | Enrolls user in beta testing Reddit features [$sel:beta:Preferences] :: Preferences -> Bool -- | Show recently viewed links [$sel:clickGadget:Preferences] :: Preferences -> Bool -- | Collapse messages after reading them [$sel:collapseReadMessages:Preferences] :: Preferences -> Bool -- | Compress link display [$sel:compress:Preferences] :: Preferences -> Bool -- | Use creddit to automatically renew gold upon expiration [$sel:credditAutorenew:Preferences] :: Preferences -> Maybe Bool -- | Show additional details in domain text if applicable (e.g. source -- subreddit, author URL, etc...) [$sel:domainDetails:Preferences] :: Preferences -> Bool -- | Send email notifications for chat requests [$sel:emailChatRequest:Preferences] :: Preferences -> Bool -- | Send email notifications for comments replies [$sel:emailCommentReply:Preferences] :: Preferences -> Bool -- | Send email digests [$sel:emailDigests:Preferences] :: Preferences -> Bool -- | Send email notifications for messages [$sel:emailMessages:Preferences] :: Preferences -> Bool -- | Send email notifications for submission replies [$sel:emailPostReply:Preferences] :: Preferences -> Bool -- | Send email notifications for PMs [$sel:emailPrivateMessage:Preferences] :: Preferences -> Bool -- | Unsubscribe from all emails [$sel:emailUnsubscribeAll:Preferences] :: Preferences -> Bool -- | Send email notifications for comment upvotes [$sel:emailUpvoteComment:Preferences] :: Preferences -> Bool -- | Send email notifications for submission upvotes [$sel:emailUpvotePost:Preferences] :: Preferences -> Bool -- | Send email notifications for new followers [$sel:emailUserNewFollower:Preferences] :: Preferences -> Bool -- | Send email notifications for user mentions [$sel:emailUsernameMention:Preferences] :: Preferences -> Bool [$sel:enableDefaultThemes:Preferences] :: Preferences -> Bool -- | Enable feed recommendations [$sel:feedRecommendationsEnabled:Preferences] :: Preferences -> Bool [$sel:hideAds:Preferences] :: Preferences -> Bool -- | Don't show submissions after downvoting them [$sel:hideDowns:Preferences] :: Preferences -> Bool -- | Disallow search engine profile indexing [$sel:hideFromRobots:Preferences] :: Preferences -> Bool -- | Don't show submissions after upvoting them [$sel:hideUps:Preferences] :: Preferences -> Bool -- | Show a dagger on comments voted controversial [$sel:highlightControversial:Preferences] :: Preferences -> Bool -- | Highlight new comments [$sel:highlightNewComments:Preferences] :: Preferences -> Bool -- | Ignore suggested sorts [$sel:ignoreSuggestedSort:Preferences] :: Preferences -> Bool [$sel:inRedesignBeta:Preferences] :: Preferences -> Maybe Bool -- | Label NSFTW submissions [$sel:labelNSFW:Preferences] :: Preferences -> Bool -- | Show the legacy search page [$sel:legacySearch:Preferences] :: Preferences -> Bool -- | Send browser message notifications [$sel:liveOrangereds:Preferences] :: Preferences -> Bool -- | Mark messages as read after opening the inbox [$sel:markMessagesRead:Preferences] :: Preferences -> Bool -- | Receive a notification when your username is mentioned by others [$sel:monitorMentions:Preferences] :: Preferences -> Bool -- | Open links in a new window [$sel:newWindow:Preferences] :: Preferences -> Bool -- | Enable night mode [$sel:nightMode:Preferences] :: Preferences -> Bool -- | Hide thumbnails and media previews for NSFW content [$sel:noProfanity:Preferences] :: Preferences -> Bool -- | Show the spotlight box on the home feed [$sel:organic:Preferences] :: Preferences -> Maybe Bool -- | Affirm age and willingness to view adult content [$sel:over18:Preferences] :: Preferences -> Bool -- | Enable private RSS feeds [$sel:privateFeeds:Preferences] :: Preferences -> Bool -- | View user profiles on desktop using legacy mode [$sel:profileOptOut:Preferences] :: Preferences -> Bool -- | Make votes public [$sel:publicVotes:Preferences] :: Preferences -> Bool -- | Allow data to be used for "research" purposes [$sel:research:Preferences] :: Preferences -> Bool -- | Include NSFW content in search results [$sel:searchIncludeOver18:Preferences] :: Preferences -> Bool -- | Send crosspost messages [$sel:sendCrosspostMessages:Preferences] :: Preferences -> Bool -- | Send welcome messages [$sel:sendWelcomeMessages:Preferences] :: Preferences -> Bool -- | Show user flair [$sel:showFlair:Preferences] :: Preferences -> Bool -- | Show remaining gold on userpage [$sel:showGoldExpiration:Preferences] :: Preferences -> Bool -- | Show link flair [$sel:showLinkFlair:Preferences] :: Preferences -> Bool -- | Show location-based recommendations [$sel:showLocationBasedRecommendations:Preferences] :: Preferences -> Bool -- | Show presence [$sel:showPresence:Preferences] :: Preferences -> Bool [$sel:showPromote:Preferences] :: Preferences -> Maybe Bool -- | Allow subreddits to display custom themes [$sel:showStylesheets:Preferences] :: Preferences -> Bool -- | Show trending subreddits [$sel:showTrending:Preferences] :: Preferences -> Bool -- | Show a link to your Twitter account on your profile [$sel:showTwitter:Preferences] :: Preferences -> Bool -- | Store visits [$sel:storeVisits:Preferences] :: Preferences -> Bool -- | Allow Reddit to use 3rd-party data to show more relevant ads [$sel:thirdPartyDataPersonalizedAds:Preferences] :: Preferences -> Bool -- | Allow ad personalization [$sel:thirdPartyPersonalizedAds:Preferences] :: Preferences -> Bool -- | Allow ad personalization using 3rd-party data [$sel:thirdPartySiteDataPersonalizedAds:Preferences] :: Preferences -> Bool -- | Allow content personalization using 3rd-party data [$sel:thirdPartySiteDataPersonalizedContent:Preferences] :: Preferences -> Bool -- | Show message conversations in the inbox [$sel:threadedMessages:Preferences] :: Preferences -> Bool -- | Enable threaded modmail display [$sel:threadedModmail:Preferences] :: Preferences -> Bool [$sel:topKarmaSubreddits:Preferences] :: Preferences -> Bool [$sel:useGlobalDefaults:Preferences] :: Preferences -> Bool -- | Autoplay Reddit videos on the desktop comments page [$sel:videoAutoplay:Preferences] :: Preferences -> Bool -- | How to deal with media previews and thumbnails in your -- Preferences data MediaPreference TurnOn :: MediaPreference TurnOff :: MediaPreference FollowSubreddit :: MediaPreference -- | Policy for accepting private messages, for use in user -- Preferences data AcceptPMs Everyone :: AcceptPMs Whitelisted :: AcceptPMs instance GHC.Classes.Eq Network.Reddit.Types.Account.Username instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Account.Username instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Account.Username instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.Username instance GHC.Generics.Generic Network.Reddit.Types.Account.Username instance GHC.Show.Show Network.Reddit.Types.Account.Username instance GHC.Classes.Eq Network.Reddit.Types.Account.UserID instance GHC.Generics.Generic Network.Reddit.Types.Account.UserID instance GHC.Show.Show Network.Reddit.Types.Account.UserID instance GHC.Generics.Generic Network.Reddit.Types.Account.Account instance GHC.Show.Show Network.Reddit.Types.Account.Account instance GHC.Generics.Generic Network.Reddit.Types.Account.AccountSearchSort instance GHC.Classes.Eq Network.Reddit.Types.Account.AccountSearchSort instance GHC.Show.Show Network.Reddit.Types.Account.AccountSearchSort instance GHC.Generics.Generic Network.Reddit.Types.Account.AccountSearchOpts instance GHC.Classes.Eq Network.Reddit.Types.Account.AccountSearchOpts instance GHC.Show.Show Network.Reddit.Types.Account.AccountSearchOpts instance GHC.Generics.Generic Network.Reddit.Types.Account.Friend instance GHC.Classes.Eq Network.Reddit.Types.Account.Friend instance GHC.Show.Show Network.Reddit.Types.Account.Friend instance GHC.Generics.Generic Network.Reddit.Types.Account.FriendList instance GHC.Show.Show Network.Reddit.Types.Account.FriendList instance GHC.Generics.Generic Network.Reddit.Types.Account.Karma instance GHC.Classes.Eq Network.Reddit.Types.Account.Karma instance GHC.Show.Show Network.Reddit.Types.Account.Karma instance GHC.Generics.Generic Network.Reddit.Types.Account.KarmaList instance GHC.Show.Show Network.Reddit.Types.Account.KarmaList instance GHC.Generics.Generic Network.Reddit.Types.Account.Trophy instance GHC.Classes.Eq Network.Reddit.Types.Account.Trophy instance GHC.Show.Show Network.Reddit.Types.Account.Trophy instance GHC.Generics.Generic Network.Reddit.Types.Account.TrophyList instance GHC.Show.Show Network.Reddit.Types.Account.TrophyList instance GHC.Generics.Generic Network.Reddit.Types.Account.UserSummary instance GHC.Classes.Eq Network.Reddit.Types.Account.UserSummary instance GHC.Show.Show Network.Reddit.Types.Account.UserSummary instance GHC.Generics.Generic Network.Reddit.Types.Account.UserSummaryList instance GHC.Show.Show Network.Reddit.Types.Account.UserSummaryList instance GHC.Generics.Generic Network.Reddit.Types.Account.MediaPreference instance GHC.Classes.Eq Network.Reddit.Types.Account.MediaPreference instance GHC.Show.Show Network.Reddit.Types.Account.MediaPreference instance GHC.Generics.Generic Network.Reddit.Types.Account.AcceptPMs instance GHC.Classes.Eq Network.Reddit.Types.Account.AcceptPMs instance GHC.Show.Show Network.Reddit.Types.Account.AcceptPMs instance GHC.Generics.Generic Network.Reddit.Types.Account.Preferences instance GHC.Classes.Eq Network.Reddit.Types.Account.Preferences instance GHC.Show.Show Network.Reddit.Types.Account.Preferences instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.Preferences instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Account.Preferences instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.AcceptPMs instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Account.AcceptPMs instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.MediaPreference instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Account.MediaPreference instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.UserSummaryList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.UserSummary instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.TrophyList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.Trophy instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.KarmaList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.Karma instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.FriendList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.Friend instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Account.Account instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Account.AccountSearchOpts instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Account.AccountSearchSort instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.Account instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Account.UserID instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Account.UserID module Network.Reddit.Types.Multireddit -- | An aggregation of individual Subreddits data Multireddit Multireddit :: MultiName -> Text -> Seq SubredditName -> UTCTime -> Body -> Body -> Maybe RGBText -> MultiPath -> MultiVisibility -> Maybe MultiPath -> Bool -> Maybe Bool -> Multireddit [$sel:name:Multireddit] :: Multireddit -> MultiName [$sel:displayName:Multireddit] :: Multireddit -> Text [$sel:subreddits:Multireddit] :: Multireddit -> Seq SubredditName [$sel:created:Multireddit] :: Multireddit -> UTCTime [$sel:description:Multireddit] :: Multireddit -> Body [$sel:descriptionHTML:Multireddit] :: Multireddit -> Body [$sel:keyColor:Multireddit] :: Multireddit -> Maybe RGBText [$sel:multipath:Multireddit] :: Multireddit -> MultiPath [$sel:visibility:Multireddit] :: Multireddit -> MultiVisibility -- | The path to the original multireddit from which this one was copied, -- if any, e.g.: /u/USERNAME/m/MULTINAME [$sel:copiedFrom:Multireddit] :: Multireddit -> Maybe MultiPath -- | Whether the authenticated user can edit this multireddit [$sel:canEdit:Multireddit] :: Multireddit -> Bool [$sel:over18:Multireddit] :: Multireddit -> Maybe Bool -- | The name of a Multireddit, which may only contain alphanumeric -- characters data MultiName -- | Smart constructor for MultiNames, which may only contain -- alphanumeric characters mkMultiName :: MonadThrow m => Text -> m MultiName -- | The configured visibility level for a Multireddit data MultiVisibility PrivateMulti :: MultiVisibility PublicMulti :: MultiVisibility HiddenMulti :: MultiVisibility -- | The path to a Multireddit, of the form -- /user/USERNAME/m/MULTINAME data MultiPath MultiPath :: Username -> MultiName -> MultiPath [$sel:username:MultiPath] :: MultiPath -> Username [$sel:multiname:MultiPath] :: MultiPath -> MultiName -- | Can represent either a new multireddit when parameterized by -- Identity, or a multireddit update when parameterized by -- Maybe. In both cases, keyColor is an optional field data NewMultiF f NewMultiF :: HKD f Body -> HKD f Text -> HKD f (Seq SubredditName) -> HKD f MultiVisibility -> Maybe RGBText -> NewMultiF f [$sel:description:NewMultiF] :: NewMultiF f -> HKD f Body [$sel:displayName:NewMultiF] :: NewMultiF f -> HKD f Text [$sel:subreddits:NewMultiF] :: NewMultiF f -> HKD f (Seq SubredditName) [$sel:visibility:NewMultiF] :: NewMultiF f -> HKD f MultiVisibility [$sel:keyColor:NewMultiF] :: NewMultiF f -> Maybe RGBText -- | An new multireddit, where all fields are required type NewMulti = NewMultiF Identity -- | An update to a multireddit, where all fields are optional. If a field -- is not provided, it is omitted during JSON encoding type MultiUpdate = NewMultiF Maybe -- | Convert a Multireddit to a MultiUpdate multiUpdate :: Multireddit -> MultiUpdate -- | A MultiUpdate with all Nothing fields, for convenience defaultMultiUpdate :: MultiUpdate instance GHC.Classes.Eq Network.Reddit.Types.Multireddit.MultiName instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Multireddit.MultiName instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Multireddit.MultiName instance GHC.Generics.Generic Network.Reddit.Types.Multireddit.MultiName instance GHC.Show.Show Network.Reddit.Types.Multireddit.MultiName instance GHC.Generics.Generic Network.Reddit.Types.Multireddit.MultiPath instance GHC.Classes.Eq Network.Reddit.Types.Multireddit.MultiPath instance GHC.Show.Show Network.Reddit.Types.Multireddit.MultiPath instance GHC.Classes.Ord Network.Reddit.Types.Multireddit.MultiVisibility instance GHC.Generics.Generic Network.Reddit.Types.Multireddit.MultiVisibility instance GHC.Classes.Eq Network.Reddit.Types.Multireddit.MultiVisibility instance GHC.Show.Show Network.Reddit.Types.Multireddit.MultiVisibility instance GHC.Generics.Generic Network.Reddit.Types.Multireddit.Multireddit instance GHC.Classes.Eq Network.Reddit.Types.Multireddit.Multireddit instance GHC.Show.Show Network.Reddit.Types.Multireddit.Multireddit instance GHC.Generics.Generic (Network.Reddit.Types.Multireddit.NewMultiF f) instance GHC.Show.Show Network.Reddit.Types.Multireddit.NewMulti instance GHC.Show.Show Network.Reddit.Types.Multireddit.MultiUpdate instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Multireddit.MultiUpdate instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Multireddit.NewMulti instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Multireddit.Multireddit instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Multireddit.MultiVisibility instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Multireddit.MultiVisibility instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Multireddit.MultiPath instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Multireddit.MultiPath module Network.Reddit.Types.Live -- | An existing Reddit live thread. It may be currently live or already -- complete data LiveThread LiveThread :: LiveThreadID -> Title -> Maybe Body -> Maybe Body -> Maybe Body -> Maybe Body -> UTCTime -> Maybe Integer -> LiveState -> Bool -> Maybe URL -> LiveThread [$sel:liveThreadID:LiveThread] :: LiveThread -> LiveThreadID [$sel:title:LiveThread] :: LiveThread -> Title [$sel:description:LiveThread] :: LiveThread -> Maybe Body [$sel:descriptionHTML:LiveThread] :: LiveThread -> Maybe Body [$sel:resources:LiveThread] :: LiveThread -> Maybe Body [$sel:resourcesHTML:LiveThread] :: LiveThread -> Maybe Body [$sel:created:LiveThread] :: LiveThread -> UTCTime -- | The current number of viewers; will be Nothing if the -- liveState is Complete [$sel:viewerCount:LiveThread] :: LiveThread -> Maybe Integer [$sel:liveState:LiveThread] :: LiveThread -> LiveState [$sel:nsfw:LiveThread] :: LiveThread -> Bool -- | If the thread is still live, this will allow you to connect to a -- websocket server to receive live updates as the thread progresses [$sel:websocketURL:LiveThread] :: LiveThread -> Maybe URL -- | ID for a single LiveThread newtype LiveThreadID LiveThreadID :: Text -> LiveThreadID -- | Data to create a new LiveThread or update an existing one. In -- the latter case, see liveThreadToPostable for conversion data PostableLiveThread PostableLiveThread :: Title -> Maybe Body -> Maybe Body -> Bool -> PostableLiveThread [$sel:title:PostableLiveThread] :: PostableLiveThread -> Title -- | Markdown-formatted; if Nothing, defaults to an empty string [$sel:description:PostableLiveThread] :: PostableLiveThread -> Maybe Body -- | Markdown-formatted; if Nothing, defaults to an empty string [$sel:resources:PostableLiveThread] :: PostableLiveThread -> Maybe Body [$sel:nsfw:PostableLiveThread] :: PostableLiveThread -> Bool -- | Type synonym for creating new live threads type NewLiveThread = PostableLiveThread -- | Type synonym for updating existing live threads type UpdatedLiveThread = PostableLiveThread -- | Convenience function to transform an existing LiveThread into a -- PostableLiveThread, which may be used in updates liveThreadToPostable :: LiveThread -> UpdatedLiveThread -- | Create a NewLiveThread with default values for most fields mkNewLiveThread :: Title -> NewLiveThread -- | Wrapper for parsing the ID returned from POSTing a livethred data PostedLiveThread -- | An individual update in a LiveThread data LiveUpdate LiveUpdate :: LiveUpdateID -> Maybe Username -> Body -> Body -> Bool -> Seq LiveUpdateEmbed -> LiveUpdate [$sel:liveUpdateID:LiveUpdate] :: LiveUpdate -> LiveUpdateID [$sel:author:LiveUpdate] :: LiveUpdate -> Maybe Username [$sel:body:LiveUpdate] :: LiveUpdate -> Body [$sel:bodyHTML:LiveUpdate] :: LiveUpdate -> Body [$sel:stricken:LiveUpdate] :: LiveUpdate -> Bool [$sel:embeds:LiveUpdate] :: LiveUpdate -> Seq LiveUpdateEmbed -- | ID for a LiveUpdate newtype LiveUpdateID LiveUpdateID :: Text -> LiveUpdateID -- | External resources embedded in a LiveUpdate data LiveUpdateEmbed LiveUpdateEmbed :: URL -> Maybe Integer -> Maybe Integer -> LiveUpdateEmbed -- | URL pointing to a Reddit-external resource [$sel:url:LiveUpdateEmbed] :: LiveUpdateEmbed -> URL [$sel:height:LiveUpdateEmbed] :: LiveUpdateEmbed -> Maybe Integer [$sel:width:LiveUpdateEmbed] :: LiveUpdateEmbed -> Maybe Integer -- | A user contributor in a LiveThread data LiveContributor LiveContributor :: UserID -> Username -> Seq LivePermission -> LiveContributor [$sel:userID:LiveContributor] :: LiveContributor -> UserID [$sel:username:LiveContributor] :: LiveContributor -> Username [$sel:permissions:LiveContributor] :: LiveContributor -> Seq LivePermission -- | Wrapper to parse lists of LiveContributors newtype LiveContributorList LiveContributorList :: Seq LiveContributor -> LiveContributorList -- | Permission granted to a LiveContributor data LivePermission Edit :: LivePermission Update :: LivePermission Manage :: LivePermission Settings :: LivePermission -- | The reason for reporting the LiveThread to the Reddit admins data LiveReportType Spam :: LiveReportType VoteManipulation :: LiveReportType PersonalInfo :: LiveReportType Sexualizing :: LiveReportType SiteBreaking :: LiveReportType -- | The state of the LiveThread data LiveState Current :: LiveState Complete :: LiveState instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Live.LiveThreadID instance GHC.Classes.Eq Network.Reddit.Types.Live.LiveThreadID instance GHC.Generics.Generic Network.Reddit.Types.Live.LiveThreadID instance GHC.Show.Show Network.Reddit.Types.Live.LiveThreadID instance GHC.Generics.Generic Network.Reddit.Types.Live.LiveState instance GHC.Classes.Eq Network.Reddit.Types.Live.LiveState instance GHC.Show.Show Network.Reddit.Types.Live.LiveState instance GHC.Generics.Generic Network.Reddit.Types.Live.LiveThread instance GHC.Classes.Eq Network.Reddit.Types.Live.LiveThread instance GHC.Show.Show Network.Reddit.Types.Live.LiveThread instance GHC.Generics.Generic Network.Reddit.Types.Live.PostableLiveThread instance GHC.Classes.Eq Network.Reddit.Types.Live.PostableLiveThread instance GHC.Show.Show Network.Reddit.Types.Live.PostableLiveThread instance GHC.Generics.Generic Network.Reddit.Types.Live.PostedLiveThread instance GHC.Show.Show Network.Reddit.Types.Live.PostedLiveThread instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Live.LiveUpdateID instance GHC.Classes.Eq Network.Reddit.Types.Live.LiveUpdateID instance GHC.Generics.Generic Network.Reddit.Types.Live.LiveUpdateID instance GHC.Show.Show Network.Reddit.Types.Live.LiveUpdateID instance GHC.Generics.Generic Network.Reddit.Types.Live.LiveUpdateEmbed instance GHC.Classes.Eq Network.Reddit.Types.Live.LiveUpdateEmbed instance GHC.Show.Show Network.Reddit.Types.Live.LiveUpdateEmbed instance GHC.Generics.Generic Network.Reddit.Types.Live.LiveUpdate instance GHC.Classes.Eq Network.Reddit.Types.Live.LiveUpdate instance GHC.Show.Show Network.Reddit.Types.Live.LiveUpdate instance GHC.Enum.Bounded Network.Reddit.Types.Live.LivePermission instance GHC.Enum.Enum Network.Reddit.Types.Live.LivePermission instance GHC.Classes.Ord Network.Reddit.Types.Live.LivePermission instance GHC.Generics.Generic Network.Reddit.Types.Live.LivePermission instance GHC.Classes.Eq Network.Reddit.Types.Live.LivePermission instance GHC.Show.Show Network.Reddit.Types.Live.LivePermission instance GHC.Generics.Generic Network.Reddit.Types.Live.LiveContributor instance GHC.Classes.Eq Network.Reddit.Types.Live.LiveContributor instance GHC.Show.Show Network.Reddit.Types.Live.LiveContributor instance GHC.Generics.Generic Network.Reddit.Types.Live.LiveContributorList instance GHC.Show.Show Network.Reddit.Types.Live.LiveContributorList instance GHC.Generics.Generic Network.Reddit.Types.Live.LiveReportType instance GHC.Classes.Eq Network.Reddit.Types.Live.LiveReportType instance GHC.Show.Show Network.Reddit.Types.Live.LiveReportType instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Live.LiveReportType instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Live.LiveContributorList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Live.LiveContributor instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Live.LivePermission instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Live.LivePermission instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Live.LiveUpdate instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Live.LiveUpdate instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Live.LiveUpdateEmbed instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Live.LiveUpdateID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Live.LiveUpdateID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Live.PostedLiveThread instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Live.PostableLiveThread instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Live.LiveThread instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Live.LiveThread instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Live.LiveState instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Live.LiveThreadID instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Live.LiveThreadID module Network.Reddit.Types.Flair -- | Flair that has been, or will be, assigned to a user data AssignedFlair AssignedFlair :: Username -> Maybe FlairText -> Maybe CSSClass -> AssignedFlair [$sel:user:AssignedFlair] :: AssignedFlair -> Username [$sel:text:AssignedFlair] :: AssignedFlair -> Maybe FlairText [$sel:cssClass:AssignedFlair] :: AssignedFlair -> Maybe CSSClass -- | Flair "templates" that describe choices for self-assigned flair, for -- both users and submissions data FlairTemplate FlairTemplate :: Maybe FlairID -> FlairText -> Bool -> Maybe ForegroundColor -> Maybe RGBText -> Maybe CSSClass -> Maybe Bool -> Word -> Bool -> FlairContent -> FlairTemplate [$sel:flairID:FlairTemplate] :: FlairTemplate -> Maybe FlairID [$sel:text:FlairTemplate] :: FlairTemplate -> FlairText [$sel:textEditable:FlairTemplate] :: FlairTemplate -> Bool [$sel:textColor:FlairTemplate] :: FlairTemplate -> Maybe ForegroundColor [$sel:backgroundColor:FlairTemplate] :: FlairTemplate -> Maybe RGBText [$sel:cssClass:FlairTemplate] :: FlairTemplate -> Maybe CSSClass [$sel:overrideCSS:FlairTemplate] :: FlairTemplate -> Maybe Bool -- | Should be between 1 and 10; 10 is the default [$sel:maxEmojis:FlairTemplate] :: FlairTemplate -> Word [$sel:modOnly:FlairTemplate] :: FlairTemplate -> Bool [$sel:allowableContent:FlairTemplate] :: FlairTemplate -> FlairContent -- | A FlairTemplate with default fields, for convenience when -- creating new templates defaultFlairTemplate :: FlairTemplate -- | Wrapper around FlairTemplates for posting via the API. If the -- flairID field is Nothing, a new template will be -- created. Otherwise, the template with the matching ID will be updated data PostedFlairTemplate -- | An identifier for a FlairTemplate type FlairID = Text -- | The text displayed by the FlairTemplate data FlairText -- | Smart constructor for FlairText, the length of which not exceed -- 64 characters mkFlairText :: MonadThrow m => Text -> m FlairText -- | Select a FlairChoice for a submission or for the user data FlairSelection FlairSelection :: FlairChoice -> Maybe Text -> SubredditName -> FlairSelection [$sel:flairChoice:FlairSelection] :: FlairSelection -> FlairChoice -- | If Just and if the textEditable field of the -- FlairChoice is True, this will be sent. It is -- otherwise ignored [$sel:text:FlairSelection] :: FlairSelection -> Maybe Text [$sel:subreddit:FlairSelection] :: FlairSelection -> SubredditName -- | Information about flair that a user can choose. The -- templateID corresponds to the flairID field of a -- FlairTemplate data FlairChoice FlairChoice :: FlairID -> FlairText -> Bool -> Maybe CSSClass -> FlairChoice [$sel:templateID:FlairChoice] :: FlairChoice -> FlairID [$sel:text:FlairChoice] :: FlairChoice -> FlairText [$sel:textEditable:FlairChoice] :: FlairChoice -> Bool [$sel:cssClass:FlairChoice] :: FlairChoice -> Maybe CSSClass -- | Flair that is currently assigned to a user data UserFlair UserFlair :: Maybe FlairText -> Maybe CSSClass -> UserFlair [$sel:text:UserFlair] :: UserFlair -> Maybe FlairText [$sel:cssClass:UserFlair] :: UserFlair -> Maybe CSSClass -- | Foreground color for v2 flair data ForegroundColor Dark :: ForegroundColor Light :: ForegroundColor -- | The result of bulk setting of users' flairs as a mod action. The -- warnings and errors fields may be dynamically -- generated by Reddit, so they are represented here as HashMaps data FlairResult FlairResult :: Bool -> Text -> HashMap Text Text -> HashMap Text Text -> FlairResult -- | If the flair was applied or not [$sel:ok:FlairResult] :: FlairResult -> Bool -- | A human-readable description of the transaction [$sel:status:FlairResult] :: FlairResult -> Text [$sel:warnings:FlairResult] :: FlairResult -> HashMap Text Text [$sel:errors:FlairResult] :: FlairResult -> HashMap Text Text -- | Wrapper around UserFlair for fetching the current flair. This -- uses the same endpoint as the FlairChoiceList above data CurrentUserFlair data FlairChoiceList -- | Reddit strangely does not use their usual Listing -- mechanism for paginating assigned flairs, but a different data -- structure data FlairList FlairList :: Maybe UserID -> Maybe UserID -> Seq AssignedFlair -> FlairList [$sel:prev:FlairList] :: FlairList -> Maybe UserID [$sel:next:FlairList] :: FlairList -> Maybe UserID [$sel:users:FlairList] :: FlairList -> Seq AssignedFlair -- | Convert a FlairList to a Listing, allowing it to be used -- with other functions/actions expecting a listing flairlistToListing :: FlairList -> Listing UserID AssignedFlair -- | The type of content that is allowed in a flair template data FlairContent AllContent :: FlairContent EmojisOnly :: FlairContent TextOnly :: FlairContent -- | The type of flair, when creating a new template data FlairType UserFlairType :: FlairType SubmissionFlairType :: FlairType -- | CSS class for flair type CSSClass = Text instance GHC.Base.Monoid Network.Reddit.Types.Flair.FlairText instance GHC.Base.Semigroup Network.Reddit.Types.Flair.FlairText instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Flair.FlairText instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Flair.FlairText instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.FlairText instance GHC.Classes.Eq Network.Reddit.Types.Flair.FlairText instance GHC.Generics.Generic Network.Reddit.Types.Flair.FlairText instance GHC.Show.Show Network.Reddit.Types.Flair.FlairText instance GHC.Generics.Generic Network.Reddit.Types.Flair.AssignedFlair instance GHC.Classes.Eq Network.Reddit.Types.Flair.AssignedFlair instance GHC.Show.Show Network.Reddit.Types.Flair.AssignedFlair instance GHC.Generics.Generic Network.Reddit.Types.Flair.FlairList instance GHC.Classes.Eq Network.Reddit.Types.Flair.FlairList instance GHC.Show.Show Network.Reddit.Types.Flair.FlairList instance GHC.Generics.Generic Network.Reddit.Types.Flair.FlairChoice instance GHC.Classes.Eq Network.Reddit.Types.Flair.FlairChoice instance GHC.Show.Show Network.Reddit.Types.Flair.FlairChoice instance GHC.Generics.Generic Network.Reddit.Types.Flair.FlairChoiceList instance GHC.Show.Show Network.Reddit.Types.Flair.FlairChoiceList instance GHC.Generics.Generic Network.Reddit.Types.Flair.UserFlair instance GHC.Classes.Eq Network.Reddit.Types.Flair.UserFlair instance GHC.Show.Show Network.Reddit.Types.Flair.UserFlair instance GHC.Generics.Generic Network.Reddit.Types.Flair.CurrentUserFlair instance GHC.Show.Show Network.Reddit.Types.Flair.CurrentUserFlair instance GHC.Generics.Generic Network.Reddit.Types.Flair.FlairSelection instance GHC.Classes.Eq Network.Reddit.Types.Flair.FlairSelection instance GHC.Show.Show Network.Reddit.Types.Flair.FlairSelection instance GHC.Generics.Generic Network.Reddit.Types.Flair.FlairResult instance GHC.Classes.Eq Network.Reddit.Types.Flair.FlairResult instance GHC.Show.Show Network.Reddit.Types.Flair.FlairResult instance GHC.Generics.Generic Network.Reddit.Types.Flair.FlairType instance GHC.Classes.Eq Network.Reddit.Types.Flair.FlairType instance GHC.Show.Show Network.Reddit.Types.Flair.FlairType instance GHC.Generics.Generic Network.Reddit.Types.Flair.FlairContent instance GHC.Classes.Eq Network.Reddit.Types.Flair.FlairContent instance GHC.Show.Show Network.Reddit.Types.Flair.FlairContent instance GHC.Generics.Generic Network.Reddit.Types.Flair.ForegroundColor instance GHC.Classes.Eq Network.Reddit.Types.Flair.ForegroundColor instance GHC.Show.Show Network.Reddit.Types.Flair.ForegroundColor instance GHC.Generics.Generic Network.Reddit.Types.Flair.FlairTemplate instance GHC.Classes.Eq Network.Reddit.Types.Flair.FlairTemplate instance GHC.Show.Show Network.Reddit.Types.Flair.FlairTemplate instance GHC.Classes.Eq Network.Reddit.Types.Flair.PostedFlairTemplate instance GHC.Generics.Generic Network.Reddit.Types.Flair.PostedFlairTemplate instance GHC.Show.Show Network.Reddit.Types.Flair.PostedFlairTemplate instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Flair.PostedFlairTemplate instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.FlairTemplate instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Flair.FlairTemplate instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.ForegroundColor instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Flair.ForegroundColor instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Flair.ForegroundColor instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.FlairContent instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Flair.FlairContent instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Flair.FlairType instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.FlairResult instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.CurrentUserFlair instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.UserFlair instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.FlairChoiceList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.FlairChoice instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.FlairList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Flair.AssignedFlair instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Flair.AssignedFlair module Network.Reddit.Types.Submission -- | A submitted self-text post or link data Submission Submission :: SubmissionID -> Title -> Username -> SubmissionContent -> SubredditName -> UTCTime -> Maybe UTCTime -> URL -> Domain -> Integer -> Integer -> Maybe Integer -> Maybe Integer -> Maybe Rational -> Integer -> Seq ItemReport -> Seq ItemReport -> Maybe Integer -> Maybe Distinction -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe PollData -> Submission [$sel:submissionID:Submission] :: Submission -> SubmissionID [$sel:title:Submission] :: Submission -> Title [$sel:author:Submission] :: Submission -> Username [$sel:content:Submission] :: Submission -> SubmissionContent [$sel:subreddit:Submission] :: Submission -> SubredditName [$sel:created:Submission] :: Submission -> UTCTime [$sel:edited:Submission] :: Submission -> Maybe UTCTime [$sel:permalink:Submission] :: Submission -> URL [$sel:domain:Submission] :: Submission -> Domain [$sel:numComments:Submission] :: Submission -> Integer [$sel:score:Submission] :: Submission -> Integer [$sel:ups:Submission] :: Submission -> Maybe Integer [$sel:downs:Submission] :: Submission -> Maybe Integer [$sel:upvoteRatio:Submission] :: Submission -> Maybe Rational [$sel:gilded:Submission] :: Submission -> Integer [$sel:userReports:Submission] :: Submission -> Seq ItemReport [$sel:modReports:Submission] :: Submission -> Seq ItemReport [$sel:numReports:Submission] :: Submission -> Maybe Integer [$sel:distinguished:Submission] :: Submission -> Maybe Distinction [$sel:isOC:Submission] :: Submission -> Bool [$sel:clicked:Submission] :: Submission -> Bool [$sel:over18:Submission] :: Submission -> Bool [$sel:locked:Submission] :: Submission -> Bool [$sel:spoiler:Submission] :: Submission -> Bool [$sel:pollData:Submission] :: Submission -> Maybe PollData -- | Unique, site-wide ID for a Submission newtype SubmissionID SubmissionID :: Text -> SubmissionID -- | The contents of the Submission. Can be a self-post with a -- plaintext and HTML body, an external link, or entirely empty data SubmissionContent SelfText :: Body -> Body -> SubmissionContent ExternalLink :: URL -> SubmissionContent EmptySubmission :: SubmissionContent -- | Parse a Submission submissionP :: Object -> Parser Submission -- | Data from an existing submission containing a poll. See Poll -- for submitting a new post with a poll data PollData PollData :: Seq PollOption -> Integer -> UTCTime -> Maybe PollOptionID -> PollData [$sel:options:PollData] :: PollData -> Seq PollOption -- | Total number of votes cast for the poll [$sel:totalVoteCount:PollData] :: PollData -> Integer -- | Voting end date for the poll [$sel:votingEnds:PollData] :: PollData -> UTCTime -- | The option selected by the authenticated user, if any [$sel:userSelection:PollData] :: PollData -> Maybe PollOptionID -- | Single option in existing PollData data PollOption PollOption :: PollOptionID -> Body -> Integer -> PollOption [$sel:pollOptionID:PollOption] :: PollOption -> PollOptionID [$sel:text:PollOption] :: PollOption -> Body -- | The total number of votes received thus far [$sel:voteCount:PollOption] :: PollOption -> Integer -- | Identifier for a PollOption type PollOptionID = Text -- | Represents a Reddit collection data Collection Collection :: CollectionID -> Username -> Title -> SubredditID -> Body -> URL -> UTCTime -> UTCTime -> Seq SubmissionID -> Seq Submission -> Maybe CollectionLayout -> Collection [$sel:collectionID:Collection] :: Collection -> CollectionID [$sel:author:Collection] :: Collection -> Username [$sel:title:Collection] :: Collection -> Title [$sel:subredditID:Collection] :: Collection -> SubredditID [$sel:description:Collection] :: Collection -> Body [$sel:permalink:Collection] :: Collection -> URL [$sel:created:Collection] :: Collection -> UTCTime [$sel:lastUpdated:Collection] :: Collection -> UTCTime [$sel:linkIDs:Collection] :: Collection -> Seq SubmissionID -- | These are the Submissions that correspond to the IDs in the -- linkIDs fields. This field may be empty, depending on how the -- Collection was obtained. Fetching all of the collections -- belonging to a subreddit will not include it, whereas fetching an -- individual collection by ID will [$sel:sortedLinks:Collection] :: Collection -> Seq Submission [$sel:layout:Collection] :: Collection -> Maybe CollectionLayout -- | The layout of the Collection on the redesigned site data CollectionLayout Gallery :: CollectionLayout Timeline :: CollectionLayout -- | A UUID identifier for a Collection type CollectionID = Text -- | Data to create a new Collection as a moderator action data NewCollection NewCollection :: Title -> Body -> SubredditID -> Maybe CollectionLayout -> NewCollection [$sel:title:NewCollection] :: NewCollection -> Title [$sel:description:NewCollection] :: NewCollection -> Body [$sel:subredditID:NewCollection] :: NewCollection -> SubredditID [$sel:layout:NewCollection] :: NewCollection -> Maybe CollectionLayout -- | Components to create a new submission data SubmissionOptions SubmissionOptions :: Title -> SubredditName -> Bool -> Bool -> Bool -> Bool -> Maybe CollectionID -> Maybe FlairID -> Maybe FlairText -> SubmissionOptions -- | Should be <= 300 characters in length [$sel:title:SubmissionOptions] :: SubmissionOptions -> Title [$sel:subreddit:SubmissionOptions] :: SubmissionOptions -> SubredditName [$sel:nsfw:SubmissionOptions] :: SubmissionOptions -> Bool [$sel:sendreplies:SubmissionOptions] :: SubmissionOptions -> Bool [$sel:resubmit:SubmissionOptions] :: SubmissionOptions -> Bool [$sel:spoiler:SubmissionOptions] :: SubmissionOptions -> Bool -- | The UUID of an existing Collection to which to add the new -- submission [$sel:collectionID:SubmissionOptions] :: SubmissionOptions -> Maybe CollectionID [$sel:flairID:SubmissionOptions] :: SubmissionOptions -> Maybe FlairID -- | If this is chosen, two conditions must be met that are not currently -- enforced by this library: * The flairID field above must also -- be provided * The textEditable field of the associated -- FlairTemplate must also be True [$sel:flairText:SubmissionOptions] :: SubmissionOptions -> Maybe FlairText -- | Create a SubmissionOptions with default values for most fields mkSubmissionOptions :: SubredditName -> Title -> SubmissionOptions -- | The type of SubmissionOptions to submit to Reddit. In general, -- this should not be used directly. See instead the various -- submit actions in Network.Reddit.Submission data NewSubmission SelfPost :: Body -> SubmissionOptions -> NewSubmission -- | The body should be generated using InlineMedia and converted to -- "fancypants" style markdown. Please see submitWithInlineMedia, -- which handles this WithInlineMedia :: Fancypants -> SubmissionOptions -> NewSubmission Link :: URL -> SubmissionOptions -> NewSubmission -- | Please see submitImage in order to create an image submission. -- The URL must point to a valid image hosted by Reddit ImagePost :: UploadURL -> SubmissionOptions -> NewSubmission -- | See the note for ImagePost about UploadURLs. The -- Bool argument specifies if this is "videogif" media. The -- second UploadURL points to a Reddit-hosted thumbnail image VideoPost :: UploadURL -> UploadURL -> Bool -> SubmissionOptions -> NewSubmission -- | Used to upload style assets and images to Reddit's servers when -- submitting content data S3UploadLease S3UploadLease :: URL -> HashMap Text Text -> Text -> URL -> UploadURL -> S3UploadLease [$sel:action:S3UploadLease] :: S3UploadLease -> URL -- | S3 metadata and headers [$sel:fields:S3UploadLease] :: S3UploadLease -> HashMap Text Text -- | This is required to get the final upload URL [$sel:key:S3UploadLease] :: S3UploadLease -> Text [$sel:websocketURL:S3UploadLease] :: S3UploadLease -> URL [$sel:assetID:S3UploadLease] :: S3UploadLease -> UploadURL -- | Used to distinguish upload types when creating submissions with media data UploadType SelfPostUpload :: UploadType LinkUpload :: UploadType GalleryUpload :: UploadType -- | Result issued from a websocket connection after uploading media data UploadResult UploadResult :: Text -> URL -> UploadResult [$sel:resultType:UploadResult] :: UploadResult -> Text [$sel:redirectURL:UploadResult] :: UploadResult -> URL -- | Options for crossposting a submission data CrosspostOptions CrosspostOptions :: SubredditName -> Title -> Bool -> Bool -> Bool -> Maybe FlairID -> Maybe FlairText -> CrosspostOptions [$sel:subreddit:CrosspostOptions] :: CrosspostOptions -> SubredditName [$sel:title:CrosspostOptions] :: CrosspostOptions -> Title [$sel:nsfw:CrosspostOptions] :: CrosspostOptions -> Bool [$sel:sendreplies:CrosspostOptions] :: CrosspostOptions -> Bool [$sel:spoiler:CrosspostOptions] :: CrosspostOptions -> Bool [$sel:flairID:CrosspostOptions] :: CrosspostOptions -> Maybe FlairID -- | If this is chosen, two conditions must be met that are not currently -- enforced by this library: * The flairID field above must also -- be provided * The textEditable field of the associated -- FlairTemplate must also be True [$sel:flairText:CrosspostOptions] :: CrosspostOptions -> Maybe FlairText -- | CrosspostOptions with default values for most fields mkCrosspostOptions :: SubredditName -> Title -> CrosspostOptions -- | Wrapper for getting the submission ID after completing a crosspost data PostedCrosspost -- | A Reddit poll. See mkPoll to create a new one satisfying Reddit -- constraints on poll options and duration data Poll t Poll :: t Text -> Word -> Maybe Body -> Poll t -- | Between 2 and 6 total options [$sel:options:Poll] :: Poll t -> t Text -- | The number of days for the poll to run [$sel:duration:Poll] :: Poll t -> Word -- | Optional self text for the body of the submission [$sel:selftext:Poll] :: Poll t -> Maybe Body -- | Wrapper providing a single ToJSON instance for Polls and -- SubmissionOptionss together data PollSubmission t PollSubmission :: Poll t -> SubmissionOptions -> PollSubmission t -- | Create a new Poll, validating the following constraints: * The -- duration is between 1 and 7 * The number of options -- is between 2 and 6 mkPoll :: (Foldable t, MonadThrow m) => t Text -> Word -> m (Poll t) -- | A single image in a gallery submission data GalleryImage GalleryImage :: FilePath -> Maybe Body -> Maybe URL -> GalleryImage [$sel:imagePath:GalleryImage] :: GalleryImage -> FilePath -- | Optional caption [$sel:caption:GalleryImage] :: GalleryImage -> Maybe Body -- | Optional outbound URL [$sel:outboundURL:GalleryImage] :: GalleryImage -> Maybe URL -- | Create a GalleryImage with default values for the -- caption and outboundURL fields mkGalleryImage :: FilePath -> GalleryImage -- | Convert a GalleryImage to to GalleryUploadImage after -- obtaining the UploadURL galleryImageToUpload :: GalleryImage -> UploadURL -> GalleryUploadImage -- | Wrapper providing a single ToJSON instance for a container of -- GalleryUploadImages and SubmissionOptionss together data GallerySubmission t GallerySubmission :: t GalleryUploadImage -> SubmissionOptions -> GallerySubmission t -- | A piece of inline media that can be added to a self-text post data InlineMedia InlineMedia :: InlineMediaType -> FilePath -> Text -> Maybe Body -> InlineMedia [$sel:mediaType:InlineMedia] :: InlineMedia -> InlineMediaType -- | The path must be valid and the file type must correspond to the -- provided mediaType field [$sel:mediaPath:InlineMedia] :: InlineMedia -> FilePath -- | This corresponds to a placeholder in the self-text of the submission. -- This will be filled in with generated markdown. If the key is absent -- from the text, the inline media will not be included in the final -- body. See submitWithInlineMedia for more details [$sel:key:InlineMedia] :: InlineMedia -> Text -- | Optional caption for the media [$sel:caption:InlineMedia] :: InlineMedia -> Maybe Body -- | The type of inline media data InlineMediaType InlineImage :: InlineMediaType InlineGIF :: InlineMediaType InlineVideo :: InlineMediaType -- | As an InlineMedia, but after obtaining the URL for the -- Reddit-hosted image data InlineMediaUpload InlineMediaUpload :: InlineMediaType -> UploadURL -> Body -> Text -> InlineMediaUpload [$sel:mediaType:InlineMediaUpload] :: InlineMediaUpload -> InlineMediaType [$sel:mediaID:InlineMediaUpload] :: InlineMediaUpload -> UploadURL [$sel:caption:InlineMediaUpload] :: InlineMediaUpload -> Body [$sel:key:InlineMediaUpload] :: InlineMediaUpload -> Text -- | Convert an InlineMedia to InlineMediaUpload after -- obtaining the UploadURL inlineMediaToUpload :: InlineMedia -> UploadURL -> InlineMediaUpload -- | Write an InlineMediaUpload in markdown format writeInlineMedia :: InlineMediaUpload -> Body -- | Represents richtext JSON object. This should be generated through an -- API endpoint data Fancypants -- | Wrapper for getting the URL from the JSON object that is returned when -- posting a new submissions data PostedSubmission -- | The text to search, along with an optional SubredditName data Search Search :: Text -> Maybe SubredditName -> Maybe SearchSyntax -> Search -- | The text to search [$sel:q:Search] :: Search -> Text -- | If Nothing, will perform search. Should be <= 512 -- characters in length [$sel:subreddit:Search] :: Search -> Maybe SubredditName -- | If Nothing, defaults to Lucene [$sel:syntax:Search] :: Search -> Maybe SearchSyntax -- | The sort order for Searches data SearchSort ByRelevance :: SearchSort ByNew :: SearchSort ByHot :: SearchSort ByTop :: SearchSort ByComments :: SearchSort -- | The category for the Search data SearchCategory -- | Create a SearchCategory from Text, the length of which -- must not exceed 5 characters mkSearchCategory :: MonadThrow m => Text -> m SearchCategory -- | Options for paginating and filtering Searches data SearchOpts SearchOpts :: SearchSort -> Time -> Maybe SearchCategory -> SearchOpts [$sel:searchSort:SearchOpts] :: SearchOpts -> SearchSort [$sel:searchTime:SearchOpts] :: SearchOpts -> Time [$sel:category:SearchOpts] :: SearchOpts -> Maybe SearchCategory -- | A wrapper around SubmissionIDs that allows Listing ResultID -- a to be distinguished from Listing SubmissionID a newtype ResultID ResultID :: SubmissionID -> ResultID -- | The syntax to use in the Search data SearchSyntax Lucene :: SearchSyntax Cloudsearch :: SearchSyntax PlainSyntax :: SearchSyntax -- | Create a new Search by providing the query, with defaults for -- the other fields mkSearch :: Text -> Search instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Submission.SubmissionID instance GHC.Classes.Eq Network.Reddit.Types.Submission.SubmissionID instance GHC.Generics.Generic Network.Reddit.Types.Submission.SubmissionID instance GHC.Show.Show Network.Reddit.Types.Submission.SubmissionID instance GHC.Generics.Generic Network.Reddit.Types.Submission.SubmissionContent instance GHC.Classes.Eq Network.Reddit.Types.Submission.SubmissionContent instance GHC.Show.Show Network.Reddit.Types.Submission.SubmissionContent instance GHC.Generics.Generic Network.Reddit.Types.Submission.PollOption instance GHC.Classes.Eq Network.Reddit.Types.Submission.PollOption instance GHC.Show.Show Network.Reddit.Types.Submission.PollOption instance GHC.Generics.Generic Network.Reddit.Types.Submission.PollData instance GHC.Classes.Eq Network.Reddit.Types.Submission.PollData instance GHC.Show.Show Network.Reddit.Types.Submission.PollData instance GHC.Generics.Generic Network.Reddit.Types.Submission.Submission instance GHC.Classes.Eq Network.Reddit.Types.Submission.Submission instance GHC.Show.Show Network.Reddit.Types.Submission.Submission instance GHC.Generics.Generic Network.Reddit.Types.Submission.CollectionLayout instance GHC.Classes.Eq Network.Reddit.Types.Submission.CollectionLayout instance GHC.Show.Show Network.Reddit.Types.Submission.CollectionLayout instance GHC.Generics.Generic Network.Reddit.Types.Submission.Collection instance GHC.Classes.Eq Network.Reddit.Types.Submission.Collection instance GHC.Show.Show Network.Reddit.Types.Submission.Collection instance GHC.Generics.Generic Network.Reddit.Types.Submission.NewCollection instance GHC.Classes.Eq Network.Reddit.Types.Submission.NewCollection instance GHC.Show.Show Network.Reddit.Types.Submission.NewCollection instance GHC.Generics.Generic Network.Reddit.Types.Submission.SubmissionOptions instance GHC.Classes.Eq Network.Reddit.Types.Submission.SubmissionOptions instance GHC.Show.Show Network.Reddit.Types.Submission.SubmissionOptions instance GHC.Generics.Generic Network.Reddit.Types.Submission.S3UploadLease instance GHC.Classes.Eq Network.Reddit.Types.Submission.S3UploadLease instance GHC.Show.Show Network.Reddit.Types.Submission.S3UploadLease instance GHC.Generics.Generic Network.Reddit.Types.Submission.UploadType instance GHC.Classes.Eq Network.Reddit.Types.Submission.UploadType instance GHC.Show.Show Network.Reddit.Types.Submission.UploadType instance GHC.Generics.Generic Network.Reddit.Types.Submission.UploadResult instance GHC.Classes.Eq Network.Reddit.Types.Submission.UploadResult instance GHC.Show.Show Network.Reddit.Types.Submission.UploadResult instance GHC.Generics.Generic Network.Reddit.Types.Submission.CrosspostOptions instance GHC.Classes.Eq Network.Reddit.Types.Submission.CrosspostOptions instance GHC.Show.Show Network.Reddit.Types.Submission.CrosspostOptions instance GHC.Generics.Generic Network.Reddit.Types.Submission.PostedCrosspost instance GHC.Show.Show Network.Reddit.Types.Submission.PostedCrosspost instance GHC.Generics.Generic (Network.Reddit.Types.Submission.Poll t) instance GHC.Generics.Generic (Network.Reddit.Types.Submission.PollSubmission t) instance GHC.Generics.Generic Network.Reddit.Types.Submission.GalleryImage instance GHC.Classes.Eq Network.Reddit.Types.Submission.GalleryImage instance GHC.Show.Show Network.Reddit.Types.Submission.GalleryImage instance GHC.Generics.Generic Network.Reddit.Types.Submission.GalleryUploadImage instance GHC.Generics.Generic (Network.Reddit.Types.Submission.GallerySubmission t) instance GHC.Generics.Generic Network.Reddit.Types.Submission.InlineMediaType instance GHC.Classes.Eq Network.Reddit.Types.Submission.InlineMediaType instance GHC.Show.Show Network.Reddit.Types.Submission.InlineMediaType instance GHC.Generics.Generic Network.Reddit.Types.Submission.InlineMedia instance GHC.Classes.Eq Network.Reddit.Types.Submission.InlineMedia instance GHC.Show.Show Network.Reddit.Types.Submission.InlineMedia instance GHC.Generics.Generic Network.Reddit.Types.Submission.InlineMediaUpload instance GHC.Classes.Eq Network.Reddit.Types.Submission.InlineMediaUpload instance GHC.Show.Show Network.Reddit.Types.Submission.InlineMediaUpload instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Submission.Fancypants instance GHC.Classes.Eq Network.Reddit.Types.Submission.Fancypants instance GHC.Generics.Generic Network.Reddit.Types.Submission.Fancypants instance GHC.Show.Show Network.Reddit.Types.Submission.Fancypants instance GHC.Generics.Generic Network.Reddit.Types.Submission.NewSubmission instance GHC.Classes.Eq Network.Reddit.Types.Submission.NewSubmission instance GHC.Show.Show Network.Reddit.Types.Submission.NewSubmission instance GHC.Generics.Generic Network.Reddit.Types.Submission.PostedSubmission instance GHC.Show.Show Network.Reddit.Types.Submission.PostedSubmission instance GHC.Generics.Generic Network.Reddit.Types.Submission.SearchSort instance GHC.Classes.Eq Network.Reddit.Types.Submission.SearchSort instance GHC.Show.Show Network.Reddit.Types.Submission.SearchSort instance GHC.Classes.Eq Network.Reddit.Types.Submission.SearchCategory instance GHC.Generics.Generic Network.Reddit.Types.Submission.SearchCategory instance GHC.Show.Show Network.Reddit.Types.Submission.SearchCategory instance GHC.Generics.Generic Network.Reddit.Types.Submission.SearchOpts instance GHC.Classes.Eq Network.Reddit.Types.Submission.SearchOpts instance GHC.Show.Show Network.Reddit.Types.Submission.SearchOpts instance GHC.Generics.Generic Network.Reddit.Types.Submission.SearchSyntax instance GHC.Classes.Eq Network.Reddit.Types.Submission.SearchSyntax instance GHC.Show.Show Network.Reddit.Types.Submission.SearchSyntax instance GHC.Generics.Generic Network.Reddit.Types.Submission.Search instance GHC.Classes.Eq Network.Reddit.Types.Submission.Search instance GHC.Show.Show Network.Reddit.Types.Submission.Search instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Submission.ResultID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.ResultID instance GHC.Generics.Generic Network.Reddit.Types.Submission.ResultID instance GHC.Show.Show Network.Reddit.Types.Submission.ResultID instance GHC.Show.Show (t Data.Text.Internal.Text) => GHC.Show.Show (Network.Reddit.Types.Submission.Poll t) instance GHC.Classes.Eq (t Data.Text.Internal.Text) => GHC.Classes.Eq (Network.Reddit.Types.Submission.Poll t) instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Submission.Search instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Submission.Search instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Submission.SearchSyntax instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Submission.SearchOpts instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Submission.SearchSort instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.PostedSubmission instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Submission.NewSubmission instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.Fancypants instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Submission.InlineMediaType instance Data.Foldable.Foldable t => Data.Aeson.Types.ToJSON.ToJSON (Network.Reddit.Types.Submission.GallerySubmission t) instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Submission.GalleryUploadImage instance Data.Foldable.Foldable t => Data.Aeson.Types.ToJSON.ToJSON (Network.Reddit.Types.Submission.PollSubmission t) instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.PostedCrosspost instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Submission.CrosspostOptions instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.UploadResult instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.S3UploadLease instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Submission.SubmissionOptions instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Submission.NewCollection instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.Collection instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.CollectionLayout instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Submission.CollectionLayout instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.Submission instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Submission.Submission instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.PollData instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.PollOption instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Submission.SubmissionID instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Submission.SubmissionID module Network.Reddit.Types.Emoji -- | A single emoji. This can either be one of Reddit's builtin "snoomojis" -- or a custom emoji for a subreddit. See mkEmoji for creating -- news ones data Emoji Emoji :: EmojiName -> Bool -> Bool -> Bool -> Maybe UserID -> Maybe UploadURL -> Emoji -- | Depending on how the emoji was obtained, this field may be empty, as -- names must be taken from keys of a larger JSON object [$sel:name:Emoji] :: Emoji -> EmojiName -- | This field will be present when obtaining existing emojis, but should -- be left empty when creating new ones [$sel:modFlairOnly:Emoji] :: Emoji -> Bool [$sel:postFlairAllowed:Emoji] :: Emoji -> Bool [$sel:userFlairAllowed:Emoji] :: Emoji -> Bool -- | Points to a Reddit-hosted image. This will be present for existing -- emoji, but should be left empty when creating them [$sel:createdBy:Emoji] :: Emoji -> Maybe UserID [$sel:url:Emoji] :: Emoji -> Maybe UploadURL -- | Create a new Emoji by providing an EmojiName; default -- values are provided for all other fields mkEmoji :: EmojiName -> Emoji -- | Wrapper for creating new Emojis, which includes the -- name field data NewEmoji -- | The name of an individual Emoji data EmojiName -- | Smart constructor for EmojiNames, which may only contain -- alphanumeric characters, '_', '-', and '&', and may not exceed 24 -- characters in length mkEmojiName :: MonadThrow m => Text -> m EmojiName -- | Wrapper for parsing response JSON. Subreddit emojis must be extracted -- from a larger structure data EmojiList instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Emoji.EmojiName instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Emoji.EmojiName instance GHC.Base.Monoid Network.Reddit.Types.Emoji.EmojiName instance GHC.Base.Semigroup Network.Reddit.Types.Emoji.EmojiName instance GHC.Classes.Eq Network.Reddit.Types.Emoji.EmojiName instance GHC.Generics.Generic Network.Reddit.Types.Emoji.EmojiName instance GHC.Show.Show Network.Reddit.Types.Emoji.EmojiName instance GHC.Generics.Generic Network.Reddit.Types.Emoji.Emoji instance GHC.Classes.Eq Network.Reddit.Types.Emoji.Emoji instance GHC.Show.Show Network.Reddit.Types.Emoji.Emoji instance GHC.Generics.Generic Network.Reddit.Types.Emoji.NewEmoji instance GHC.Show.Show Network.Reddit.Types.Emoji.NewEmoji instance GHC.Generics.Generic Network.Reddit.Types.Emoji.EmojiList instance GHC.Show.Show Network.Reddit.Types.Emoji.EmojiList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Emoji.EmojiList instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Emoji.NewEmoji instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Emoji.Emoji instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Emoji.Emoji module Network.Reddit.Types.Comment -- | A Reddit comment data Comment Comment :: CommentID -> Username -> Body -> Body -> Seq ChildComment -> Maybe Integer -> Maybe Integer -> Maybe Integer -> UTCTime -> Maybe UTCTime -> SubredditName -> SubredditID -> Int -> Maybe Bool -> SubmissionID -> Maybe URL -> Maybe Username -> URL -> Seq ItemReport -> Seq ItemReport -> Maybe Integer -> Maybe Distinction -> Bool -> Bool -> Comment [$sel:commentID:Comment] :: Comment -> CommentID [$sel:author:Comment] :: Comment -> Username [$sel:body:Comment] :: Comment -> Body [$sel:bodyHTML:Comment] :: Comment -> Body -- | This field will be empty unless the comment was obtained via -- withReplies [$sel:replies:Comment] :: Comment -> Seq ChildComment [$sel:score:Comment] :: Comment -> Maybe Integer [$sel:ups:Comment] :: Comment -> Maybe Integer [$sel:downs:Comment] :: Comment -> Maybe Integer [$sel:created:Comment] :: Comment -> UTCTime [$sel:edited:Comment] :: Comment -> Maybe UTCTime [$sel:subreddit:Comment] :: Comment -> SubredditName [$sel:subredditID:Comment] :: Comment -> SubredditID [$sel:gilded:Comment] :: Comment -> Int [$sel:scoreHidden:Comment] :: Comment -> Maybe Bool [$sel:linkID:Comment] :: Comment -> SubmissionID [$sel:linkURL:Comment] :: Comment -> Maybe URL [$sel:linkAuthor:Comment] :: Comment -> Maybe Username [$sel:permaLink:Comment] :: Comment -> URL [$sel:userReports:Comment] :: Comment -> Seq ItemReport [$sel:modReports:Comment] :: Comment -> Seq ItemReport [$sel:numReports:Comment] :: Comment -> Maybe Integer [$sel:distinguished:Comment] :: Comment -> Maybe Distinction -- | Whether the author of the comment is also the submission author [$sel:isSubmitter:Comment] :: Comment -> Bool [$sel:stickied:Comment] :: Comment -> Bool -- | A Comment ID newtype CommentID CommentID :: Text -> CommentID -- | A link to load more children Comments data MoreComments MoreComments :: Seq CommentID -> Integer -> MoreComments [$sel:childIDs:MoreComments] :: MoreComments -> Seq CommentID -- | The number of "collapsed" comments that can be loaded [$sel:count:MoreComments] :: MoreComments -> Integer -- | Represents a comments on a submission or replies to a comment, which -- can be actual Comments, or a list of children corresponding to -- "load more" or "continue this thread" links on Reddit's UI data ChildComment TopLevel :: Comment -> ChildComment More :: MoreComments -> ChildComment -- | This wraps the ChildComments of a Submission data WithChildren -- | This wraps a Comment which has been fetched with its -- ChildComments data WithReplies -- | Parse a Comment commentP :: Object -> Parser Comment data LoadedChildren instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Comment.CommentID instance GHC.Classes.Ord Network.Reddit.Types.Comment.CommentID instance GHC.Classes.Eq Network.Reddit.Types.Comment.CommentID instance GHC.Generics.Generic Network.Reddit.Types.Comment.CommentID instance GHC.Show.Show Network.Reddit.Types.Comment.CommentID instance GHC.Generics.Generic Network.Reddit.Types.Comment.MoreComments instance GHC.Classes.Eq Network.Reddit.Types.Comment.MoreComments instance GHC.Show.Show Network.Reddit.Types.Comment.MoreComments instance GHC.Generics.Generic Network.Reddit.Types.Comment.Comment instance GHC.Classes.Eq Network.Reddit.Types.Comment.Comment instance GHC.Show.Show Network.Reddit.Types.Comment.Comment instance GHC.Generics.Generic Network.Reddit.Types.Comment.ChildComment instance GHC.Classes.Eq Network.Reddit.Types.Comment.ChildComment instance GHC.Show.Show Network.Reddit.Types.Comment.ChildComment instance GHC.Classes.Eq Network.Reddit.Types.Comment.LoadedChildren instance GHC.Generics.Generic Network.Reddit.Types.Comment.LoadedChildren instance GHC.Show.Show Network.Reddit.Types.Comment.LoadedChildren instance GHC.Generics.Generic Network.Reddit.Types.Comment.WithChildren instance GHC.Classes.Eq Network.Reddit.Types.Comment.WithChildren instance GHC.Show.Show Network.Reddit.Types.Comment.WithChildren instance GHC.Generics.Generic Network.Reddit.Types.Comment.WithReplies instance GHC.Classes.Eq Network.Reddit.Types.Comment.WithReplies instance GHC.Show.Show Network.Reddit.Types.Comment.WithReplies instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Comment.WithReplies instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Comment.WithChildren instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Comment.LoadedChildren instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Comment.Comment instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Comment.Comment instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Comment.ChildComment instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Comment.MoreComments instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Comment.CommentID instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Comment.CommentID module Network.Reddit.Types.Message -- | A private message or comment reply data Message Message :: MessageID -> Username -> Username -> Body -> Body -> Subject -> UTCTime -> Bool -> Seq Message -> Message [$sel:messageID:Message] :: Message -> MessageID [$sel:author:Message] :: Message -> Username [$sel:dest:Message] :: Message -> Username [$sel:body:Message] :: Message -> Body [$sel:bodyHTML:Message] :: Message -> Body [$sel:subject:Message] :: Message -> Subject [$sel:created:Message] :: Message -> UTCTime [$sel:new:Message] :: Message -> Bool [$sel:replies:Message] :: Message -> Seq Message -- | A private message ID newtype PrivateMessageID PrivateMessageID :: Text -> PrivateMessageID -- | This can be CommentID for replies to a comment, or a -- PrivateMessageID for private messages. Querying one's inbox or -- unread messages can provide both types data MessageID CommentReply :: CommentID -> MessageID PrivateMessage :: PrivateMessageID -> MessageID -- | Options for requesting and paginating Listings of -- Messages data MessageOpts MessageOpts :: Bool -> MessageOpts -- | If set to False (the default), any new messages read via the -- API will maintain their unread status in the web UI [$sel:mark:MessageOpts] :: MessageOpts -> Bool -- | For sending new Messages via the compose API endpoint data NewMessage NewMessage :: Subject -> Body -> Username -> NewMessage -- | The subject should be <= 100 characters in length [$sel:subject:NewMessage] :: NewMessage -> Subject [$sel:message:NewMessage] :: NewMessage -> Body [$sel:dest:NewMessage] :: NewMessage -> Username data PostedMessage instance GHC.Generics.Generic Network.Reddit.Types.Message.MessageOpts instance GHC.Classes.Eq Network.Reddit.Types.Message.MessageOpts instance GHC.Show.Show Network.Reddit.Types.Message.MessageOpts instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Message.PrivateMessageID instance GHC.Classes.Eq Network.Reddit.Types.Message.PrivateMessageID instance GHC.Classes.Ord Network.Reddit.Types.Message.PrivateMessageID instance GHC.Generics.Generic Network.Reddit.Types.Message.PrivateMessageID instance GHC.Show.Show Network.Reddit.Types.Message.PrivateMessageID instance GHC.Classes.Ord Network.Reddit.Types.Message.MessageID instance GHC.Generics.Generic Network.Reddit.Types.Message.MessageID instance GHC.Classes.Eq Network.Reddit.Types.Message.MessageID instance GHC.Show.Show Network.Reddit.Types.Message.MessageID instance GHC.Generics.Generic Network.Reddit.Types.Message.Message instance GHC.Classes.Eq Network.Reddit.Types.Message.Message instance GHC.Show.Show Network.Reddit.Types.Message.Message instance GHC.Generics.Generic Network.Reddit.Types.Message.NewMessage instance GHC.Classes.Eq Network.Reddit.Types.Message.NewMessage instance GHC.Show.Show Network.Reddit.Types.Message.NewMessage instance GHC.Classes.Eq Network.Reddit.Types.Message.PostedMessage instance GHC.Generics.Generic Network.Reddit.Types.Message.PostedMessage instance GHC.Show.Show Network.Reddit.Types.Message.PostedMessage instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Message.PostedMessage instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Message.NewMessage instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Message.Message instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Message.Message instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Message.MessageID instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Message.MessageID instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Message.MessageID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Message.PrivateMessageID instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Message.PrivateMessageID instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Message.MessageOpts module Network.Reddit.Types.Item -- | Certain endpoints will return either Comments or a -- Submissions, or both data Item CommentItem :: Comment -> Item SubmissionItem :: Submission -> Item -- | Wraps either a CommentID or a SubmissionID. This is -- required to use Items with Paginators data ItemID CommentItemID :: CommentID -> ItemID SubmissionItemID :: SubmissionID -> ItemID -- | Wrapper for parsing new Items, Comments, or -- Submissions that are returned after requesting their creation data PostedItem a -- | The direction in which to vote data Vote Downvote :: Vote Unvote :: Vote Upvote :: Vote -- | The reason for issuing a report. The length of the contained text must -- be <= 100 characters data Report -- | Smart constructor for Reports, which may be no longer than 100 -- characters in length mkReport :: MonadThrow m => Text -> m Report instance GHC.Generics.Generic Network.Reddit.Types.Item.ItemID instance GHC.Classes.Eq Network.Reddit.Types.Item.ItemID instance GHC.Show.Show Network.Reddit.Types.Item.ItemID instance GHC.Generics.Generic Network.Reddit.Types.Item.Item instance GHC.Classes.Eq Network.Reddit.Types.Item.Item instance GHC.Show.Show Network.Reddit.Types.Item.Item instance GHC.Generics.Generic (Network.Reddit.Types.Item.PostedItem a) instance GHC.Show.Show a => GHC.Show.Show (Network.Reddit.Types.Item.PostedItem a) instance GHC.Classes.Ord Network.Reddit.Types.Item.Vote instance GHC.Generics.Generic Network.Reddit.Types.Item.Vote instance GHC.Classes.Eq Network.Reddit.Types.Item.Vote instance GHC.Show.Show Network.Reddit.Types.Item.Vote instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Item.Report instance GHC.Classes.Eq Network.Reddit.Types.Item.Report instance GHC.Generics.Generic Network.Reddit.Types.Item.Report instance GHC.Show.Show Network.Reddit.Types.Item.Report instance GHC.Classes.Eq a => GHC.Classes.Eq (Network.Reddit.Types.Item.PostedItem a) instance Data.Aeson.Types.FromJSON.FromJSON (Network.Reddit.Types.Item.PostedItem Network.Reddit.Types.Comment.Comment) instance Data.Aeson.Types.FromJSON.FromJSON (Network.Reddit.Types.Item.PostedItem Network.Reddit.Types.Submission.Submission) instance Data.Aeson.Types.FromJSON.FromJSON (Network.Reddit.Types.Item.PostedItem Network.Reddit.Types.Item.Item) instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Item.Item instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Item.Item instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Item.ItemID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Item.ItemID module Network.Reddit.Types.Moderation -- | An Item of interest to moderators (spam, modqueue, etc...) newtype ModItem ModItem :: Item -> ModItem -- | Options for Listings of ModItems. Only contains one -- field, only to constrain the request to a single type (i.e. -- comments or links) data ModItemOpts ModItemOpts :: Maybe ItemType -> ModItemOpts [$sel:only:ModItemOpts] :: ModItemOpts -> Maybe ItemType -- | A message to explain/note the removal an Item data RemovalMessage RemovalMessage :: ItemID -> Body -> Title -> RemovalType -> RemovalMessage [$sel:itemID:RemovalMessage] :: RemovalMessage -> ItemID [$sel:message:RemovalMessage] :: RemovalMessage -> Body [$sel:title:RemovalMessage] :: RemovalMessage -> Title [$sel:removalType:RemovalMessage] :: RemovalMessage -> RemovalType -- | Controls how the RemovalMessage will be disseminated data RemovalType -- | Leaves the message as a public comment PublicComment :: RemovalType -- | Leaves moderator note with exposed username PrivateExposed :: RemovalType -- | Leaves mod note with hidden username PrivateHidden :: RemovalType -- | A subreddit-specific reason for item removal data RemovalReason RemovalReason :: RemovalReasonID -> Body -> Title -> RemovalReason [$sel:removalReasonID:RemovalReason] :: RemovalReason -> RemovalReasonID [$sel:message:RemovalReason] :: RemovalReason -> Body [$sel:title:RemovalReason] :: RemovalReason -> Title -- | Identifier for a RemovalReason type RemovalReasonID = Text data NewRemovalReasonID data RemovalReasonList -- | Various permissions that can be afforded to moderators and invitees data ModPermission Access :: ModPermission Flair :: ModPermission Mail :: ModPermission Configuration :: ModPermission ChatConfig :: ModPermission ChatOperator :: ModPermission Posts :: ModPermission Wiki :: ModPermission -- | The types of relationships that mods can manipulate data SubredditRelationship Mod :: SubredditRelationship ModInvitation :: SubredditRelationship Contributor :: SubredditRelationship BannedFromWiki :: SubredditRelationship WikiContributor :: SubredditRelationship Banned :: SubredditRelationship Muted :: SubredditRelationship -- | Uniquely identifies a subreddit relationship, excluding mutes (see -- MuteID) newtype RelID RelID :: Text -> RelID -- | Identifies relationships representing muted users newtype MuteID MuteID :: Text -> MuteID -- | Information about a user who has been invited to moderate the -- subreddit data ModInvitee ModInvitee :: UserID -> Username -> Maybe FlairText -> HashMap ModPermission Bool -> UTCTime -> Integer -> ModInvitee [$sel:userID:ModInvitee] :: ModInvitee -> UserID [$sel:username:ModInvitee] :: ModInvitee -> Username -- | Flair text on this subreddit [$sel:flairText:ModInvitee] :: ModInvitee -> Maybe FlairText [$sel:permissions:ModInvitee] :: ModInvitee -> HashMap ModPermission Bool [$sel:moddedAt:ModInvitee] :: ModInvitee -> UTCTime [$sel:postKarma:ModInvitee] :: ModInvitee -> Integer -- | A list containing users invited to moderate the subreddit. For some -- reason, the endpoints listing moderator invites do not use the same -- Listing mechanism that most other endpoints do data ModInviteeList ModInviteeList :: Seq ModInvitee -> Bool -> Maybe UserID -> Maybe UserID -> ModInviteeList -- | At most 25 of the invited moderators [$sel:invited:ModInviteeList] :: ModInviteeList -> Seq ModInvitee -- | If the list contains all invitees [$sel:allUsersLoaded:ModInviteeList] :: ModInviteeList -> Bool -- | Pagination controls for the next moderator invites [$sel:after:ModInviteeList] :: ModInviteeList -> Maybe UserID -- | Pagination controls for the previous moderator invites [$sel:before:ModInviteeList] :: ModInviteeList -> Maybe UserID -- | Wrapped for list of moderators, which resembles a Listing, but -- cannot be paginated or filtered data ModList -- | Account information about a moderator, similar to a Account, -- but with less information data ModAccount ModAccount :: Username -> UserID -> RelID -> Maybe FlairText -> Maybe CSSClass -> UTCTime -> Maybe (Seq ModPermission) -> ModAccount [$sel:username:ModAccount] :: ModAccount -> Username [$sel:userID:ModAccount] :: ModAccount -> UserID [$sel:relID:ModAccount] :: ModAccount -> RelID -- | Flair text on the subreddit [$sel:flairText:ModAccount] :: ModAccount -> Maybe FlairText -- | Flair CSS class on the subreddit [$sel:flairCSS:ModAccount] :: ModAccount -> Maybe CSSClass [$sel:date:ModAccount] :: ModAccount -> UTCTime -- | If Nothing, indicates the user has all mod permissions [$sel:permissions:ModAccount] :: ModAccount -> Maybe (Seq ModPermission) -- | Information about a contributor on the subreddit data RelInfo RelInfo :: UserID -> RelID -> Username -> UTCTime -> RelInfo [$sel:userID:RelInfo] :: RelInfo -> UserID [$sel:relID:RelInfo] :: RelInfo -> RelID [$sel:username:RelInfo] :: RelInfo -> Username [$sel:date:RelInfo] :: RelInfo -> UTCTime -- | Information about a muted user data MuteInfo MuteInfo :: UserID -> MuteID -> Username -> UTCTime -> MuteInfo [$sel:userID:MuteInfo] :: MuteInfo -> UserID [$sel:muteID:MuteInfo] :: MuteInfo -> MuteID [$sel:username:MuteInfo] :: MuteInfo -> Username [$sel:date:MuteInfo] :: MuteInfo -> UTCTime -- | Options for Listings of RelInfo. Currently only takes a -- single field, user, to limit the listing to a single user data RelInfoOpts RelInfoOpts :: Maybe Username -> RelInfoOpts [$sel:username:RelInfoOpts] :: RelInfoOpts -> Maybe Username -- | Represents an account that has been banned from a particular subreddit data Ban Ban :: RelID -> Username -> UserID -> Maybe Text -> UTCTime -> Maybe Word -> Ban [$sel:banID:Ban] :: Ban -> RelID [$sel:username:Ban] :: Ban -> Username [$sel:userID:Ban] :: Ban -> UserID [$sel:note:Ban] :: Ban -> Maybe Text [$sel:since:Ban] :: Ban -> UTCTime -- | The number of days remaining until the ban expires [$sel:daysLeft:Ban] :: Ban -> Maybe Word -- | Details of a new ban to apply to a user data BanNotes BanNotes :: Body -> Body -> Maybe Word -> Body -> BanNotes -- | The message sent to the user [$sel:banMessage:BanNotes] :: BanNotes -> Body -- | Reason for the ban, not sent to the user [$sel:banReason:BanNotes] :: BanNotes -> Body -- | Duration in days for the ban. Nothing implies infinite ban [$sel:duration:BanNotes] :: BanNotes -> Maybe Word -- | A note about the ban. Not sent to the user [$sel:note:BanNotes] :: BanNotes -> Body -- | The settings that may be configured for a particular subreddit data SubredditSettings SubredditSettings :: SubredditID -> Title -> Body -> Text -> Text -> Text -> LanguageCode -> SubredditType -> ContentOptions -> RGBText -> Wikimode -> Integer -> Integer -> Integer -> SpamFilter -> SpamFilter -> SpamFilter -> CrowdControlLevel -> CrowdControlLevel -> Bool -> Maybe ItemSort -> Maybe Text -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> SubredditSettings [$sel:subredditID:SubredditSettings] :: SubredditSettings -> SubredditID [$sel:title:SubredditSettings] :: SubredditSettings -> Title [$sel:description:SubredditSettings] :: SubredditSettings -> Body -- | The text that appears on the submission page [$sel:submitText:SubredditSettings] :: SubredditSettings -> Text -- | Custom label for creating submissions [$sel:submitTextLabel:SubredditSettings] :: SubredditSettings -> Text -- | The text seen when hovering over the snoo [$sel:headerHoverText:SubredditSettings] :: SubredditSettings -> Text [$sel:language:SubredditSettings] :: SubredditSettings -> LanguageCode [$sel:subredditType:SubredditSettings] :: SubredditSettings -> SubredditType [$sel:contentOptions:SubredditSettings] :: SubredditSettings -> ContentOptions -- | A hex string specifying the color theme on mobile [$sel:keyColor:SubredditSettings] :: SubredditSettings -> RGBText [$sel:wikimode:SubredditSettings] :: SubredditSettings -> Wikimode [$sel:wikiEditKarma:SubredditSettings] :: SubredditSettings -> Integer [$sel:wikiEditAge:SubredditSettings] :: SubredditSettings -> Integer [$sel:commentScoreHideMins:SubredditSettings] :: SubredditSettings -> Integer [$sel:spamComments:SubredditSettings] :: SubredditSettings -> SpamFilter [$sel:spamSelfposts:SubredditSettings] :: SubredditSettings -> SpamFilter [$sel:spamLinks:SubredditSettings] :: SubredditSettings -> SpamFilter [$sel:crowdControlLevel:SubredditSettings] :: SubredditSettings -> CrowdControlLevel [$sel:crowdControlChatLevel:SubredditSettings] :: SubredditSettings -> CrowdControlLevel [$sel:crowdControlMode:SubredditSettings] :: SubredditSettings -> Bool [$sel:suggestedCommentSort:SubredditSettings] :: SubredditSettings -> Maybe ItemSort [$sel:welcomeMessageText:SubredditSettings] :: SubredditSettings -> Maybe Text [$sel:welcomeMessageEnabled:SubredditSettings] :: SubredditSettings -> Bool [$sel:allowImages:SubredditSettings] :: SubredditSettings -> Bool [$sel:allowVideos:SubredditSettings] :: SubredditSettings -> Bool [$sel:allowPolls:SubredditSettings] :: SubredditSettings -> Bool [$sel:allowCrossposts:SubredditSettings] :: SubredditSettings -> Bool [$sel:allowChatPostCreation:SubredditSettings] :: SubredditSettings -> Bool [$sel:spoilersEnabled:SubredditSettings] :: SubredditSettings -> Bool [$sel:showMedia:SubredditSettings] :: SubredditSettings -> Bool [$sel:showMediaPreview:SubredditSettings] :: SubredditSettings -> Bool -- | Restrict all posting to only approved users [$sel:restrictPosting:SubredditSettings] :: SubredditSettings -> Bool -- | Restrict all commenting to only approved users [$sel:restrictCommenting:SubredditSettings] :: SubredditSettings -> Bool [$sel:over18:SubredditSettings] :: SubredditSettings -> Bool [$sel:collapseDeletedComments:SubredditSettings] :: SubredditSettings -> Bool -- | Allows the sub to appear in "r/all" and trending subs [$sel:defaultSet:SubredditSettings] :: SubredditSettings -> Bool -- | Whether users may send modmail messages approval as a submitter [$sel:disableContribRequests:SubredditSettings] :: SubredditSettings -> Bool -- | Allow users to enter custom report reasons [$sel:freeFormReports:SubredditSettings] :: SubredditSettings -> Bool -- | Exclude posts from site-wide banned users in the modqueue [$sel:excludeBannedModqueue:SubredditSettings] :: SubredditSettings -> Bool -- | Whether the "original content" tag is enabled [$sel:ocTagEnabled:SubredditSettings] :: SubredditSettings -> Bool -- | Whether to mandate that all submissions be OC [$sel:allOC:SubredditSettings] :: SubredditSettings -> Bool -- | The setting for crowd controls, from lenient to strict data CrowdControlLevel Zero :: CrowdControlLevel One :: CrowdControlLevel Two :: CrowdControlLevel Three :: CrowdControlLevel -- | The privacy level for the subreddit data SubredditType Public :: SubredditType Restricted :: SubredditType Private :: SubredditType Archived :: SubredditType GoldRestricted :: SubredditType EmployeesOnly :: SubredditType GoldOnly :: SubredditType UserSubreddit :: SubredditType -- | The strength of the subreddit's spam filter data SpamFilter LowFilter :: SpamFilter HighFilter :: SpamFilter AllFilter :: SpamFilter -- | The editing mode for a subreddit's wiki data Wikimode -- | Only mods can edit EditDisabled :: Wikimode -- | Only mods and approved editors can edit ApprovedEdit :: Wikimode -- | Any sub contributor can edit ContributorEdit :: Wikimode -- | Permissible submissions on the subreddit data ContentOptions AnyContent :: ContentOptions LinkOnly :: ContentOptions SelfOnly :: ContentOptions -- | Moderator mail. Reddit no longer supports the older, message-based -- interface for modmail newtype Modmail Modmail :: Seq ModmailConversation -> Modmail [$sel:conversations:Modmail] :: Modmail -> Seq ModmailConversation -- | A single modmail conversation data ModmailConversation ModmailConversation :: ModmailID -> Subject -> Seq ModmailMessage -> Integer -> SubredditName -> Maybe ModmailAuthor -> Seq ModmailObjID -> UTCTime -> Maybe UTCTime -> Maybe UTCTime -> Bool -> Bool -> ModmailConversation [$sel:modmailID:ModmailConversation] :: ModmailConversation -> ModmailID [$sel:subject:ModmailConversation] :: ModmailConversation -> Subject -- | This field may be empty, depending on how the -- ModmailConversation was obtained. When parsed as part of a -- Modmail or ConversationDetails, the messages will be -- present [$sel:messages:ModmailConversation] :: ModmailConversation -> Seq ModmailMessage [$sel:numMessages:ModmailConversation] :: ModmailConversation -> Integer [$sel:subreddit:ModmailConversation] :: ModmailConversation -> SubredditName -- | The non-mod user participating in the conversation [$sel:participant:ModmailConversation] :: ModmailConversation -> Maybe ModmailAuthor [$sel:objIDs:ModmailConversation] :: ModmailConversation -> Seq ModmailObjID [$sel:lastUpdated:ModmailConversation] :: ModmailConversation -> UTCTime [$sel:lastUserUpdate:ModmailConversation] :: ModmailConversation -> Maybe UTCTime [$sel:lastModUpdate:ModmailConversation] :: ModmailConversation -> Maybe UTCTime [$sel:isHighlighted:ModmailConversation] :: ModmailConversation -> Bool [$sel:isInternal:ModmailConversation] :: ModmailConversation -> Bool -- | A single message in a ModmailConversation data ModmailMessage ModmailMessage :: Text -> ModmailAuthor -> Body -> Body -> UTCTime -> Bool -> ModmailMessage [$sel:modmailMessageID:ModmailMessage] :: ModmailMessage -> Text [$sel:author:ModmailMessage] :: ModmailMessage -> ModmailAuthor [$sel:body:ModmailMessage] :: ModmailMessage -> Body [$sel:bodyHTML:ModmailMessage] :: ModmailMessage -> Body [$sel:date:ModmailMessage] :: ModmailMessage -> UTCTime [$sel:isInternal:ModmailMessage] :: ModmailMessage -> Bool -- | The ID of a particular modmail conversation type ModmailID = Text data BulkReadIDs -- | An author in a ModmailConversation; can be either a mod or a -- non-mod user data ModmailAuthor ModmailAuthor :: Username -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> ModmailAuthor [$sel:name:ModmailAuthor] :: ModmailAuthor -> Username [$sel:isAdmin:ModmailAuthor] :: ModmailAuthor -> Bool [$sel:isDeleted:ModmailAuthor] :: ModmailAuthor -> Bool [$sel:isHidden:ModmailAuthor] :: ModmailAuthor -> Bool [$sel:isMod:ModmailAuthor] :: ModmailAuthor -> Bool [$sel:isOP:ModmailAuthor] :: ModmailAuthor -> Bool [$sel:isParticipant:ModmailAuthor] :: ModmailAuthor -> Bool -- | A mapping to a modmail action to its ID data ModmailObjID ModmailObjID :: Text -> Text -> ModmailObjID [$sel:objID:ModmailObjID] :: ModmailObjID -> Text [$sel:key:ModmailObjID] :: ModmailObjID -> Text -- | The state of the modmail, for use when filtering mail data ModmailState AllModmail :: ModmailState NewModmail :: ModmailState Appeals :: ModmailState Notifications :: ModmailState Inbox :: ModmailState InProgress :: ModmailState ArchivedMail :: ModmailState Highlighted :: ModmailState JoinRequests :: ModmailState ModModmail :: ModmailState -- | Order to sort modmail in data ModmailSort FromUser :: ModmailSort FromMod :: ModmailSort RecentMail :: ModmailSort UnreadMail :: ModmailSort -- | Options for filtering/paginating modmail endpoints. Notably, this is -- an entirely different mechanism than the usual Listings -- elsewhere on Reddit data ModmailOpts ModmailOpts :: Maybe ModmailID -> Maybe [SubredditName] -> Maybe Word -> Maybe ModmailSort -> Maybe ModmailState -> ModmailOpts [$sel:after:ModmailOpts] :: ModmailOpts -> Maybe ModmailID [$sel:subreddits:ModmailOpts] :: ModmailOpts -> Maybe [SubredditName] -- | Should be between 0 and 100. The implicit API default is 25 [$sel:limit:ModmailOpts] :: ModmailOpts -> Maybe Word [$sel:itemSort:ModmailOpts] :: ModmailOpts -> Maybe ModmailSort [$sel:state:ModmailOpts] :: ModmailOpts -> Maybe ModmailState -- | Default options for filtering modmail defaultModmailOpts :: ModmailOpts -- | Wrapper for parsing the JSON returned from the conversation details -- API endpoint. This is formatted differently and has different fields -- than the modmail overview endpoint data ConversationDetails -- | A new reply to a ModmailConversation data ModmailReply ModmailReply :: Body -> Bool -> Bool -> ModmailReply -- | Markdown-formatted body [$sel:body:ModmailReply] :: ModmailReply -> Body -- | Hides the identity of the reply author from non-mods [$sel:isAuthorHidden:ModmailReply] :: ModmailReply -> Bool -- | Indicates that this is a private moderator note, and thus hides it -- from non-mod users [$sel:isInternal:ModmailReply] :: ModmailReply -> Bool -- | ModmailReply with default values for boolean fields mkModmailReply :: Body -> ModmailReply -- | A new, mod-created modmail conversation data NewConversation NewConversation :: Body -> Subject -> Username -> SubredditName -> Bool -> NewConversation -- | Must not be empty [$sel:body:NewConversation] :: NewConversation -> Body -- | Must not be empty, and should be less than 100 characters [$sel:subject:NewConversation] :: NewConversation -> Subject -- | The intended recipient of the message [$sel:dest:NewConversation] :: NewConversation -> Username [$sel:subreddit:NewConversation] :: NewConversation -> SubredditName -- | Hides the identity of the reply author from non-mods [$sel:isAuthorHidden:NewConversation] :: NewConversation -> Bool -- | An action issued by a moderator. The various fields prefixed -- target can refer to comments or submissions, where applicable data ModAction ModAction :: ModActionID -> Username -> ModActionType -> UTCTime -> Maybe Body -> Maybe Text -> Maybe ItemID -> Maybe Username -> Maybe Title -> Maybe URL -> ModAction [$sel:modActionID:ModAction] :: ModAction -> ModActionID [$sel:moderator:ModAction] :: ModAction -> Username [$sel:action:ModAction] :: ModAction -> ModActionType [$sel:created:ModAction] :: ModAction -> UTCTime [$sel:description:ModAction] :: ModAction -> Maybe Body [$sel:details:ModAction] :: ModAction -> Maybe Text [$sel:targetID:ModAction] :: ModAction -> Maybe ItemID [$sel:targetAuthor:ModAction] :: ModAction -> Maybe Username [$sel:targetTitle:ModAction] :: ModAction -> Maybe Title [$sel:targetPermalink:ModAction] :: ModAction -> Maybe URL -- | Identifier for an issued ModAction data ModActionID -- | Classification for ModActions data ModActionType BanUser :: ModActionType UnbanUser :: ModActionType SpamLink :: ModActionType RemoveLink :: ModActionType ApproveLink :: ModActionType SpamComment :: ModActionType RemoveComment :: ModActionType ApproveComment :: ModActionType AddModerator :: ModActionType ShowComment :: ModActionType InviteModerator :: ModActionType UninviteModerator :: ModActionType AcceptModeratorInvite :: ModActionType RemoveModerator :: ModActionType AddContributor :: ModActionType RemoveContributor :: ModActionType EditSettings :: ModActionType EditFlair :: ModActionType Distinguish :: ModActionType MarkNSFW :: ModActionType WikiBanned :: ModActionType WikiContrib :: ModActionType WikiUnbanned :: ModActionType WikiPageListed :: ModActionType RemoveWikiContributor :: ModActionType WikiRevise :: ModActionType WikiPermLevel :: ModActionType IgnoreReports :: ModActionType UnignoreReports :: ModActionType SetPermissions :: ModActionType SetSuggestedSort :: ModActionType Sticky :: ModActionType Unsticky :: ModActionType SetContestMode :: ModActionType UnsetContestMode :: ModActionType Lock :: ModActionType Unlock :: ModActionType MuteUser :: ModActionType UnmuteUser :: ModActionType CreateRule :: ModActionType EditRule :: ModActionType ReorderRules :: ModActionType DeleteRule :: ModActionType Spoiler :: ModActionType Unspoiler :: ModActionType MarkOriginalContent :: ModActionType Collections :: ModActionType Events :: ModActionType DeleteOverriddenClassification :: ModActionType OverrideClassification :: ModActionType ReorderModerators :: ModActionType SnoozeReports :: ModActionType UnsnoozeReports :: ModActionType OtherModAction :: ModActionType -- | Options for filtering/paginating Listings of ModActions data ModActionOpts ModActionOpts :: Maybe ModActionType -> Maybe Username -> ModActionOpts -- | Limits the returned Listing to only this type of action [$sel:action:ModActionOpts] :: ModActionOpts -> Maybe ModActionType -- | Limits the returned Listing to only those issued by this -- moderator [$sel:moderator:ModActionOpts] :: ModActionOpts -> Maybe Username -- | The CSS stylesheet and images for a subreddit data Stylesheet Stylesheet :: Text -> Seq SubredditImage -> SubredditID -> Stylesheet [$sel:stylesheet:Stylesheet] :: Stylesheet -> Text [$sel:images:Stylesheet] :: Stylesheet -> Seq SubredditImage [$sel:subredditID:Stylesheet] :: Stylesheet -> SubredditID -- | An image belonging to a Stylesheet data SubredditImage SubredditImage :: Name -> Text -> URL -> SubredditImage [$sel:name:SubredditImage] :: SubredditImage -> Name -- | CSS link [$sel:link:SubredditImage] :: SubredditImage -> Text [$sel:url:SubredditImage] :: SubredditImage -> URL -- | Used to upload style assets and images to Reddit's servers with -- moderator privileges data S3ModerationLease S3ModerationLease :: URL -> HashMap Text Text -> Text -> URL -> S3ModerationLease [$sel:action:S3ModerationLease] :: S3ModerationLease -> URL -- | S3 metadata and headers [$sel:fields:S3ModerationLease] :: S3ModerationLease -> HashMap Text Text -- | This is required to get the final upload URL [$sel:key:S3ModerationLease] :: S3ModerationLease -> Text [$sel:websocketURL:S3ModerationLease] :: S3ModerationLease -> URL -- | Represents one of the style images that may be uploaded data StructuredStyleImage BannerBackground :: StructuredStyleImage BannerAdditional :: StructuredStyleImage BannerHover :: StructuredStyleImage -- | Alignment for certain StructuredStyleImages data StyleImageAlignment LeftAligned :: StyleImageAlignment CenterAligned :: StyleImageAlignment RightAligned :: StyleImageAlignment -- | An individual statistic for a subreddit's traffic data TrafficStat TrafficStat :: UTCTime -> Integer -> Integer -> Maybe Integer -> TrafficStat [$sel:timestamp:TrafficStat] :: TrafficStat -> UTCTime [$sel:uniqueViews:TrafficStat] :: TrafficStat -> Integer [$sel:totalViews:TrafficStat] :: TrafficStat -> Integer -- | This statistic is only available in the day and -- month fields of a Traffic [$sel:subscribers:TrafficStat] :: TrafficStat -> Maybe Integer -- | Traffic statistics for a given subreddit data Traffic Traffic :: Seq TrafficStat -> Seq TrafficStat -> Seq TrafficStat -> Traffic -- | Does not contain subscriber information [$sel:hour:Traffic] :: Traffic -> Seq TrafficStat [$sel:day:Traffic] :: Traffic -> Seq TrafficStat [$sel:month:Traffic] :: Traffic -> Seq TrafficStat -- | The language in which the subreddit is available, as configured in the -- SubredditSettings data LanguageCode pattern AF :: LanguageCode pattern AR :: LanguageCode pattern BE :: LanguageCode pattern BG :: LanguageCode pattern BS :: LanguageCode pattern CA :: LanguageCode pattern CS :: LanguageCode pattern CY :: LanguageCode pattern DA :: LanguageCode pattern DE :: LanguageCode pattern EL :: LanguageCode pattern EN :: LanguageCode pattern EO :: LanguageCode pattern ES :: LanguageCode pattern ET :: LanguageCode pattern EU :: LanguageCode pattern FA :: LanguageCode pattern FI :: LanguageCode pattern FR :: LanguageCode pattern GD :: LanguageCode pattern GL :: LanguageCode pattern HE :: LanguageCode pattern HI :: LanguageCode pattern HR :: LanguageCode pattern HU :: LanguageCode pattern HY :: LanguageCode pattern ID :: LanguageCode pattern IS :: LanguageCode pattern IT :: LanguageCode pattern JA :: LanguageCode pattern KO :: LanguageCode pattern LA :: LanguageCode pattern LT :: LanguageCode pattern LV :: LanguageCode pattern MS :: LanguageCode pattern NL :: LanguageCode pattern NN :: LanguageCode pattern NO :: LanguageCode pattern PL :: LanguageCode pattern PT :: LanguageCode pattern RO :: LanguageCode pattern RU :: LanguageCode pattern SK :: LanguageCode pattern SL :: LanguageCode pattern SR :: LanguageCode pattern SV :: LanguageCode pattern TA :: LanguageCode pattern TH :: LanguageCode pattern TR :: LanguageCode pattern UK :: LanguageCode pattern VI :: LanguageCode pattern ZH :: LanguageCode instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModItem instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModItem instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModItem instance GHC.Show.Show Network.Reddit.Types.Moderation.ModItem instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModItemOpts instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModItemOpts instance GHC.Show.Show Network.Reddit.Types.Moderation.ModItemOpts instance GHC.Generics.Generic Network.Reddit.Types.Moderation.RemovalType instance GHC.Classes.Eq Network.Reddit.Types.Moderation.RemovalType instance GHC.Show.Show Network.Reddit.Types.Moderation.RemovalType instance GHC.Generics.Generic Network.Reddit.Types.Moderation.RemovalMessage instance GHC.Classes.Eq Network.Reddit.Types.Moderation.RemovalMessage instance GHC.Show.Show Network.Reddit.Types.Moderation.RemovalMessage instance GHC.Generics.Generic Network.Reddit.Types.Moderation.RemovalReason instance GHC.Classes.Eq Network.Reddit.Types.Moderation.RemovalReason instance GHC.Show.Show Network.Reddit.Types.Moderation.RemovalReason instance GHC.Generics.Generic Network.Reddit.Types.Moderation.RemovalReasonList instance GHC.Show.Show Network.Reddit.Types.Moderation.RemovalReasonList instance GHC.Generics.Generic Network.Reddit.Types.Moderation.NewRemovalReasonID instance GHC.Show.Show Network.Reddit.Types.Moderation.NewRemovalReasonID instance GHC.Enum.Bounded Network.Reddit.Types.Moderation.ModPermission instance GHC.Enum.Enum Network.Reddit.Types.Moderation.ModPermission instance GHC.Classes.Ord Network.Reddit.Types.Moderation.ModPermission instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModPermission instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModPermission instance GHC.Show.Show Network.Reddit.Types.Moderation.ModPermission instance GHC.Generics.Generic Network.Reddit.Types.Moderation.SubredditRelationship instance GHC.Classes.Eq Network.Reddit.Types.Moderation.SubredditRelationship instance GHC.Show.Show Network.Reddit.Types.Moderation.SubredditRelationship instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModInvitee instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModInvitee instance GHC.Show.Show Network.Reddit.Types.Moderation.ModInvitee instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModInviteeList instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModInviteeList instance GHC.Show.Show Network.Reddit.Types.Moderation.ModInviteeList instance GHC.Generics.Generic Network.Reddit.Types.Moderation.RelInfoOpts instance GHC.Classes.Eq Network.Reddit.Types.Moderation.RelInfoOpts instance GHC.Show.Show Network.Reddit.Types.Moderation.RelInfoOpts instance GHC.Enum.Enum Network.Reddit.Types.Moderation.CrowdControlLevel instance GHC.Classes.Ord Network.Reddit.Types.Moderation.CrowdControlLevel instance GHC.Generics.Generic Network.Reddit.Types.Moderation.CrowdControlLevel instance GHC.Classes.Eq Network.Reddit.Types.Moderation.CrowdControlLevel instance GHC.Show.Show Network.Reddit.Types.Moderation.CrowdControlLevel instance GHC.Generics.Generic Network.Reddit.Types.Moderation.SubredditType instance GHC.Classes.Eq Network.Reddit.Types.Moderation.SubredditType instance GHC.Show.Show Network.Reddit.Types.Moderation.SubredditType instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ContentOptions instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ContentOptions instance GHC.Show.Show Network.Reddit.Types.Moderation.ContentOptions instance GHC.Generics.Generic Network.Reddit.Types.Moderation.SpamFilter instance GHC.Classes.Eq Network.Reddit.Types.Moderation.SpamFilter instance GHC.Show.Show Network.Reddit.Types.Moderation.SpamFilter instance GHC.Classes.Ord Network.Reddit.Types.Moderation.Wikimode instance GHC.Generics.Generic Network.Reddit.Types.Moderation.Wikimode instance GHC.Classes.Eq Network.Reddit.Types.Moderation.Wikimode instance GHC.Show.Show Network.Reddit.Types.Moderation.Wikimode instance GHC.Classes.Eq Network.Reddit.Types.Moderation.RelID instance GHC.Generics.Generic Network.Reddit.Types.Moderation.RelID instance GHC.Show.Show Network.Reddit.Types.Moderation.RelID instance GHC.Generics.Generic Network.Reddit.Types.Moderation.Ban instance GHC.Classes.Eq Network.Reddit.Types.Moderation.Ban instance GHC.Show.Show Network.Reddit.Types.Moderation.Ban instance GHC.Generics.Generic Network.Reddit.Types.Moderation.RelInfo instance GHC.Classes.Eq Network.Reddit.Types.Moderation.RelInfo instance GHC.Show.Show Network.Reddit.Types.Moderation.RelInfo instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModAccount instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModAccount instance GHC.Show.Show Network.Reddit.Types.Moderation.ModAccount instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModList instance GHC.Show.Show Network.Reddit.Types.Moderation.ModList instance GHC.Classes.Eq Network.Reddit.Types.Moderation.MuteID instance GHC.Generics.Generic Network.Reddit.Types.Moderation.MuteID instance GHC.Show.Show Network.Reddit.Types.Moderation.MuteID instance GHC.Generics.Generic Network.Reddit.Types.Moderation.MuteInfo instance GHC.Classes.Eq Network.Reddit.Types.Moderation.MuteInfo instance GHC.Show.Show Network.Reddit.Types.Moderation.MuteInfo instance GHC.Generics.Generic Network.Reddit.Types.Moderation.BanNotes instance GHC.Classes.Eq Network.Reddit.Types.Moderation.BanNotes instance GHC.Show.Show Network.Reddit.Types.Moderation.BanNotes instance GHC.Generics.Generic Network.Reddit.Types.Moderation.BulkReadIDs instance GHC.Show.Show Network.Reddit.Types.Moderation.BulkReadIDs instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModmailObjID instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModmailObjID instance GHC.Show.Show Network.Reddit.Types.Moderation.ModmailObjID instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModmailAuthor instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModmailAuthor instance GHC.Show.Show Network.Reddit.Types.Moderation.ModmailAuthor instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModmailMessage instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModmailMessage instance GHC.Show.Show Network.Reddit.Types.Moderation.ModmailMessage instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModmailConversation instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModmailConversation instance GHC.Show.Show Network.Reddit.Types.Moderation.ModmailConversation instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ConversationDetails instance GHC.Show.Show Network.Reddit.Types.Moderation.ConversationDetails instance GHC.Generics.Generic Network.Reddit.Types.Moderation.Modmail instance GHC.Classes.Eq Network.Reddit.Types.Moderation.Modmail instance GHC.Show.Show Network.Reddit.Types.Moderation.Modmail instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModmailSort instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModmailSort instance GHC.Show.Show Network.Reddit.Types.Moderation.ModmailSort instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModmailState instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModmailState instance GHC.Show.Show Network.Reddit.Types.Moderation.ModmailState instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModmailOpts instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModmailOpts instance GHC.Show.Show Network.Reddit.Types.Moderation.ModmailOpts instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModmailReply instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModmailReply instance GHC.Show.Show Network.Reddit.Types.Moderation.ModmailReply instance GHC.Generics.Generic Network.Reddit.Types.Moderation.NewConversation instance GHC.Classes.Eq Network.Reddit.Types.Moderation.NewConversation instance GHC.Show.Show Network.Reddit.Types.Moderation.NewConversation instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.ModActionID instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModActionID instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModActionID instance GHC.Show.Show Network.Reddit.Types.Moderation.ModActionID instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModActionType instance GHC.Classes.Ord Network.Reddit.Types.Moderation.ModActionType instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModActionType instance GHC.Show.Show Network.Reddit.Types.Moderation.ModActionType instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModActionOpts instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModActionOpts instance GHC.Show.Show Network.Reddit.Types.Moderation.ModActionOpts instance GHC.Generics.Generic Network.Reddit.Types.Moderation.ModAction instance GHC.Classes.Eq Network.Reddit.Types.Moderation.ModAction instance GHC.Show.Show Network.Reddit.Types.Moderation.ModAction instance GHC.Generics.Generic Network.Reddit.Types.Moderation.SubredditImage instance GHC.Classes.Eq Network.Reddit.Types.Moderation.SubredditImage instance GHC.Show.Show Network.Reddit.Types.Moderation.SubredditImage instance GHC.Generics.Generic Network.Reddit.Types.Moderation.Stylesheet instance GHC.Classes.Eq Network.Reddit.Types.Moderation.Stylesheet instance GHC.Show.Show Network.Reddit.Types.Moderation.Stylesheet instance GHC.Generics.Generic Network.Reddit.Types.Moderation.S3ModerationLease instance GHC.Classes.Eq Network.Reddit.Types.Moderation.S3ModerationLease instance GHC.Show.Show Network.Reddit.Types.Moderation.S3ModerationLease instance GHC.Generics.Generic Network.Reddit.Types.Moderation.StructuredStyleImage instance GHC.Classes.Eq Network.Reddit.Types.Moderation.StructuredStyleImage instance GHC.Show.Show Network.Reddit.Types.Moderation.StructuredStyleImage instance GHC.Generics.Generic Network.Reddit.Types.Moderation.StyleImageAlignment instance GHC.Classes.Eq Network.Reddit.Types.Moderation.StyleImageAlignment instance GHC.Show.Show Network.Reddit.Types.Moderation.StyleImageAlignment instance GHC.Generics.Generic Network.Reddit.Types.Moderation.TrafficStat instance GHC.Classes.Eq Network.Reddit.Types.Moderation.TrafficStat instance GHC.Show.Show Network.Reddit.Types.Moderation.TrafficStat instance GHC.Generics.Generic Network.Reddit.Types.Moderation.Traffic instance GHC.Classes.Eq Network.Reddit.Types.Moderation.Traffic instance GHC.Show.Show Network.Reddit.Types.Moderation.Traffic instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.LanguageCode instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.LanguageCode instance GHC.Classes.Eq Network.Reddit.Types.Moderation.LanguageCode instance GHC.Generics.Generic Network.Reddit.Types.Moderation.LanguageCode instance GHC.Show.Show Network.Reddit.Types.Moderation.LanguageCode instance GHC.Generics.Generic Network.Reddit.Types.Moderation.SubredditSettings instance GHC.Classes.Eq Network.Reddit.Types.Moderation.SubredditSettings instance GHC.Show.Show Network.Reddit.Types.Moderation.SubredditSettings instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.SubredditSettings instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Moderation.SubredditSettings instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.Traffic instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.TrafficStat instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.StyleImageAlignment instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.StructuredStyleImage instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.S3ModerationLease instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.Stylesheet instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.SubredditImage instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModAction instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Moderation.ModAction instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModActionType instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.ModActionType instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModActionID instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Moderation.ModActionID instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Moderation.NewConversation instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Moderation.ModmailReply instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Moderation.ModmailOpts instance Data.Hashable.Class.Hashable Network.Reddit.Types.Moderation.ModmailState instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.ModmailState instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModmailState instance Data.Aeson.Types.FromJSON.FromJSONKey Network.Reddit.Types.Moderation.ModmailState instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.ModmailSort instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.Modmail instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ConversationDetails instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModmailConversation instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModmailMessage instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModmailAuthor instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModmailObjID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.BulkReadIDs instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Moderation.BanNotes instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.MuteInfo instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Moderation.MuteInfo instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.MuteID instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Moderation.MuteID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModAccount instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.RelInfo instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Moderation.RelInfo instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.Ban instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Moderation.Ban instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.RelID instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Moderation.RelID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.Wikimode instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.Wikimode instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.SpamFilter instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.SpamFilter instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ContentOptions instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.ContentOptions instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.SubredditType instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.SubredditType instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.CrowdControlLevel instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.CrowdControlLevel instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Moderation.RelInfoOpts instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModInviteeList instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Moderation.ModInviteeList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModInvitee instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.SubredditRelationship instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.ModPermission instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.ModPermission instance Data.Aeson.Types.FromJSON.FromJSONKey Network.Reddit.Types.Moderation.ModPermission instance Data.Hashable.Class.Hashable Network.Reddit.Types.Moderation.ModPermission instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.NewRemovalReasonID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.RemovalReasonList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Moderation.RemovalReason instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Moderation.RemovalReason instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Moderation.RemovalMessage instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Moderation.RemovalType instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Moderation.ModItem instance Web.Internal.FormUrlEncoded.ToForm Network.Reddit.Types.Moderation.ModItemOpts module Network.Reddit.Types.Widget -- | An organized collection of a subreddit's widgets data SubredditWidgets SubredditWidgets :: IDCardWidget -> ModeratorsWidget -> Seq Widget -> Seq Widget -> Seq WidgetID -> Seq WidgetID -> SubredditWidgets [$sel:idCard:SubredditWidgets] :: SubredditWidgets -> IDCardWidget [$sel:moderators:SubredditWidgets] :: SubredditWidgets -> ModeratorsWidget [$sel:topbar:SubredditWidgets] :: SubredditWidgets -> Seq Widget [$sel:sidebar:SubredditWidgets] :: SubredditWidgets -> Seq Widget [$sel:topbarOrder:SubredditWidgets] :: SubredditWidgets -> Seq WidgetID [$sel:sidebarOrder:SubredditWidgets] :: SubredditWidgets -> Seq WidgetID -- | Represents one of various kinds of widgets data Widget Buttons :: ButtonWidget -> Widget Calendar :: CalendarWidget -> Widget CommunityList :: CommunityListWidget -> Widget Custom :: CustomWidget -> Widget IDCard :: IDCardWidget -> Widget Images :: ImageWidget -> Widget Moderators :: ModeratorsWidget -> Widget Menu :: MenuWidget -> Widget PostFlair :: PostFlairWidget -> Widget Rules :: RulesWidget -> Widget TextArea :: TextAreaWidget -> Widget -- | A widget ID. These are usually prefixed with the type of widget it -- corresponds to, e.g. rules-2qh1i for a RulesWidget newtype WidgetID WidgetID :: Text -> WidgetID -- | The section in which certain Widgets appear data WidgetSection Topbar :: WidgetSection Sidebar :: WidgetSection -- | A "short name" for any widget. This name must be less than 30 -- characters long data ShortName -- | Smart constructor for ShortNames, which must be <= 30 -- characters long mkShortName :: MonadThrow m => Text -> m ShortName -- | Wrapper to parse a HashMap WidgetID Widget, discarding the ID -- keys data WidgetList -- | Style options for an individual widget data WidgetStyles WidgetStyles :: Maybe RGBText -> Maybe RGBText -> WidgetStyles [$sel:backgroundColor:WidgetStyles] :: WidgetStyles -> Maybe RGBText [$sel:headerColor:WidgetStyles] :: WidgetStyles -> Maybe RGBText -- | A widget containing buttons data ButtonWidget ButtonWidget :: Maybe WidgetID -> ShortName -> Seq Button -> Body -> Maybe Body -> Maybe WidgetStyles -> ButtonWidget [$sel:widgetID:ButtonWidget] :: ButtonWidget -> Maybe WidgetID [$sel:shortName:ButtonWidget] :: ButtonWidget -> ShortName [$sel:buttons:ButtonWidget] :: ButtonWidget -> Seq Button [$sel:description:ButtonWidget] :: ButtonWidget -> Body [$sel:descriptionHTML:ButtonWidget] :: ButtonWidget -> Maybe Body [$sel:styles:ButtonWidget] :: ButtonWidget -> Maybe WidgetStyles -- | An individual button in a ButtonWidget data Button ImageButton :: ButtonImage -> Button TextButton :: ButtonText -> Button -- | Data for an ImageButton data ButtonImage ButtonImage :: ShortName -> UploadURL -> URL -> Int -> Int -> Maybe ButtonHover -> ButtonImage [$sel:text:ButtonImage] :: ButtonImage -> ShortName [$sel:url:ButtonImage] :: ButtonImage -> UploadURL [$sel:linkURL:ButtonImage] :: ButtonImage -> URL [$sel:height:ButtonImage] :: ButtonImage -> Int [$sel:width:ButtonImage] :: ButtonImage -> Int [$sel:hoverState:ButtonImage] :: ButtonImage -> Maybe ButtonHover -- | Data for a TextButton data ButtonText ButtonText :: ShortName -> URL -> RGBText -> Maybe RGBText -> Maybe RGBText -> Maybe ButtonHover -> ButtonText [$sel:text:ButtonText] :: ButtonText -> ShortName [$sel:url:ButtonText] :: ButtonText -> URL [$sel:color:ButtonText] :: ButtonText -> RGBText [$sel:fillColor:ButtonText] :: ButtonText -> Maybe RGBText [$sel:textColor:ButtonText] :: ButtonText -> Maybe RGBText [$sel:hoverState:ButtonText] :: ButtonText -> Maybe ButtonHover -- | The state of the Button when hovering over it data ButtonHover ImageButtonHover :: ImageHover -> ButtonHover TextButtonHover :: TextHover -> ButtonHover -- | The state of an ImageButton when hovering over it data ImageHover ImageHover :: UploadURL -> Maybe Integer -> Maybe Integer -> ImageHover [$sel:url:ImageHover] :: ImageHover -> UploadURL [$sel:height:ImageHover] :: ImageHover -> Maybe Integer [$sel:width:ImageHover] :: ImageHover -> Maybe Integer -- | The state of a TextButton when hovering over it data TextHover TextHover :: ShortName -> Maybe RGBText -> Maybe RGBText -> Maybe RGBText -> TextHover [$sel:text:TextHover] :: TextHover -> ShortName [$sel:color:TextHover] :: TextHover -> Maybe RGBText [$sel:fillColor:TextHover] :: TextHover -> Maybe RGBText [$sel:textColor:TextHover] :: TextHover -> Maybe RGBText -- | A widget representing a calendar data CalendarWidget CalendarWidget :: Maybe WidgetID -> ShortName -> Text -> CalendarConfig -> Bool -> Maybe WidgetStyles -> CalendarWidget [$sel:widgetID:CalendarWidget] :: CalendarWidget -> Maybe WidgetID [$sel:shortName:CalendarWidget] :: CalendarWidget -> ShortName [$sel:googleCalendarID:CalendarWidget] :: CalendarWidget -> Text [$sel:configuration:CalendarWidget] :: CalendarWidget -> CalendarConfig [$sel:requiresSync:CalendarWidget] :: CalendarWidget -> Bool [$sel:styles:CalendarWidget] :: CalendarWidget -> Maybe WidgetStyles -- | Configuration options for a CalendarWidget data CalendarConfig CalendarConfig :: Word -> Bool -> Bool -> Bool -> Bool -> Bool -> CalendarConfig -- | Between 1 and 50, defaulting to 10 [$sel:numEvents:CalendarConfig] :: CalendarConfig -> Word [$sel:showDate:CalendarConfig] :: CalendarConfig -> Bool [$sel:showDescription:CalendarConfig] :: CalendarConfig -> Bool [$sel:showLocation:CalendarConfig] :: CalendarConfig -> Bool [$sel:showTime:CalendarConfig] :: CalendarConfig -> Bool [$sel:showTitle:CalendarConfig] :: CalendarConfig -> Bool -- | A calendar config with default values defaultCalendarConfig :: CalendarConfig -- | A widget listing related subreddits data CommunityListWidget CommunityListWidget :: Maybe WidgetID -> ShortName -> Seq CommunityInfo -> Maybe WidgetStyles -> CommunityListWidget [$sel:widgetID:CommunityListWidget] :: CommunityListWidget -> Maybe WidgetID [$sel:shortName:CommunityListWidget] :: CommunityListWidget -> ShortName [$sel:communities:CommunityListWidget] :: CommunityListWidget -> Seq CommunityInfo [$sel:styles:CommunityListWidget] :: CommunityListWidget -> Maybe WidgetStyles -- | Information about a single subreddit in a CommunityListWidget. -- When creating a new widget, only the name field will be -- serialized data CommunityInfo CommunityInfo :: SubredditName -> Maybe Integer -> Maybe RGBText -> Maybe URL -> Maybe URL -> Maybe Bool -> Maybe Bool -> CommunityInfo [$sel:name:CommunityInfo] :: CommunityInfo -> SubredditName [$sel:subscribers:CommunityInfo] :: CommunityInfo -> Maybe Integer [$sel:primaryColor:CommunityInfo] :: CommunityInfo -> Maybe RGBText [$sel:iconURL:CommunityInfo] :: CommunityInfo -> Maybe URL [$sel:communityIcon:CommunityInfo] :: CommunityInfo -> Maybe URL -- | If the authenticated user is subscribed to the subreddit [$sel:isSubscribed:CommunityInfo] :: CommunityInfo -> Maybe Bool [$sel:isNSFW:CommunityInfo] :: CommunityInfo -> Maybe Bool -- | Convenience function for creating a new CommunityInfo, where -- all but one of the fields should be Nothing mkCommunityInfo :: SubredditName -> CommunityInfo -- | A custom widget data CustomWidget CustomWidget :: Maybe WidgetID -> ShortName -> Body -> Seq ImageData -> Int -> Maybe Body -> Maybe Text -> Maybe URL -> Maybe WidgetStyles -> CustomWidget [$sel:widgetID:CustomWidget] :: CustomWidget -> Maybe WidgetID [$sel:shortName:CustomWidget] :: CustomWidget -> ShortName [$sel:text:CustomWidget] :: CustomWidget -> Body [$sel:imageData:CustomWidget] :: CustomWidget -> Seq ImageData -- | Should be between 50 and 500 [$sel:height:CustomWidget] :: CustomWidget -> Int -- | Should be Nothing when creating a new widget [$sel:textHTML:CustomWidget] :: CustomWidget -> Maybe Body [$sel:css:CustomWidget] :: CustomWidget -> Maybe Text [$sel:stylesheetURL:CustomWidget] :: CustomWidget -> Maybe URL [$sel:styles:CustomWidget] :: CustomWidget -> Maybe WidgetStyles -- | Image data that belongs to a CustomWidget data ImageData ImageData :: Name -> Int -> Int -> UploadURL -> ImageData [$sel:name:ImageData] :: ImageData -> Name [$sel:height:ImageData] :: ImageData -> Int [$sel:width:ImageData] :: ImageData -> Int -- | This url must point to an image hosted by Reddit [$sel:url:ImageData] :: ImageData -> UploadURL -- | An ID card displaying information about the subreddit data IDCardWidget IDCardWidget :: Maybe WidgetID -> ShortName -> Body -> Text -> Text -> Maybe Integer -> Maybe Integer -> Maybe WidgetStyles -> IDCardWidget [$sel:widgetID:IDCardWidget] :: IDCardWidget -> Maybe WidgetID [$sel:shortName:IDCardWidget] :: IDCardWidget -> ShortName [$sel:description:IDCardWidget] :: IDCardWidget -> Body [$sel:subscribersText:IDCardWidget] :: IDCardWidget -> Text [$sel:currentlyViewingText:IDCardWidget] :: IDCardWidget -> Text [$sel:subscribersCount:IDCardWidget] :: IDCardWidget -> Maybe Integer [$sel:currentlyViewingCount:IDCardWidget] :: IDCardWidget -> Maybe Integer [$sel:styles:IDCardWidget] :: IDCardWidget -> Maybe WidgetStyles -- | A widget composed of various Images data ImageWidget ImageWidget :: Maybe WidgetID -> ShortName -> Seq Image -> Maybe WidgetStyles -> ImageWidget [$sel:widgetID:ImageWidget] :: ImageWidget -> Maybe WidgetID [$sel:shortName:ImageWidget] :: ImageWidget -> ShortName [$sel:images:ImageWidget] :: ImageWidget -> Seq Image [$sel:styles:ImageWidget] :: ImageWidget -> Maybe WidgetStyles -- | An individual image in an ImageWidget data Image Image :: Integer -> Integer -> UploadURL -> Maybe URL -> Image [$sel:width:Image] :: Image -> Integer [$sel:height:Image] :: Image -> Integer -- | The reddit-hosted image URL [$sel:url:Image] :: Image -> UploadURL -- | The link that is followed when clicking on the image [$sel:linkURL:Image] :: Image -> Maybe URL -- | A widget representing a menu data MenuWidget MenuWidget :: Maybe WidgetID -> Seq MenuChild -> MenuWidget [$sel:widgetID:MenuWidget] :: MenuWidget -> Maybe WidgetID [$sel:children:MenuWidget] :: MenuWidget -> Seq MenuChild -- | A child widget in a MenuWidget data MenuChild SubmenuChild :: Submenu -> MenuChild MenuLinkChild :: MenuLink -> MenuChild -- | A link in a MenuWidget or Submenu data MenuLink MenuLink :: Text -> URL -> MenuLink [$sel:text:MenuLink] :: MenuLink -> Text [$sel:url:MenuLink] :: MenuLink -> URL -- | A submenu child in a MenuWidget which contains MenuLinks data Submenu Submenu :: Seq MenuLink -> Text -> Submenu [$sel:children:Submenu] :: Submenu -> Seq MenuLink [$sel:text:Submenu] :: Submenu -> Text -- | A widget listing the moderators of the subreddit. This widget cannot -- be created. It can be updated by modifying the styles field -- only data ModeratorsWidget ModeratorsWidget :: Maybe WidgetID -> Seq ModInfo -> Maybe Int -> Maybe WidgetStyles -> ModeratorsWidget [$sel:widgetID:ModeratorsWidget] :: ModeratorsWidget -> Maybe WidgetID [$sel:mods:ModeratorsWidget] :: ModeratorsWidget -> Seq ModInfo [$sel:totalMods:ModeratorsWidget] :: ModeratorsWidget -> Maybe Int [$sel:styles:ModeratorsWidget] :: ModeratorsWidget -> Maybe WidgetStyles -- | Information about a moderator as displayed in a -- ModeratorsWidget data ModInfo ModInfo :: Username -> Maybe FlairText -> Maybe ForegroundColor -> Maybe RGBText -> ModInfo [$sel:name:ModInfo] :: ModInfo -> Username [$sel:flairText:ModInfo] :: ModInfo -> Maybe FlairText [$sel:flairTextColor:ModInfo] :: ModInfo -> Maybe ForegroundColor [$sel:flairBackgroundColor:ModInfo] :: ModInfo -> Maybe RGBText -- | A widget listing flair choices for submissions. When creating a new -- widget, the FlairIDs in the order field must be valid -- template IDs for the given subreddit. Existing flair templates can be -- obtained with getSubmissionFlairTemplates, which can then be -- mapped over to obtain the IDs. Once the flair IDs have been obtained, -- mkPostFlairWidget can be used to construct a widget with -- default values for most fields data PostFlairWidget PostFlairWidget :: Maybe WidgetID -> ShortName -> Seq FlairID -> HashMap FlairID PostFlairInfo -> PostFlairWidgetDisplay -> Maybe WidgetStyles -> PostFlairWidget [$sel:widgetID:PostFlairWidget] :: PostFlairWidget -> Maybe WidgetID [$sel:shortName:PostFlairWidget] :: PostFlairWidget -> ShortName -- | A container of FlairIDs corresponding to the flair templates -- listed in the widget. Use this field when updating or creating -- PostFlairWidgets [$sel:order:PostFlairWidget] :: PostFlairWidget -> Seq FlairID -- | A mapping of submission flair template IDs to brief information on -- each one. This field is not serialized when creating a new -- PostFlairWidget or when updating an existing one, and can be -- left empty in those cases [$sel:templates:PostFlairWidget] :: PostFlairWidget -> HashMap FlairID PostFlairInfo [$sel:display:PostFlairWidget] :: PostFlairWidget -> PostFlairWidgetDisplay [$sel:styles:PostFlairWidget] :: PostFlairWidget -> Maybe WidgetStyles -- | Make a new PostFlairWidget with default values for most fields mkPostFlairWidget :: ShortName -> Seq FlairID -> PostFlairWidget -- | Information about submission flair templates in a -- PostFlairWidget data PostFlairInfo PostFlairInfo :: FlairID -> Text -> ForegroundColor -> RGBText -> PostFlairInfo [$sel:templateID:PostFlairInfo] :: PostFlairInfo -> FlairID [$sel:text:PostFlairInfo] :: PostFlairInfo -> Text [$sel:textColor:PostFlairInfo] :: PostFlairInfo -> ForegroundColor [$sel:backgroundColor:PostFlairInfo] :: PostFlairInfo -> RGBText -- | The display orientation for PostFlairWidgets data PostFlairWidgetDisplay CloudDisplay :: PostFlairWidgetDisplay ListDisplay :: PostFlairWidgetDisplay -- | A widget listing subreddit SubredditRules. The rules -- field cannot be updated through widget endpoints, and are excluded -- during serialization data RulesWidget RulesWidget :: Maybe WidgetID -> ShortName -> Seq SubredditRule -> RulesDisplay -> Maybe WidgetStyles -> RulesWidget [$sel:widgetID:RulesWidget] :: RulesWidget -> Maybe WidgetID [$sel:shortName:RulesWidget] :: RulesWidget -> ShortName [$sel:rules:RulesWidget] :: RulesWidget -> Seq SubredditRule [$sel:display:RulesWidget] :: RulesWidget -> RulesDisplay [$sel:styles:RulesWidget] :: RulesWidget -> Maybe WidgetStyles -- | Display style for a RulesWidget data RulesDisplay FullDisplay :: RulesDisplay CompactDisplay :: RulesDisplay -- | A widget composed of text. See mkTextAreaWidget for -- constructing a new widget data TextAreaWidget TextAreaWidget :: Maybe WidgetID -> ShortName -> Body -> Maybe Body -> Maybe WidgetStyles -> TextAreaWidget [$sel:widgetID:TextAreaWidget] :: TextAreaWidget -> Maybe WidgetID [$sel:shortName:TextAreaWidget] :: TextAreaWidget -> ShortName -- | Markdown-formatted [$sel:text:TextAreaWidget] :: TextAreaWidget -> Body -- | This is present in existing widgets, but should be left blank when -- creating a new one [$sel:textHTML:TextAreaWidget] :: TextAreaWidget -> Maybe Body [$sel:styles:TextAreaWidget] :: TextAreaWidget -> Maybe WidgetStyles -- | Create a new TextAreaWidget, with default values for most -- fields mkTextAreaWidget :: ShortName -> Body -> TextAreaWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.WidgetID instance GHC.Generics.Generic Network.Reddit.Types.Widget.WidgetID instance GHC.Show.Show Network.Reddit.Types.Widget.WidgetID instance GHC.Generics.Generic Network.Reddit.Types.Widget.WidgetSection instance GHC.Classes.Eq Network.Reddit.Types.Widget.WidgetSection instance GHC.Show.Show Network.Reddit.Types.Widget.WidgetSection instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.ShortName instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.ShortName instance GHC.Classes.Eq Network.Reddit.Types.Widget.ShortName instance GHC.Generics.Generic Network.Reddit.Types.Widget.ShortName instance GHC.Show.Show Network.Reddit.Types.Widget.ShortName instance GHC.Generics.Generic Network.Reddit.Types.Widget.WidgetStyles instance GHC.Classes.Eq Network.Reddit.Types.Widget.WidgetStyles instance GHC.Show.Show Network.Reddit.Types.Widget.WidgetStyles instance GHC.Generics.Generic Network.Reddit.Types.Widget.ImageHover instance GHC.Classes.Eq Network.Reddit.Types.Widget.ImageHover instance GHC.Show.Show Network.Reddit.Types.Widget.ImageHover instance GHC.Generics.Generic Network.Reddit.Types.Widget.TextHover instance GHC.Classes.Eq Network.Reddit.Types.Widget.TextHover instance GHC.Show.Show Network.Reddit.Types.Widget.TextHover instance GHC.Generics.Generic Network.Reddit.Types.Widget.ButtonHover instance GHC.Classes.Eq Network.Reddit.Types.Widget.ButtonHover instance GHC.Show.Show Network.Reddit.Types.Widget.ButtonHover instance GHC.Generics.Generic Network.Reddit.Types.Widget.ButtonText instance GHC.Classes.Eq Network.Reddit.Types.Widget.ButtonText instance GHC.Show.Show Network.Reddit.Types.Widget.ButtonText instance GHC.Generics.Generic Network.Reddit.Types.Widget.ButtonImage instance GHC.Classes.Eq Network.Reddit.Types.Widget.ButtonImage instance GHC.Show.Show Network.Reddit.Types.Widget.ButtonImage instance GHC.Generics.Generic Network.Reddit.Types.Widget.Button instance GHC.Classes.Eq Network.Reddit.Types.Widget.Button instance GHC.Show.Show Network.Reddit.Types.Widget.Button instance GHC.Generics.Generic Network.Reddit.Types.Widget.ButtonWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.ButtonWidget instance GHC.Show.Show Network.Reddit.Types.Widget.ButtonWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.CalendarConfig instance GHC.Classes.Eq Network.Reddit.Types.Widget.CalendarConfig instance GHC.Show.Show Network.Reddit.Types.Widget.CalendarConfig instance GHC.Generics.Generic Network.Reddit.Types.Widget.CalendarWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.CalendarWidget instance GHC.Show.Show Network.Reddit.Types.Widget.CalendarWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.CommunityInfo instance GHC.Classes.Eq Network.Reddit.Types.Widget.CommunityInfo instance GHC.Show.Show Network.Reddit.Types.Widget.CommunityInfo instance GHC.Generics.Generic Network.Reddit.Types.Widget.CommunityListWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.CommunityListWidget instance GHC.Show.Show Network.Reddit.Types.Widget.CommunityListWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.ImageData instance GHC.Classes.Eq Network.Reddit.Types.Widget.ImageData instance GHC.Show.Show Network.Reddit.Types.Widget.ImageData instance GHC.Generics.Generic Network.Reddit.Types.Widget.CustomWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.CustomWidget instance GHC.Show.Show Network.Reddit.Types.Widget.CustomWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.IDCardWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.IDCardWidget instance GHC.Show.Show Network.Reddit.Types.Widget.IDCardWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.Image instance GHC.Classes.Eq Network.Reddit.Types.Widget.Image instance GHC.Show.Show Network.Reddit.Types.Widget.Image instance GHC.Generics.Generic Network.Reddit.Types.Widget.ImageWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.ImageWidget instance GHC.Show.Show Network.Reddit.Types.Widget.ImageWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.MenuLink instance GHC.Classes.Eq Network.Reddit.Types.Widget.MenuLink instance GHC.Show.Show Network.Reddit.Types.Widget.MenuLink instance GHC.Generics.Generic Network.Reddit.Types.Widget.Submenu instance GHC.Classes.Eq Network.Reddit.Types.Widget.Submenu instance GHC.Show.Show Network.Reddit.Types.Widget.Submenu instance GHC.Generics.Generic Network.Reddit.Types.Widget.MenuChild instance GHC.Classes.Eq Network.Reddit.Types.Widget.MenuChild instance GHC.Show.Show Network.Reddit.Types.Widget.MenuChild instance GHC.Generics.Generic Network.Reddit.Types.Widget.MenuWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.MenuWidget instance GHC.Show.Show Network.Reddit.Types.Widget.MenuWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.ModInfo instance GHC.Classes.Eq Network.Reddit.Types.Widget.ModInfo instance GHC.Show.Show Network.Reddit.Types.Widget.ModInfo instance GHC.Generics.Generic Network.Reddit.Types.Widget.ModeratorsWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.ModeratorsWidget instance GHC.Show.Show Network.Reddit.Types.Widget.ModeratorsWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.PostFlairInfo instance GHC.Classes.Eq Network.Reddit.Types.Widget.PostFlairInfo instance GHC.Show.Show Network.Reddit.Types.Widget.PostFlairInfo instance GHC.Generics.Generic Network.Reddit.Types.Widget.PostFlairWidgetDisplay instance GHC.Classes.Eq Network.Reddit.Types.Widget.PostFlairWidgetDisplay instance GHC.Show.Show Network.Reddit.Types.Widget.PostFlairWidgetDisplay instance GHC.Generics.Generic Network.Reddit.Types.Widget.PostFlairWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.PostFlairWidget instance GHC.Show.Show Network.Reddit.Types.Widget.PostFlairWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.RulesDisplay instance GHC.Classes.Eq Network.Reddit.Types.Widget.RulesDisplay instance GHC.Show.Show Network.Reddit.Types.Widget.RulesDisplay instance GHC.Generics.Generic Network.Reddit.Types.Widget.RulesWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.RulesWidget instance GHC.Show.Show Network.Reddit.Types.Widget.RulesWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.TextAreaWidget instance GHC.Classes.Eq Network.Reddit.Types.Widget.TextAreaWidget instance GHC.Show.Show Network.Reddit.Types.Widget.TextAreaWidget instance GHC.Generics.Generic Network.Reddit.Types.Widget.Widget instance GHC.Classes.Eq Network.Reddit.Types.Widget.Widget instance GHC.Show.Show Network.Reddit.Types.Widget.Widget instance GHC.Generics.Generic Network.Reddit.Types.Widget.WidgetList instance GHC.Show.Show Network.Reddit.Types.Widget.WidgetList instance GHC.Generics.Generic Network.Reddit.Types.Widget.SubredditWidgets instance GHC.Classes.Eq Network.Reddit.Types.Widget.SubredditWidgets instance GHC.Show.Show Network.Reddit.Types.Widget.SubredditWidgets instance GHC.Classes.Eq Network.Reddit.Types.Widget.WidgetType instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.ButtonWidget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.ButtonWidget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.Button instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.ImageHover instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.TextHover instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.CalendarWidget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.CalendarWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.CommunityListWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.CustomWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.IDCardWidget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.IDCardWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.ImageWidget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.ImageWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.MenuWidget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.MenuWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.ModeratorsWidget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.ModeratorsWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.PostFlairWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.RulesWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.TextAreaWidget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.TextAreaWidget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.WidgetType instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.WidgetType instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.SubredditWidgets instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.WidgetList instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.Widget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.Widget instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.RulesWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.RulesDisplay instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.RulesDisplay instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.PostFlairWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.PostFlairWidgetDisplay instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.PostFlairWidgetDisplay instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.PostFlairInfo instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.ModInfo instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.ModInfo instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.MenuChild instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.MenuChild instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.Submenu instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.Submenu instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.MenuLink instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.MenuLink instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.Image instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.Image instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.CustomWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.ImageData instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.ImageData instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.CommunityListWidget instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.CommunityInfo instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.CommunityInfo instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.CalendarConfig instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.CalendarConfig instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.Button instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.ButtonImage instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.ButtonImage instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.ButtonText instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.ButtonText instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.ButtonHover instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.ButtonHover instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.TextHover instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.ImageHover instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.WidgetStyles instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.WidgetStyles instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Widget.WidgetSection instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Widget.WidgetID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Widget.WidgetID instance Data.Aeson.Types.ToJSON.ToJSON Network.Reddit.Types.Widget.WidgetID module Network.Reddit.Types.Wiki -- | An individual subreddit wikipage along with its revision information data WikiPage WikiPage :: Body -> Body -> Username -> UTCTime -> Bool -> WikiPage -- | The page content, as markdown [content] :: WikiPage -> Body [contentHTML] :: WikiPage -> Body [revisionBy] :: WikiPage -> Username [revisionDate] :: WikiPage -> UTCTime -- | Indicates whether the authenticated user can revise this particular -- wikipage [mayRevise] :: WikiPage -> Bool -- | ID for a wikipage revision newtype WikiRevisionID WikiRevisionID :: Text -> WikiRevisionID -- | The name of an individual wiki page. The name forms part of the URL, -- and should not contain spaces or uppercase characters data WikiPageName -- | Smart constructor for WikiPageNames. Lowercases the contained -- text, and replaces each space with a single underscore mkWikiPageName :: Text -> WikiPageName -- | Wrapper for listings of WikiPages, which have their own -- RedditKind data WikiPageListing -- | Information regarding a single WikiPage revision data WikiRevision WikiRevision :: WikiRevisionID -> WikiPageName -> UTCTime -> Username -> Maybe Text -> Maybe Bool -> WikiRevision [revisionID] :: WikiRevision -> WikiRevisionID [page] :: WikiRevision -> WikiPageName [timestamp] :: WikiRevision -> UTCTime [author] :: WikiRevision -> Username -- | The reason for editing the page, if any [reason] :: WikiRevision -> Maybe Text -- | If the revision has been hidden [hidden] :: WikiRevision -> Maybe Bool -- | The settings that moderators have configured for a single -- WikiPage data WikiPageSettings WikiPageSettings :: WikiPermLevel -> Bool -> Seq Username -> WikiPageSettings [permlevel] :: WikiPageSettings -> WikiPermLevel [listed] :: WikiPageSettings -> Bool [allowedEditors] :: WikiPageSettings -> Seq Username -- | Editing permission level configured for a single WikiPage data WikiPermLevel FollowWikiSettings :: WikiPermLevel ApprovedEditorsOnly :: WikiPermLevel ModEditsOnly :: WikiPermLevel instance GHC.Generics.Generic Network.Reddit.Types.Wiki.WikiPage instance GHC.Classes.Eq Network.Reddit.Types.Wiki.WikiPage instance GHC.Show.Show Network.Reddit.Types.Wiki.WikiPage instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Wiki.WikiPageName instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Wiki.WikiPageName instance GHC.Classes.Eq Network.Reddit.Types.Wiki.WikiPageName instance GHC.Generics.Generic Network.Reddit.Types.Wiki.WikiPageName instance GHC.Show.Show Network.Reddit.Types.Wiki.WikiPageName instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Wiki.WikiRevisionID instance GHC.Classes.Eq Network.Reddit.Types.Wiki.WikiRevisionID instance GHC.Generics.Generic Network.Reddit.Types.Wiki.WikiRevisionID instance GHC.Show.Show Network.Reddit.Types.Wiki.WikiRevisionID instance GHC.Generics.Generic Network.Reddit.Types.Wiki.WikiRevision instance GHC.Classes.Eq Network.Reddit.Types.Wiki.WikiRevision instance GHC.Show.Show Network.Reddit.Types.Wiki.WikiRevision instance GHC.Generics.Generic Network.Reddit.Types.Wiki.WikiPageListing instance GHC.Show.Show Network.Reddit.Types.Wiki.WikiPageListing instance GHC.Classes.Ord Network.Reddit.Types.Wiki.WikiPermLevel instance GHC.Generics.Generic Network.Reddit.Types.Wiki.WikiPermLevel instance GHC.Classes.Eq Network.Reddit.Types.Wiki.WikiPermLevel instance GHC.Show.Show Network.Reddit.Types.Wiki.WikiPermLevel instance GHC.Generics.Generic Network.Reddit.Types.Wiki.WikiPageSettings instance GHC.Classes.Eq Network.Reddit.Types.Wiki.WikiPageSettings instance GHC.Show.Show Network.Reddit.Types.Wiki.WikiPageSettings instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Wiki.WikiPageSettings instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Wiki.WikiPermLevel instance Web.Internal.HttpApiData.ToHttpApiData Network.Reddit.Types.Wiki.WikiPermLevel instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Wiki.WikiPageListing instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Wiki.WikiRevision instance Network.Reddit.Types.Internal.Paginable Network.Reddit.Types.Wiki.WikiRevision instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Wiki.WikiRevisionID instance Network.Reddit.Types.Internal.Thing Network.Reddit.Types.Wiki.WikiRevisionID instance Data.Aeson.Types.FromJSON.FromJSON Network.Reddit.Types.Wiki.WikiPage -- | Actions related to users, excluding the currently logged-in one. For -- actions on the current account, see Network.Reddit.Me module Network.Reddit.User -- | Check if a Username is available for use isUsernameAvailable :: MonadReddit m => Username -> m Bool -- | Get information about another user getUser :: MonadReddit m => Username -> m Account -- | Get a user's Trophys getUserTrophies :: MonadReddit m => Username -> m (Seq Trophy) -- | Get a Listing of a user's Comments getUserComments :: MonadReddit m => Username -> Paginator CommentID Comment -> m (Listing CommentID Comment) -- | Get a Listing of a user's Submissions getUserSubmissions :: MonadReddit m => Username -> Paginator SubmissionID Submission -> m (Listing SubmissionID Submission) -- | Get Items that a user has upvoted. You must be authorized to -- access this, or an exception will be raised getUserUpvoted :: MonadReddit m => Username -> Paginator ItemID Item -> m (Listing ItemID Item) -- | Get Items that a user has upvoted. You must be authorized to -- access this, or an exception will be raised getUserDownvoted :: MonadReddit m => Username -> Paginator ItemID Item -> m (Listing ItemID Item) -- | Get Items that a user has hidden. You must be authorized to -- access this, or an exception will be raised getUserHidden :: MonadReddit m => Username -> Paginator ItemID Item -> m (Listing ItemID Item) -- | Get an overview of a user's Comments and Submissions getUserOverview :: MonadReddit m => Username -> Paginator ItemID Item -> m (Listing ItemID Item) -- | Get the Items that a user has gilded getUserGilded :: MonadReddit m => Username -> Paginator ItemID Item -> m (Listing ItemID Item) -- | Get the Items that a user has saved. You must be authorized to -- access this, or an exception will be raised getUserSaved :: MonadReddit m => Username -> Paginator ItemID Item -> m (Listing ItemID Item) -- | Get the public Multireddits belonging to the given user getUserMultireddits :: MonadReddit m => Username -> m (Seq Multireddit) -- | Get a Listing of special user subreddits, sorted on creation -- date (newest first) getNewUsers :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Get a Listing of special user subreddits, sorted on -- popularity getPopularUsers :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Get a Listing of user profiles whose titles and descriptions -- which match the given query searchUsers :: MonadReddit m => Text -> Paginator UserID Account -> m (Listing UserID Account) -- | Get a brief UserSummary for each valid UserID. Note that -- Reddit silently ignores invalid IDs, so the output may be shorted than -- the input container getUserSummaries :: (MonadReddit m, Foldable t) => t UserID -> m (Seq UserSummary) -- | Get the UserSummary for a single user ID getUserSummary :: MonadReddit m => UserID -> m UserSummary -- | Policy for accepting private messages, for use in user -- Preferences data AcceptPMs Everyone :: AcceptPMs Whitelisted :: AcceptPMs -- | How to deal with media previews and thumbnails in your -- Preferences data MediaPreference TurnOn :: MediaPreference TurnOff :: MediaPreference FollowSubreddit :: MediaPreference -- | User preferences data Preferences Preferences :: ItemSort -> MediaPreference -> MediaPreference -> Int -> Int -> Int -> Int -> Text -> AcceptPMs -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Preferences -- | A brief summary of a user, with significantly less information than a -- Account data UserSummary UserSummary :: Maybe UserID -> Username -> Integer -> Integer -> UTCTime -> URL -> Maybe RGBText -> Bool -> UserSummary -- | A Reddit award, such as the "one-year club" data Trophy Trophy :: Name -> Maybe Text -> Maybe Text -> Maybe Body -> Maybe UTCTime -> Trophy -- | Information about a user's karma data Karma Karma :: SubredditName -> Integer -> Integer -> Karma -- | A user's friend data Friend Friend :: Username -> UserID -> UTCTime -> Maybe Text -> Friend -- | The item sort for Account searches data AccountSearchSort RelevantAccounts :: AccountSearchSort ActiveAccounts :: AccountSearchSort -- | Options for search Listings of Accounts data AccountSearchOpts AccountSearchOpts :: AccountSearchSort -> Maybe Bool -> Maybe Text -> AccountSearchOpts -- | Account information. Maybe fields denote data that Reddit -- sets to null if the requester does not own the account in question. -- Note that this does not include all of the possible fields that -- may be present in Reddit's response - which are quite numerous in -- total and poorly documented data Account Account :: UserID -> Username -> UTCTime -> Int -> Bool -> Bool -> Int -> Maybe Integer -> Maybe Text -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Account -- | A unique, site-wide ID for an account newtype UserID UserID :: Text -> UserID -- | Reddit username data Username -- | Smart constructor for Username, which must be between 3 and 20 -- chars, and may only include upper/lowercase alphanumeric chars, -- underscores, or hyphens mkUsername :: MonadThrow m => Text -> m Username module Network.Reddit.Subreddit -- | Get information about a Subreddit. An ErrorWithStatus -- will be thrown if attempting to query information on banned or private -- Subreddits getSubreddit :: MonadReddit m => SubredditName -> m Subreddit -- | Get a Subreddit's SubredditRules getSubredditRules :: MonadReddit m => SubredditName -> m (Seq SubredditRule) -- | Get the requirements that moderators have configured for all -- submissions on the given subreddit getPostRequirements :: MonadReddit m => SubredditName -> m PostRequirements -- | Get "hot" Submissions for a given Subreddit getHotSubmissions :: MonadReddit m => SubredditName -> Paginator SubmissionID Submission -> m (Listing SubmissionID Submission) -- | Get "new" Submissions for a given Subreddit getNewSubmissions :: MonadReddit m => SubredditName -> Paginator SubmissionID Submission -> m (Listing SubmissionID Submission) -- | Get "rising" Submissions for a given Subreddit getRandomRisingSubmissions :: MonadReddit m => SubredditName -> Paginator SubmissionID Submission -> m (Listing SubmissionID Submission) -- | Get "controversial" Submissions for a given Subreddit getControversialSubmissions :: MonadReddit m => SubredditName -> Paginator SubmissionID Submission -> m (Listing SubmissionID Submission) -- | Get "rising" Submissions for a given Subreddit getRisingSubmissions :: MonadReddit m => SubredditName -> Paginator SubmissionID Submission -> m (Listing SubmissionID Submission) -- | Get "top" Submissions for a given Subreddit getTopSubmissions :: MonadReddit m => SubredditName -> Paginator SubmissionID Submission -> m (Listing SubmissionID Submission) -- | Get a random submission from the subreddit. The sub must support this -- feature, or an ErrorWithStatus exception will be thrown getRandomSubmission :: MonadReddit m => SubredditName -> m Submission -- | Get one of the stickied submission, optionally specifying its position -- in the sticky list, returning the top one otherwise. Note that this -- will throw an ErrorWithStatus if the sub does not have any -- stickied submissions getStickiedSubmission :: MonadReddit m => Maybe Word -> SubredditName -> m Submission -- | Subscribe to a single subreddit subscribe :: MonadReddit m => SubredditName -> m () -- | Unsubscribe from a single subreddit unsubscribe :: MonadReddit m => SubredditName -> m () -- | Allow the authenticated user to access the quarantined subreddit quarantineOptIn :: MonadReddit m => SubredditName -> m () -- | Disallow the authenticated user from accessing the quarantined -- subreddit quarantineOptOut :: MonadReddit m => SubredditName -> m () -- | Get a Listing of the default Subreddits getDefaultSubreddits :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Get a Listing of new Subreddits site-wide getNewSubreddits :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Get a Listing of popular Subreddits site-wide getPopularSubreddits :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Get a Listing of premium-only Subreddits getPremiumSubreddits :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Same as getPremiumSubreddits, provided for compatibility -- purposes getGoldSubreddits :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Search through subreddits based on both their names and descriptions searchSubreddits :: MonadReddit m => Text -> Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Search through subreddits based on both their names searchSubredditsByName :: MonadReddit m => Maybe Bool -> Maybe Bool -> Text -> m (Seq SubredditName) -- | Get a list of recommended subreddits based on the provided subs. -- Subreddits to exclude from the recommendation may optionally be -- provided. -- -- Note: Unfortunately, as of this writing, this action appears to -- only return an empty array for all inputs getRecommendedSubreddits :: (MonadReddit m, Foldable t) => Maybe (t SubredditName) -> t SubredditName -> m (Seq SubredditName) -- | Follow the collection for the authenticated user followCollection :: MonadReddit m => CollectionID -> m () -- | Unfollow the collection for the authenticated user unfollowCollection :: MonadReddit m => CollectionID -> m () -- | Get the Collections of a subreddit, given the sub ID. -- Collections obtained through this action will not have the -- sortedLinks field -- -- Note: if you don't know the ID of the subreddit, you can use -- getNamedCollections, although this incurs an additional -- network request to get the ID from the name getCollections :: MonadReddit m => SubredditID -> m (Seq Collection) -- | Get the Collections of a subreddit, given the name of the sub. -- Collections obtained through this action will not have the -- sortedLinks field -- -- Note: this incurs a greater overhead than -- getCollections, which you may want to use if you already know -- the subredditID getCollectionsWithName :: MonadReddit m => SubredditName -> m (Seq Collection) -- | Fetch the specifig Collection, given its ID. This includes its -- sortedLinks getCollection :: MonadReddit m => CollectionID -> m Collection -- | Get a Collection given its permalink. This includes -- its sortedLinks -- -- Permalink URLs should be of the form -- https://{www.}reddit.com/r/<SUBREDDIT>/collections/<ID> getCollectionByPermalink :: MonadReddit m => URL -> m Collection -- | Get the user FlairTemplates on the given subreddit. This will -- throw an APIException (ErrorWithStatus) if the sub does -- not allow users to set their own flair and the authenticated user does -- not have mod privileges on the sub getUserFlairTemplates :: MonadReddit m => SubredditName -> m (Seq FlairTemplate) -- | Get the submission FlairTemplates on the given subreddit getSubmissionFlairTemplates :: MonadReddit m => SubredditName -> m (Seq FlairTemplate) -- | Get the available FlairChoices for new submissions on the given -- subreddit getNewSubmissionFlairChoices :: MonadReddit m => SubredditName -> m (Seq FlairChoice) -- | Get the available FlairChoices for new submissions on the -- current subreddit getUserFlairChoices :: MonadReddit m => SubredditName -> m (Seq FlairChoice) -- | Get the available FlairChoices for a particular submission on -- the given subreddit getSubmissionFlairChoices :: MonadReddit m => SubredditName -> SubmissionID -> m (Seq FlairChoice) -- | Get the subreddit WikiPage specified by name getWikiPage :: MonadReddit m => SubredditName -> WikiPageName -> m WikiPage -- | Get all of the WikiPages on the subreddit wiki getWikiPages :: MonadReddit m => SubredditName -> m (Seq WikiPageName) -- | Get a specific revision of a WikiPage, specified by name and -- WikiRevisionID getWikiPageRevision :: MonadReddit m => SubredditName -> WikiPageName -> WikiRevisionID -> m WikiPage -- | Get a Listing of the WikiRevisions for a given wikipage getWikiPageRevisions :: MonadReddit m => SubredditName -> WikiPageName -> Paginator WikiRevisionID WikiRevision -> m (Listing WikiRevisionID WikiRevision) -- | Edit the given wikipage, replacing its contents with the new contents -- provided. This requires moderator privileges or editing privileges for -- the page in question. If the page corresponding to the given name does -- not exist, it will be created editWikiPage :: MonadReddit m => SubredditName -> WikiPageName -> Maybe Text -> Body -> m () -- | Create a new wikipage. If a page with the given name already exists, -- its contents will be replaced createWikiPage :: MonadReddit m => SubredditName -> WikiPageName -> Maybe Text -> Body -> m () -- | Get a given subreddit's widgets getSubredditWidgets :: MonadReddit m => SubredditName -> m SubredditWidgets -- | Get all of a subreddit's Widgets as a non-hierarchical list getAllSubredditWidgets :: MonadReddit m => SubredditName -> m (Seq Widget) -- | Get all of the emojis for the given subreddit. Note that this does not -- include the builtin "snoomojis" getSubredditEmojis :: MonadReddit m => SubredditName -> m (Seq Emoji) -- | Rules concerning the presence of self-text bodies in posts data BodyRestriction BodyRequired :: BodyRestriction BodyNotAllowed :: BodyRestriction NoRestriction :: BodyRestriction -- | Mod-created requirements for posting in a subreddit data PostRequirements PostRequirements :: [Text] -> BodyRestriction -> [Text] -> [Text] -> Bool -> [Text] -> [Text] -> Maybe Word -> Maybe Word -> PostRequirements -- | The type of item that a SubredditRule applies to data RuleType CommentRule :: RuleType LinkRule :: RuleType AllRule :: RuleType -- | Wrapper for parsing newly created SubredditRules, after POSTing -- a NewSubredditRule. Rather unbelievably, Reddit transmits these -- new rules as a JSON object ... in a single element array ... -- encoded as a string ... inside another object! data PostedSubredditRule -- | Represents a new SubredditRule that can be created by -- moderators data NewSubredditRule NewSubredditRule :: Name -> RuleType -> Body -> Maybe Text -> NewSubredditRule -- | A Subreddit rule. If you are a moderator, you can update the -- shortName, description, violationReason, -- and ruleType fields. See reorderSubredditRules. New -- rules may also be created with NewSubredditRules data SubredditRule SubredditRule :: Body -> Body -> Name -> UTCTime -> Word -> Maybe Text -> Maybe RuleType -> SubredditRule -- | Unique site-wide identifier for a subreddit newtype SubredditID SubredditID :: Text -> SubredditID -- | The name of a subreddit data SubredditName -- | Information about a subreddit. Fields prefixed with userIs -- below apply to the currently authenticated user data Subreddit Subreddit :: SubredditID -> SubredditName -> Title -> UTCTime -> Body -> Maybe Body -> Body -> Integer -> Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Bool -> Subreddit -- | Smart constructor for SubredditName, which must be between 3 -- and 20 chars, and may only include upper/lowercase alphanumeric chars, -- underscores, and hyphens mkSubredditName :: MonadThrow m => Text -> m SubredditName -- | Foreground color for v2 flair data ForegroundColor Dark :: ForegroundColor Light :: ForegroundColor -- | The type of content that is allowed in a flair template data FlairContent AllContent :: FlairContent EmojisOnly :: FlairContent TextOnly :: FlairContent -- | The type of flair, when creating a new template data FlairType UserFlairType :: FlairType SubmissionFlairType :: FlairType -- | The result of bulk setting of users' flairs as a mod action. The -- warnings and errors fields may be dynamically -- generated by Reddit, so they are represented here as HashMaps data FlairResult FlairResult :: Bool -> Text -> HashMap Text Text -> HashMap Text Text -> FlairResult -- | Select a FlairChoice for a submission or for the user data FlairSelection FlairSelection :: FlairChoice -> Maybe Text -> SubredditName -> FlairSelection -- | Wrapper around UserFlair for fetching the current flair. This -- uses the same endpoint as the FlairChoiceList above data CurrentUserFlair -- | Flair that is currently assigned to a user data UserFlair UserFlair :: Maybe FlairText -> Maybe CSSClass -> UserFlair data FlairChoiceList -- | Information about flair that a user can choose. The -- templateID corresponds to the flairID field of a -- FlairTemplate data FlairChoice FlairChoice :: FlairID -> FlairText -> Bool -> Maybe CSSClass -> FlairChoice -- | Wrapper around FlairTemplates for posting via the API. If the -- flairID field is Nothing, a new template will be -- created. Otherwise, the template with the matching ID will be updated data PostedFlairTemplate -- | Flair "templates" that describe choices for self-assigned flair, for -- both users and submissions data FlairTemplate FlairTemplate :: Maybe FlairID -> FlairText -> Bool -> Maybe ForegroundColor -> Maybe RGBText -> Maybe CSSClass -> Maybe Bool -> Word -> Bool -> FlairContent -> FlairTemplate -- | An identifier for a FlairTemplate type FlairID = Text -- | Reddit strangely does not use their usual Listing -- mechanism for paginating assigned flairs, but a different data -- structure data FlairList FlairList :: Maybe UserID -> Maybe UserID -> Seq AssignedFlair -> FlairList -- | Flair that has been, or will be, assigned to a user data AssignedFlair AssignedFlair :: Username -> Maybe FlairText -> Maybe CSSClass -> AssignedFlair -- | CSS class for flair type CSSClass = Text -- | The text displayed by the FlairTemplate data FlairText -- | Smart constructor for FlairText, the length of which not exceed -- 64 characters mkFlairText :: MonadThrow m => Text -> m FlairText -- | Convert a FlairList to a Listing, allowing it to be used -- with other functions/actions expecting a listing flairlistToListing :: FlairList -> Listing UserID AssignedFlair -- | A FlairTemplate with default fields, for convenience when -- creating new templates defaultFlairTemplate :: FlairTemplate -- | The name of an individual Emoji data EmojiName -- | A single emoji. This can either be one of Reddit's builtin "snoomojis" -- or a custom emoji for a subreddit. See mkEmoji for creating -- news ones data Emoji Emoji :: EmojiName -> Bool -> Bool -> Bool -> Maybe UserID -> Maybe UploadURL -> Emoji -- | Create a new Emoji by providing an EmojiName; default -- values are provided for all other fields mkEmoji :: EmojiName -> Emoji -- | Smart constructor for EmojiNames, which may only contain -- alphanumeric characters, '_', '-', and '&', and may not exceed 24 -- characters in length mkEmojiName :: MonadThrow m => Text -> m EmojiName -- | A widget composed of text. See mkTextAreaWidget for -- constructing a new widget data TextAreaWidget TextAreaWidget :: Maybe WidgetID -> ShortName -> Body -> Maybe Body -> Maybe WidgetStyles -> TextAreaWidget -- | Display style for a RulesWidget data RulesDisplay FullDisplay :: RulesDisplay CompactDisplay :: RulesDisplay -- | A widget listing subreddit SubredditRules. The rules -- field cannot be updated through widget endpoints, and are excluded -- during serialization data RulesWidget RulesWidget :: Maybe WidgetID -> ShortName -> Seq SubredditRule -> RulesDisplay -> Maybe WidgetStyles -> RulesWidget -- | The display orientation for PostFlairWidgets data PostFlairWidgetDisplay CloudDisplay :: PostFlairWidgetDisplay ListDisplay :: PostFlairWidgetDisplay -- | Information about submission flair templates in a -- PostFlairWidget data PostFlairInfo PostFlairInfo :: FlairID -> Text -> ForegroundColor -> RGBText -> PostFlairInfo -- | A widget listing flair choices for submissions. When creating a new -- widget, the FlairIDs in the order field must be valid -- template IDs for the given subreddit. Existing flair templates can be -- obtained with getSubmissionFlairTemplates, which can then be -- mapped over to obtain the IDs. Once the flair IDs have been obtained, -- mkPostFlairWidget can be used to construct a widget with -- default values for most fields data PostFlairWidget PostFlairWidget :: Maybe WidgetID -> ShortName -> Seq FlairID -> HashMap FlairID PostFlairInfo -> PostFlairWidgetDisplay -> Maybe WidgetStyles -> PostFlairWidget -- | Information about a moderator as displayed in a -- ModeratorsWidget data ModInfo ModInfo :: Username -> Maybe FlairText -> Maybe ForegroundColor -> Maybe RGBText -> ModInfo -- | A widget listing the moderators of the subreddit. This widget cannot -- be created. It can be updated by modifying the styles field -- only data ModeratorsWidget ModeratorsWidget :: Maybe WidgetID -> Seq ModInfo -> Maybe Int -> Maybe WidgetStyles -> ModeratorsWidget -- | A link in a MenuWidget or Submenu data MenuLink MenuLink :: Text -> URL -> MenuLink -- | A submenu child in a MenuWidget which contains MenuLinks data Submenu Submenu :: Seq MenuLink -> Text -> Submenu -- | A child widget in a MenuWidget data MenuChild SubmenuChild :: Submenu -> MenuChild MenuLinkChild :: MenuLink -> MenuChild -- | A widget representing a menu data MenuWidget MenuWidget :: Maybe WidgetID -> Seq MenuChild -> MenuWidget -- | An individual image in an ImageWidget data Image Image :: Integer -> Integer -> UploadURL -> Maybe URL -> Image -- | A widget composed of various Images data ImageWidget ImageWidget :: Maybe WidgetID -> ShortName -> Seq Image -> Maybe WidgetStyles -> ImageWidget -- | An ID card displaying information about the subreddit data IDCardWidget IDCardWidget :: Maybe WidgetID -> ShortName -> Body -> Text -> Text -> Maybe Integer -> Maybe Integer -> Maybe WidgetStyles -> IDCardWidget -- | Image data that belongs to a CustomWidget data ImageData ImageData :: Name -> Int -> Int -> UploadURL -> ImageData -- | A custom widget data CustomWidget CustomWidget :: Maybe WidgetID -> ShortName -> Body -> Seq ImageData -> Int -> Maybe Body -> Maybe Text -> Maybe URL -> Maybe WidgetStyles -> CustomWidget -- | Information about a single subreddit in a CommunityListWidget. -- When creating a new widget, only the name field will be -- serialized data CommunityInfo CommunityInfo :: SubredditName -> Maybe Integer -> Maybe RGBText -> Maybe URL -> Maybe URL -> Maybe Bool -> Maybe Bool -> CommunityInfo -- | A widget listing related subreddits data CommunityListWidget CommunityListWidget :: Maybe WidgetID -> ShortName -> Seq CommunityInfo -> Maybe WidgetStyles -> CommunityListWidget -- | Configuration options for a CalendarWidget data CalendarConfig CalendarConfig :: Word -> Bool -> Bool -> Bool -> Bool -> Bool -> CalendarConfig -- | A widget representing a calendar data CalendarWidget CalendarWidget :: Maybe WidgetID -> ShortName -> Text -> CalendarConfig -> Bool -> Maybe WidgetStyles -> CalendarWidget -- | The state of a TextButton when hovering over it data TextHover TextHover :: ShortName -> Maybe RGBText -> Maybe RGBText -> Maybe RGBText -> TextHover -- | The state of an ImageButton when hovering over it data ImageHover ImageHover :: UploadURL -> Maybe Integer -> Maybe Integer -> ImageHover -- | The state of the Button when hovering over it data ButtonHover ImageButtonHover :: ImageHover -> ButtonHover TextButtonHover :: TextHover -> ButtonHover -- | Data for a TextButton data ButtonText ButtonText :: ShortName -> URL -> RGBText -> Maybe RGBText -> Maybe RGBText -> Maybe ButtonHover -> ButtonText -- | Data for an ImageButton data ButtonImage ButtonImage :: ShortName -> UploadURL -> URL -> Int -> Int -> Maybe ButtonHover -> ButtonImage -- | An individual button in a ButtonWidget data Button ImageButton :: ButtonImage -> Button TextButton :: ButtonText -> Button -- | A widget containing buttons data ButtonWidget ButtonWidget :: Maybe WidgetID -> ShortName -> Seq Button -> Body -> Maybe Body -> Maybe WidgetStyles -> ButtonWidget -- | Style options for an individual widget data WidgetStyles WidgetStyles :: Maybe RGBText -> Maybe RGBText -> WidgetStyles -- | A "short name" for any widget. This name must be less than 30 -- characters long data ShortName -- | The section in which certain Widgets appear data WidgetSection Topbar :: WidgetSection Sidebar :: WidgetSection -- | A widget ID. These are usually prefixed with the type of widget it -- corresponds to, e.g. rules-2qh1i for a RulesWidget newtype WidgetID WidgetID :: Text -> WidgetID -- | Represents one of various kinds of widgets data Widget Buttons :: ButtonWidget -> Widget Calendar :: CalendarWidget -> Widget CommunityList :: CommunityListWidget -> Widget Custom :: CustomWidget -> Widget IDCard :: IDCardWidget -> Widget Images :: ImageWidget -> Widget Moderators :: ModeratorsWidget -> Widget Menu :: MenuWidget -> Widget PostFlair :: PostFlairWidget -> Widget Rules :: RulesWidget -> Widget TextArea :: TextAreaWidget -> Widget -- | An organized collection of a subreddit's widgets data SubredditWidgets SubredditWidgets :: IDCardWidget -> ModeratorsWidget -> Seq Widget -> Seq Widget -> Seq WidgetID -> Seq WidgetID -> SubredditWidgets -- | Smart constructor for ShortNames, which must be <= 30 -- characters long mkShortName :: MonadThrow m => Text -> m ShortName -- | A calendar config with default values defaultCalendarConfig :: CalendarConfig -- | Convenience function for creating a new CommunityInfo, where -- all but one of the fields should be Nothing mkCommunityInfo :: SubredditName -> CommunityInfo -- | Make a new PostFlairWidget with default values for most fields mkPostFlairWidget :: ShortName -> Seq FlairID -> PostFlairWidget -- | Create a new TextAreaWidget, with default values for most -- fields mkTextAreaWidget :: ShortName -> Body -> TextAreaWidget -- | Editing permission level configured for a single WikiPage data WikiPermLevel FollowWikiSettings :: WikiPermLevel ApprovedEditorsOnly :: WikiPermLevel ModEditsOnly :: WikiPermLevel -- | The settings that moderators have configured for a single -- WikiPage data WikiPageSettings WikiPageSettings :: WikiPermLevel -> Bool -> Seq Username -> WikiPageSettings -- | Wrapper for listings of WikiPages, which have their own -- RedditKind data WikiPageListing -- | ID for a wikipage revision data WikiRevisionID -- | Information regarding a single WikiPage revision data WikiRevision WikiRevision :: WikiRevisionID -> WikiPageName -> UTCTime -> Username -> Maybe Text -> Maybe Bool -> WikiRevision -- | The name of an individual wiki page. The name forms part of the URL, -- and should not contain spaces or uppercase characters data WikiPageName -- | An individual subreddit wikipage along with its revision information data WikiPage WikiPage :: Body -> Body -> Username -> UTCTime -> Bool -> WikiPage -- | Smart constructor for WikiPageNames. Lowercases the contained -- text, and replaces each space with a single underscore mkWikiPageName :: Text -> WikiPageName -- | Actions for messaging. These can be both comment replies as well as -- private messages module Network.Reddit.Message -- | Get the Message inbox for the currently authenticated user getInbox :: MonadReddit m => Paginator MessageID Message -> m (Listing MessageID Message) -- | Get the unread Messages of the currently authenticated user getUnread :: MonadReddit m => Paginator MessageID Message -> m (Listing MessageID Message) -- | Get the Messages sent by the currently authenticated user getSent :: MonadReddit m => Paginator MessageID Message -> m (Listing MessageID Message) -- | Mark a Message as read markRead :: MonadReddit m => MessageID -> m () -- | Send a NewMessage to another user sendMessage :: MonadReddit m => NewMessage -> m () -- | Reply to a Message, returning the newly created Message replyToMessage :: MonadReddit m => MessageID -> Body -> m Message -- | Report a message, bringing it to the attention of the Reddit admins reportMessage :: MonadReddit m => Report -> MessageID -> m () -- | For sending new Messages via the compose API endpoint data NewMessage NewMessage :: Subject -> Body -> Username -> NewMessage -- | A private message ID newtype PrivateMessageID PrivateMessageID :: Text -> PrivateMessageID -- | This can be CommentID for replies to a comment, or a -- PrivateMessageID for private messages. Querying one's inbox or -- unread messages can provide both types data MessageID -- | Options for requesting and paginating Listings of -- Messages data MessageOpts MessageOpts :: Bool -> MessageOpts -- | A private message or comment reply data Message Message :: MessageID -> Username -> Username -> Body -> Body -> Subject -> UTCTime -> Bool -> Seq Message -> Message -- | Actions related to the currently logged-in user, such as accounts, -- friends, etc... For actions related to other users, see -- Network.Reddit.User module Network.Reddit.Me -- | Get account information for the currently logged-in user getMe :: MonadReddit m => m Account -- | Get the user Preferences for the currently authenticated user getPreferences :: MonadReddit m => m Preferences -- | Update the authenticated users Preferences. Returns the new -- preferences upon success -- -- Warning: Invalid fields or values are silently discarded by -- this endpoint. If you wish to check that an update has succeeded, -- consider an equality test between the existing preferences and the -- value returned by this action updatePreferences :: MonadReddit m => Preferences -> m Preferences -- | Get an overview of the authenticated user's Comments and -- Submissions getMyOverview :: MonadReddit m => Paginator ItemID Item -> m (Listing ItemID Item) -- | Get items that the authenticated user has saved getMySaved :: MonadReddit m => Paginator ItemID Item -> m (Listing ItemID Item) -- | Get an overview of the authenticated user's Comments getMyComments :: MonadReddit m => Paginator CommentID Comment -> m (Listing CommentID Comment) -- | Get an overview of the authenticated user's Submissions getMySubmissions :: MonadReddit m => Paginator SubmissionID Submission -> m (Listing SubmissionID Submission) -- | Get items that the authenticated user has hidden getMyHidden :: MonadReddit m => Paginator ItemID Item -> m (Listing ItemID Item) -- | Get the Friends of the currently logged-in user getMyFriends :: MonadReddit m => m (Seq Friend) -- | Get blocked users (as Friends) of the currently logged-in user getMyBlocked :: MonadReddit m => m (Seq Friend) -- | Get a breakdown of the current user's karma getMyKarma :: MonadReddit m => m (Seq Karma) -- | Make friends with another user makeFriend :: MonadReddit m => Maybe Text -> Username -> m Friend -- | Remove an existing friend unFriend :: MonadReddit m => Username -> m () -- | Block another user. Note that this cannot be reversed through the API; -- the logged-in user would need to manually revoke the block by visiting -- Reddit's website blockUser :: MonadReddit m => UserID -> m () -- | Find out if the authenticated user needs to complete a captcha when -- performing certain transactions, such as submitting a link or sending -- a private message needsCaptcha :: MonadReddit m => m Bool -- | Get the authenticated user's current flair for the given subreddit, if -- such flair exists getMyFlair :: MonadReddit m => SubredditName -> m (Maybe UserFlair) -- | Set the flair for the authenticated user, provided that the given -- subreddit allows users to perform this action. The text field -- is ignored unless it is Just and the -- textEditable field of the contained FlairChoice is -- True setMyFlair :: MonadReddit m => FlairSelection -> m () -- | Get a listing of subreddits the currently authenticated user is -- subscribed to getMySubscribed :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Get a listing of subreddits the currently authenticated user is a mod -- in getMyModerated :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Get a listing of subreddits the currently authenticated user is an -- approved user in getMyContributing :: MonadReddit m => Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) -- | Get all of the multireddits of the authenticated user getMyMultireddits :: MonadReddit m => m (Seq Multireddit) -- | Actions for Multireddits composed of several Subreddits module Network.Reddit.Multireddit -- | Get a Multireddit by its path getMultireddit :: MonadReddit m => MultiPath -> m Multireddit -- | Add the given subreddit to the existing multireddit addToMultireddit :: MonadReddit m => MultiPath -> SubredditName -> m () -- | Remove a single subreddit from the existing multireddit removeFromMultireddit :: MonadReddit m => MultiPath -> SubredditName -> m () -- | Delete an existing multireddit deleteMultireddit :: MonadReddit m => MultiPath -> m () -- | Copy an existing Multireddit, returning the new one copyMultireddit :: MonadReddit m => MultiPath -> MultiName -> m Multireddit -- | Create a new Multireddit. Will throw a 409 -- ErrorWithStatus if the proposed multireddit already exists. The -- new multireddit will be created at the provided MultiPath -- parameter createMultireddit :: MonadReddit m => NewMulti -> MultiPath -> m Multireddit -- | Update an existings multireddit, returning the same Multireddit -- with the updates applied updateMultireddit :: MonadReddit m => MultiUpdate -> MultiPath -> m Multireddit -- | List all of the filters configured for the special subreddit. If no -- filters have been applied, this will throw an ErrorWithStatus -- exception listFilters :: MonadReddit m => SubredditName -> m Multireddit -- | Add a subreddit to filter from the special subreddit addFilter :: MonadReddit m => SubredditName -> SubredditName -> m () -- | Remove a filtered subreddit from the special subreddit. This action -- will succeed even if the filtered subreddit is not in the special -- subreddit filter removeFilter :: MonadReddit m => SubredditName -> SubredditName -> m () -- | Remove all of the filters for the special subreddit clearFilters :: MonadReddit m => SubredditName -> m () -- | An update to a multireddit, where all fields are optional. If a field -- is not provided, it is omitted during JSON encoding type MultiUpdate = NewMultiF Maybe -- | An new multireddit, where all fields are required type NewMulti = NewMultiF Identity -- | Can represent either a new multireddit when parameterized by -- Identity, or a multireddit update when parameterized by -- Maybe. In both cases, keyColor is an optional field data NewMultiF f NewMultiF :: HKD f Body -> HKD f Text -> HKD f (Seq SubredditName) -> HKD f MultiVisibility -> Maybe RGBText -> NewMultiF f -- | The configured visibility level for a Multireddit data MultiVisibility PrivateMulti :: MultiVisibility PublicMulti :: MultiVisibility HiddenMulti :: MultiVisibility -- | The path to a Multireddit, of the form -- /user/USERNAME/m/MULTINAME data MultiPath MultiPath :: Username -> MultiName -> MultiPath -- | The name of a Multireddit, which may only contain alphanumeric -- characters data MultiName -- | An aggregation of individual Subreddits data Multireddit Multireddit :: MultiName -> Text -> Seq SubredditName -> UTCTime -> Body -> Body -> Maybe RGBText -> MultiPath -> MultiVisibility -> Maybe MultiPath -> Bool -> Maybe Bool -> Multireddit -- | Smart constructor for MultiNames, which may only contain -- alphanumeric characters mkMultiName :: MonadThrow m => Text -> m MultiName -- | Convert a Multireddit to a MultiUpdate multiUpdate :: Multireddit -> MultiUpdate -- | A MultiUpdate with all Nothing fields, for convenience defaultMultiUpdate :: MultiUpdate -- | Actions for working with LiveThreads module Network.Reddit.Live -- | Get the details on a single LiveThread given its ID getLiveThread :: MonadReddit m => LiveThreadID -> m LiveThread -- | Get information about live threads corresponding to each of the -- LiveThreadIDs in the given container. Invalid IDs are silently -- discarded by this endpoint -- -- Note: This endpoint will only accept a maximum of 100 -- LiveThreadIDs. If you would like to get all of the information -- for a larger number of LiveThreads at once, see -- getAllLiveInfo getLiveInfo :: (MonadReddit m, Foldable t) => t LiveThreadID -> Paginator LiveThreadID LiveThread -> m (Listing LiveThreadID LiveThread) -- | Get all of the LiveThreads corresponding to a container of -- LiveThreadIDs, without a limit getAllLiveInfo :: (MonadReddit m, Traversable t) => t LiveThreadID -> m (Seq LiveThread) -- | Get a Listing of LiveUpdates for the given live thread getLiveUpdates :: MonadReddit m => LiveThreadID -> Paginator LiveUpdateID LiveUpdate -> m (Listing LiveUpdateID LiveUpdate) -- | Get a single LiveUpdate for the given live thread getLiveUpdate :: MonadReddit m => LiveThreadID -> LiveUpdateID -> m LiveUpdate -- | Get a Listing of Submissions representing the -- discussions on the given live thread getLiveDiscussions :: MonadReddit m => LiveThreadID -> Paginator SubmissionID Submission -> m (Listing SubmissionID Submission) -- | Get a list of contributors to the live thread getLiveContributors :: MonadReddit m => LiveThreadID -> m (Seq LiveContributor) -- | Report the given live thread to Reddit admins with the provided reason reportLiveThread :: MonadReddit m => LiveReportType -> LiveThreadID -> m () -- | Create a NewLiveThread, returning the LiveThread upon -- success. Also see mkNewLiveThread createLiveThread :: MonadReddit m => NewLiveThread -> m LiveThread -- | Close an existing live thread. After closing, it is no longer possible -- to update or modify the live thread -- -- Warning: This action is irreversible closeLiveThread :: MonadReddit m => LiveThreadID -> m () -- | Update the existing live thread with new settings updateLiveThread :: MonadReddit m => LiveThreadID -> UpdatedLiveThread -> m () -- | Add an update to the live thread addLiveUpdate :: MonadReddit m => LiveThreadID -> Body -> m () -- | Strike the existing LiveUpdate, causing its stricken -- field to be True and the content to be crossed-out and marked -- incorrect on the web UI strikeLiveUpdate :: MonadReddit m => LiveThreadID -> LiveUpdateID -> m () -- | Strike the existing LiveUpdate, causing its stricken -- field to be True and the content to be crossed-out and marked -- incorrect on the web UI deleteLiveUpdate :: MonadReddit m => LiveThreadID -> LiveUpdateID -> m () -- | Remove the user as a contributor to the live thread. If you don't know -- the contributor's user ID, you can use -- removeLiveContributorByName removeLiveContributor :: MonadReddit m => LiveThreadID -> UserID -> m () -- | Remove the live contributor by username. Note that this action must -- perform an additional network request to fetch the user ID from the -- given username removeLiveContributorByName :: MonadReddit m => LiveThreadID -> Username -> m () -- | Update the permissions for the live contributor updateLiveContributor :: (MonadReddit m, Foldable t) => Maybe (t LivePermission) -> LiveThreadID -> Username -> m () -- | Abdicate your role as a live contributor, removing all access and -- permissions -- -- Warning: This cannot be undone, even if you are the creator of -- the live thread abdicateLiveContributor :: MonadReddit m => LiveThreadID -> m () -- | Invite a user to contribute to the live thread. Note that this -- implicitly grants all permissions to the invitee. If you would like -- more fine-grained control over permissions, see -- inviteLiveContributorWithPerms inviteLiveContributor :: MonadReddit m => LiveThreadID -> Username -> m () -- | As inviteLiveContributor, but allows customization of the -- permissions granted to the invitee inviteLiveContributorWithPerms :: (MonadReddit m, Foldable t) => t LivePermission -> LiveThreadID -> Username -> m () -- | Revoke the invitation to contribute to the live thread. If you don't -- know the contributor's user ID, you can use -- revokeLiveInvitationByName revokeLiveInvitation :: MonadReddit m => LiveThreadID -> UserID -> m () -- | Revoke the live invitation by username. Note that this action must -- perform an additional network request to fetch the user ID from the -- given username revokeLiveInvitationByName :: MonadReddit m => LiveThreadID -> Username -> m () -- | The reason for reporting the LiveThread to the Reddit admins data LiveReportType Spam :: LiveReportType VoteManipulation :: LiveReportType PersonalInfo :: LiveReportType Sexualizing :: LiveReportType SiteBreaking :: LiveReportType -- | Permission granted to a LiveContributor data LivePermission Edit :: LivePermission Update :: LivePermission Manage :: LivePermission Settings :: LivePermission -- | A user contributor in a LiveThread data LiveContributor LiveContributor :: UserID -> Username -> Seq LivePermission -> LiveContributor -- | External resources embedded in a LiveUpdate data LiveUpdateEmbed LiveUpdateEmbed :: URL -> Maybe Integer -> Maybe Integer -> LiveUpdateEmbed -- | ID for a LiveUpdate newtype LiveUpdateID LiveUpdateID :: Text -> LiveUpdateID -- | An individual update in a LiveThread data LiveUpdate LiveUpdate :: LiveUpdateID -> Maybe Username -> Body -> Body -> Bool -> Seq LiveUpdateEmbed -> LiveUpdate -- | Type synonym for updating existing live threads type UpdatedLiveThread = PostableLiveThread -- | Type synonym for creating new live threads type NewLiveThread = PostableLiveThread -- | Data to create a new LiveThread or update an existing one. In -- the latter case, see liveThreadToPostable for conversion data PostableLiveThread PostableLiveThread :: Title -> Maybe Body -> Maybe Body -> Bool -> PostableLiveThread -- | The state of the LiveThread data LiveState Current :: LiveState Complete :: LiveState -- | ID for a single LiveThread newtype LiveThreadID LiveThreadID :: Text -> LiveThreadID -- | An existing Reddit live thread. It may be currently live or already -- complete data LiveThread LiveThread :: LiveThreadID -> Title -> Maybe Body -> Maybe Body -> Maybe Body -> Maybe Body -> UTCTime -> Maybe Integer -> LiveState -> Bool -> Maybe URL -> LiveThread -- | Create a NewLiveThread with default values for most fields mkNewLiveThread :: Title -> NewLiveThread -- | Convenience function to transform an existing LiveThread into a -- PostableLiveThread, which may be used in updates liveThreadToPostable :: LiveThread -> UpdatedLiveThread -- | Actions with operate on Items, which can be either -- Comments or Submissions module Network.Reddit.Item -- | Delete an Item delete :: MonadReddit m => ItemID -> m () -- | Leave a comment in reply to an Item, which can be -- markdown-formatted. This will return the newly created Comment -- upon success reply :: MonadReddit m => ItemID -> Body -> m Comment -- | Edit some item, given its ItemID. The return value will be -- wrapped in an Item constructor, since it can be either a -- Comment or Submission edit :: MonadReddit m => ItemID -> Body -> m Item -- | Submit a vote. Be careful! Reddit views bot-based vote manipulation as -- a serious violation vote :: MonadReddit m => Vote -> ItemID -> m () -- | Report an item, which brings it to the attention of the subreddit -- moderators report :: MonadReddit m => Report -> ItemID -> m () -- | Save an item save :: MonadReddit m => ItemID -> m () -- | Unsave an item unsave :: MonadReddit m => ItemID -> m () -- | Enable or disable inbox replies for an item given its ItemID setInboxReplies :: MonadReddit m => Bool -> ItemID -> m () -- | Get a Listing of Items that have been gilded getGildedItems :: MonadReddit m => SubredditName -> Paginator ItemID Item -> m (Listing ItemID Item) -- | The reason for issuing a report. The length of the contained text must -- be <= 100 characters data Report -- | The direction in which to vote data Vote Downvote :: Vote Unvote :: Vote Upvote :: Vote -- | Certain endpoints will return either Comments or a -- Submissions, or both data Item CommentItem :: Comment -> Item SubmissionItem :: Submission -> Item -- | Wraps either a CommentID or a SubmissionID. This is -- required to use Items with Paginators data ItemID CommentItemID :: CommentID -> ItemID SubmissionItemID :: SubmissionID -> ItemID -- | Smart constructor for Reports, which may be no longer than 100 -- characters in length mkReport :: MonadThrow m => Text -> m Report module Network.Reddit.Comment -- | Get the Comments corresponding to a container of -- CommentIDs getComments :: (MonadReddit m, Foldable t) => ItemOpts Comment -> t CommentID -> m (Seq Comment) -- | Get information on a single CommentID. Throws an exception if -- no such Comment exists getComment :: MonadReddit m => CommentID -> m Comment -- | Update a Comment to include its ChildComments, returning -- the updated Comment. This will probably be necessary if the -- original Comment was obtained by getting a Username's -- or Subreddit's comments, etc... withReplies :: MonadReddit m => ItemOpts a -> Comment -> m Comment -- | Transform MoreComments, loading the actual comments they refer -- to, up to the limit passed in (pass Nothing for no limit). If -- CommentIDs still remain from the original MoreComments, -- they will be returned in a new MoreComments inserted into the -- resulting sequence of ChildComments, along with an updated -- count loadMoreComments :: forall m. MonadReddit m => Maybe Word -> ItemOpts Comment -> SubmissionID -> MoreComments -> m (Seq ChildComment) -- | A version of loadMoreComments with default parameters for the -- limit (Nothing) and options (defaultItemOpts) loadMoreCommentsDef :: MonadReddit m => SubmissionID -> MoreComments -> m (Seq ChildComment) -- | Unsave a comment unsaveComment :: MonadReddit m => CommentID -> m () -- | Save a comment saveComment :: MonadReddit m => CommentID -> m () -- | Delete a comment that the currently authenticated user has authored, -- given its CommentID deleteComment :: MonadReddit m => CommentID -> m () -- | Edit a comment given its CommentID, receving an updated -- Comment in response editComment :: MonadReddit m => CommentID -> Body -> m Comment -- | Reply to a comment given its CommentID, returning the newly -- created Comment replyToComment :: MonadReddit m => CommentID -> Body -> m Comment -- | Get new Comments, either for the site as a whole or for a -- single subreddit, given its SubredditName getNewComments :: MonadReddit m => Maybe SubredditName -> Paginator CommentID Comment -> m (Listing CommentID Comment) -- | Enable/disable inbox replies for a comment setCommentReplies :: MonadReddit m => Bool -> CommentID -> m () -- | Upvote a comment. upvoteComment :: MonadReddit m => CommentID -> m () -- | Downvote a comment. downvoteComment :: MonadReddit m => CommentID -> m () -- | Remove an existing vote on a comment. unvoteComment :: MonadReddit m => CommentID -> m () -- | Report a comment to the subreddit's mods reportComment :: MonadReddit m => Report -> CommentID -> m () -- | A link to load more children Comments data MoreComments MoreComments :: Seq CommentID -> Integer -> MoreComments -- | Represents a comments on a submission or replies to a comment, which -- can be actual Comments, or a list of children corresponding to -- "load more" or "continue this thread" links on Reddit's UI data ChildComment TopLevel :: Comment -> ChildComment More :: MoreComments -> ChildComment -- | A Reddit comment data Comment Comment :: CommentID -> Username -> Body -> Body -> Seq ChildComment -> Maybe Integer -> Maybe Integer -> Maybe Integer -> UTCTime -> Maybe UTCTime -> SubredditName -> SubredditID -> Int -> Maybe Bool -> SubmissionID -> Maybe URL -> Maybe Username -> URL -> Seq ItemReport -> Seq ItemReport -> Maybe Integer -> Maybe Distinction -> Bool -> Bool -> Comment -- | A Comment ID newtype CommentID CommentID :: Text -> CommentID module Network.Reddit.Submission -- | Get a information on Submissions given a container of -- SubmissionIDs getSubmissions :: (MonadReddit m, Foldable t) => ItemOpts Submission -> t SubmissionID -> m (Seq Submission) -- | Get information on a single submission. Throws an exception if no such -- Submission exists getSubmission :: MonadReddit m => SubmissionID -> m Submission -- | Get a Submission from a URL pointing to it, in one of the -- following forms: -- --
-- >>> gif = InlineMedia InlineGIF "/path/to/a.gif" "gif" Nothing -- -- >>> vid = InlineMedia InlineVideo "/path/to/a.mp4" "vid" (Just "my video") -- -- >>> body = "Body with an inline gif #gif# and video #vid#" -- -- >>> submitWithInlineMedia Nothing body [gif, vid] myOptions ---- -- Will automatically produce (internally) the following markdown body -- for the submission, after uploading the media to Reddit's servers: -- --
-- Body with an inline gif -- --  -- -- and video -- --  --submitWithInlineMedia :: (MonadReddit m, Traversable t) => Maybe Char -> Body -> t InlineMedia -> SubmissionOptions -> m Submission -- | Submit a new link post submitLink :: MonadReddit m => SubredditName -> Title -> URL -> m Submission -- | Post an image submission to the subreddit, uploading the image file. -- This action does not currently return the posted submission upon -- success submitImage :: MonadReddit m => FilePath -> SubmissionOptions -> m () -- | Post an image submission to the subreddit, uploading the image file. -- This action does not currently return the posted submission upon -- success submitVideo :: MonadReddit m => Bool -> FilePath -> Maybe FilePath -> SubmissionOptions -> m () -- | Post a poll to the subreddit. See mkPoll to create a new -- Poll submitPoll :: (MonadReddit m, Foldable t) => Poll t -> SubmissionOptions -> m () -- | Post a gallery to the subreddit, given a container of -- GalleryImages. See mkGalleryImage to create the images -- with default values. This action also ensures that the image container -- has at least two elements submitGallery :: (MonadReddit m, Traversable t) => t GalleryImage -> SubmissionOptions -> m () -- | Submit a new submission, returning the Submission that has been -- created. This action allows for more fine-grained control over -- submission options. You can use mkSubmissionOptions for -- defaults and update it as needed. See also submitImage, -- submitPoll, and submitGallery, which should be used when -- submitting anything beyond a self-text or link post submit :: MonadReddit m => NewSubmission -> m Submission -- | Crosspost an existing submission. You must be a subscriber of the -- subreddit you are posting into. See also mkCrosspostOptions crosspost :: MonadReddit m => SubmissionID -> CrosspostOptions -> m Submission -- | Enable/disable inbox replies for a submission setSubmissionReplies :: MonadReddit m => Bool -> SubmissionID -> m () -- | Get the available FlairChoices for a particular submission on -- the given subreddit getSubmissionFlairChoices :: MonadReddit m => SubredditName -> SubmissionID -> m (Seq FlairChoice) -- | Select a FlairChoice for a submission. selectSubmissionFlair :: MonadReddit m => FlairSelection -> SubmissionID -> m () -- | Search through Reddit Submissions, either side-wide or -- constrained to one subreddit. See mkSearch to create the -- initial Search search :: MonadReddit m => Search -> Paginator ResultID Submission -> m (Listing ResultID Submission) -- | Upvote a submission upvoteSubmission :: MonadReddit m => SubmissionID -> m () -- | Downvote a submission downvoteSubmission :: MonadReddit m => SubmissionID -> m () -- | Remove an existing vote on a submission unvoteSubmission :: MonadReddit m => SubmissionID -> m () -- | Report a submission to the subreddit's mods reportSubmission :: MonadReddit m => Report -> SubmissionID -> m () -- | Unmark a submission NSFW. The submission author can use this as well -- as the subreddit moderators unmarkNSFW :: MonadReddit m => SubmissionID -> m () -- | Mark a submission NSFW. The submission author can use this as well as -- the subreddit moderators markNSFW :: MonadReddit m => SubmissionID -> m () -- | Mark a submission as original content. In order for normal users to -- use this feature in addition to mods, the beta "Original Content" -- feature must be enabled in the subreddit settings setOC :: MonadReddit m => SubredditName -> SubmissionID -> m () -- | Unmark a submission as original content. In order for normal users to -- use this feature in addition to mods, the beta "Original Content" -- feature must be enabled in the subreddit settings unsetOC :: MonadReddit m => SubredditName -> SubmissionID -> m () -- | Mark the submission as containing spoilers setSpoiler :: MonadReddit m => SubmissionID -> m () -- | Unmark the submission as containing spoilers unsetSpoiler :: MonadReddit m => SubmissionID -> m () -- | A wrapper around SubmissionIDs that allows Listing ResultID -- a to be distinguished from Listing SubmissionID a newtype ResultID ResultID :: SubmissionID -> ResultID -- | The syntax to use in the Search data SearchSyntax Lucene :: SearchSyntax Cloudsearch :: SearchSyntax PlainSyntax :: SearchSyntax -- | The category for the Search data SearchCategory -- | The sort order for Searches data SearchSort ByRelevance :: SearchSort ByNew :: SearchSort ByHot :: SearchSort ByTop :: SearchSort ByComments :: SearchSort -- | Options for paginating and filtering Searches data SearchOpts SearchOpts :: SearchSort -> Time -> Maybe SearchCategory -> SearchOpts -- | The text to search, along with an optional SubredditName data Search Search :: Text -> Maybe SubredditName -> Maybe SearchSyntax -> Search -- | Wrapper for getting the URL from the JSON object that is returned when -- posting a new submissions data PostedSubmission -- | Represents richtext JSON object. This should be generated through an -- API endpoint data Fancypants -- | The type of inline media data InlineMediaType InlineImage :: InlineMediaType InlineGIF :: InlineMediaType InlineVideo :: InlineMediaType -- | A piece of inline media that can be added to a self-text post data InlineMedia InlineMedia :: InlineMediaType -> FilePath -> Text -> Maybe Body -> InlineMedia -- | A single image in a gallery submission data GalleryImage GalleryImage :: FilePath -> Maybe Body -> Maybe URL -> GalleryImage -- | A Reddit poll. See mkPoll to create a new one satisfying Reddit -- constraints on poll options and duration data Poll t Poll :: t Text -> Word -> Maybe Body -> Poll t -- | Options for crossposting a submission data CrosspostOptions CrosspostOptions :: SubredditName -> Title -> Bool -> Bool -> Bool -> Maybe FlairID -> Maybe FlairText -> CrosspostOptions -- | Used to upload style assets and images to Reddit's servers when -- submitting content data S3UploadLease S3UploadLease :: URL -> HashMap Text Text -> Text -> URL -> UploadURL -> S3UploadLease -- | The type of SubmissionOptions to submit to Reddit. In general, -- this should not be used directly. See instead the various -- submit actions in Network.Reddit.Submission data NewSubmission SelfPost :: Body -> SubmissionOptions -> NewSubmission -- | The body should be generated using InlineMedia and converted to -- "fancypants" style markdown. Please see submitWithInlineMedia, -- which handles this WithInlineMedia :: Fancypants -> SubmissionOptions -> NewSubmission Link :: URL -> SubmissionOptions -> NewSubmission -- | Please see submitImage in order to create an image submission. -- The URL must point to a valid image hosted by Reddit ImagePost :: UploadURL -> SubmissionOptions -> NewSubmission -- | See the note for ImagePost about UploadURLs. The -- Bool argument specifies if this is "videogif" media. The -- second UploadURL points to a Reddit-hosted thumbnail image VideoPost :: UploadURL -> UploadURL -> Bool -> SubmissionOptions -> NewSubmission -- | Components to create a new submission data SubmissionOptions SubmissionOptions :: Title -> SubredditName -> Bool -> Bool -> Bool -> Bool -> Maybe CollectionID -> Maybe FlairID -> Maybe FlairText -> SubmissionOptions -- | Data to create a new Collection as a moderator action data NewCollection NewCollection :: Title -> Body -> SubredditID -> Maybe CollectionLayout -> NewCollection -- | A UUID identifier for a Collection type CollectionID = Text -- | The layout of the Collection on the redesigned site data CollectionLayout Gallery :: CollectionLayout Timeline :: CollectionLayout -- | Represents a Reddit collection data Collection Collection :: CollectionID -> Username -> Title -> SubredditID -> Body -> URL -> UTCTime -> UTCTime -> Seq SubmissionID -> Seq Submission -> Maybe CollectionLayout -> Collection -- | Identifier for a PollOption type PollOptionID = Text -- | Single option in existing PollData data PollOption PollOption :: PollOptionID -> Body -> Integer -> PollOption -- | Data from an existing submission containing a poll. See Poll -- for submitting a new post with a poll data PollData PollData :: Seq PollOption -> Integer -> UTCTime -> Maybe PollOptionID -> PollData -- | The contents of the Submission. Can be a self-post with a -- plaintext and HTML body, an external link, or entirely empty data SubmissionContent SelfText :: Body -> Body -> SubmissionContent ExternalLink :: URL -> SubmissionContent EmptySubmission :: SubmissionContent -- | A submitted self-text post or link data Submission Submission :: SubmissionID -> Title -> Username -> SubmissionContent -> SubredditName -> UTCTime -> Maybe UTCTime -> URL -> Domain -> Integer -> Integer -> Maybe Integer -> Maybe Integer -> Maybe Rational -> Integer -> Seq ItemReport -> Seq ItemReport -> Maybe Integer -> Maybe Distinction -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe PollData -> Submission -- | Unique, site-wide ID for a Submission newtype SubmissionID SubmissionID :: Text -> SubmissionID -- | Create a SubmissionOptions with default values for most fields mkSubmissionOptions :: SubredditName -> Title -> SubmissionOptions -- | CrosspostOptions with default values for most fields mkCrosspostOptions :: SubredditName -> Title -> CrosspostOptions -- | Create a new Poll, validating the following constraints: * The -- duration is between 1 and 7 * The number of options -- is between 2 and 6 mkPoll :: (Foldable t, MonadThrow m) => t Text -> Word -> m (Poll t) -- | Create a GalleryImage with default values for the -- caption and outboundURL fields mkGalleryImage :: FilePath -> GalleryImage -- | Write an InlineMediaUpload in markdown format writeInlineMedia :: InlineMediaUpload -> Body -- | Create a new Search by providing the query, with defaults for -- the other fields mkSearch :: Text -> Search -- | Create a SearchCategory from Text, the length of which -- must not exceed 5 characters mkSearchCategory :: MonadThrow m => Text -> m SearchCategory -- | Actions related to moderation. Assume that each action in this module -- requires moderator privileges, unless stated otherwise module Network.Reddit.Moderation -- | Distinguish an item. See distinguishComment for further -- comment-specific options distinguishItem :: MonadReddit m => Distinction -> ItemID -> m () -- | Remove the distinction from an item, also removing the sticky flag for -- top-level comments undistinguishItem :: MonadReddit m => ItemID -> m () -- | Remove an item from the subreddit with an optional note to other mods. -- Setting the isSpam parameter to True will entirely -- remove the item from subreddit listings removeItem :: MonadReddit m => Maybe Body -> Bool -> ItemID -> m () -- | Send a removal message for an item. The precise action depends on the -- form of RemovalType sendRemovalMessage :: MonadReddit m => RemovalMessage -> m () -- | Approve an item, reverting a removal and resetting its report counter approveItem :: MonadReddit m => ItemID -> m () -- | Lock an item. See also unlockItem lockItem :: MonadReddit m => ItemID -> m () -- | Unlock an item unlockItem :: MonadReddit m => ItemID -> m () -- | Prevent all future reports on this item from sending notifications or -- appearing in moderation listings. See also unignoreItemReports, -- which reverses this action ignoreItemReports :: MonadReddit m => ItemID -> m () -- | Re-allow the item to trigger notifications and appear in moderation -- listings unignoreItemReports :: MonadReddit m => ItemID -> m () -- | Get a list of RemovalReasons for the given subreddit getRemovalReasons :: MonadReddit m => SubredditName -> m (Seq RemovalReason) -- | Create a new RemovalReason, returning the -- RemovalReasonID of the newly created reason createRemovalReason :: MonadReddit m => SubredditName -> Title -> Body -> m RemovalReasonID -- | Update a single RemovalReason updateRemovalReason :: MonadReddit m => SubredditName -> RemovalReason -> m () -- | Delete the given removal reason deleteRemovalReason :: MonadReddit m => SubredditName -> RemovalReasonID -> m () -- | Get the given subreddit's reported items getReports :: MonadReddit m => SubredditName -> Paginator ItemID ModItem -> m (Listing ItemID ModItem) -- | Get the given subreddit's moderation queue getModqueue :: MonadReddit m => SubredditName -> Paginator ItemID ModItem -> m (Listing ItemID ModItem) -- | Get the given subreddit's items marked as spam getSpam :: MonadReddit m => SubredditName -> Paginator ItemID ModItem -> m (Listing ItemID ModItem) -- | Get the given subreddit's recently edited items getEdited :: MonadReddit m => SubredditName -> Paginator ItemID ModItem -> m (Listing ItemID ModItem) -- | Get the given subreddit's unmoderated items getUnmoderated :: MonadReddit m => SubredditName -> Paginator ItemID ModItem -> m (Listing ItemID ModItem) -- | Get a log of moderator actions for the given subreddit getModlog :: MonadReddit m => SubredditName -> Paginator ModActionID ModAction -> m (Listing ModActionID ModAction) -- | Distinguish a submission distinguishSubmission :: MonadReddit m => Distinction -> SubmissionID -> m () -- | Remove the distinction from a submission undistinguishSubmission :: MonadReddit m => SubmissionID -> m () -- | Approve a submission. See approveItem approveSubmission :: MonadReddit m => SubmissionID -> m () -- | Lock a submission. See lockItem lockSubmission :: MonadReddit m => SubmissionID -> m () -- | Unlock a submission. See unlockItem unlockSubmission :: MonadReddit m => SubmissionID -> m () -- | Ignore reports for a submission. See ignoreItemReports ignoreSubmissionReports :: MonadReddit m => SubmissionID -> m () -- | Resume reports for a submission. See unignoreItemReports unignoreSubmissionReports :: MonadReddit m => SubmissionID -> m () -- | Unmark a submission NSFW. The submission author can use this as well -- as the subreddit moderators unmarkNSFW :: MonadReddit m => SubmissionID -> m () -- | Mark a submission NSFW. The submission author can use this as well as -- the subreddit moderators markNSFW :: MonadReddit m => SubmissionID -> m () -- | Mark a submission as original content. In order for normal users to -- use this feature in addition to mods, the beta "Original Content" -- feature must be enabled in the subreddit settings setOC :: MonadReddit m => SubredditName -> SubmissionID -> m () -- | Unmark a submission as original content. In order for normal users to -- use this feature in addition to mods, the beta "Original Content" -- feature must be enabled in the subreddit settings unsetOC :: MonadReddit m => SubredditName -> SubmissionID -> m () -- | Mark the submission as containing spoilers setSpoiler :: MonadReddit m => SubmissionID -> m () -- | Unmark the submission as containing spoilers unsetSpoiler :: MonadReddit m => SubmissionID -> m () -- | Sticky the submission in the subreddit stickySubmission :: MonadReddit m => Bool -> SubmissionID -> m () -- | Unsticky the submission in the subreddit unstickySubmission :: MonadReddit m => SubmissionID -> m () -- | Set the suggested sort order for a submission setSuggestedSort :: MonadReddit m => Maybe ItemSort -> SubmissionID -> m () -- | Show a comment that has been "collapsed" by crowd-control showComment :: MonadReddit m => CommentID -> m () -- | Distinguish aa comment. If True, the sticky param -- will set the comment at the top of the page. This only applies to -- top-level comments; the flg is otherwise ignored distinguishComment :: MonadReddit m => Distinction -> Bool -> CommentID -> m () -- | Undistinguish a comment, also removing its sticky flag if applicable undistinguishComment :: MonadReddit m => CommentID -> m () -- | Approve a comment. See approveItem approveComment :: MonadReddit m => CommentID -> m () -- | Lock a comment. See lockItem lockComment :: MonadReddit m => CommentID -> m () -- | Unlock a comment. See unlockItem unlockComment :: MonadReddit m => CommentID -> m () -- | Ignore reports for a comment. See ignoreItemReports ignoreCommentReports :: MonadReddit m => CommentID -> m () -- | Resume reports for a comment. See unignoreItemReports unignoreCommentReports :: MonadReddit m => CommentID -> m () -- | Create a new collection, returning the new Collection upon -- success createCollection :: MonadReddit m => NewCollection -> m Collection -- | Delete the entire collection from the subreddit deleteCollection :: MonadReddit m => CollectionID -> m () -- | Add a submission to a collection addSubmissionToCollection :: MonadReddit m => CollectionID -> SubmissionID -> m () -- | Remove a submission from a collection removeSubmissionFromCollection :: MonadReddit m => CollectionID -> SubmissionID -> m () -- | Reorder the submissions that comprise the collection by providing a -- container of SubmissionIDs in the new intended order reorderCollection :: (MonadReddit m, Foldable t) => CollectionID -> t SubmissionID -> m () -- | Update the description of the collection updateCollectionDescription :: MonadReddit m => CollectionID -> Body -> m () -- | Update the title of the collection updateCollectionTitle :: MonadReddit m => CollectionID -> Title -> m () -- | Get a list of information on all moderators for the given subreddit getModerators :: MonadReddit m => SubredditName -> m (Seq ModAccount) -- | Get information about a single moderator, if such a moderator exists getModerator :: MonadReddit m => SubredditName -> Username -> m (Maybe ModAccount) -- | Update the permissions granted to a current moderator updateModerator :: (MonadReddit m, Foldable t) => Maybe (t ModPermission) -> SubredditName -> Username -> m () -- | Revoke the given user's mod status removeModerator :: MonadReddit m => SubredditName -> Username -> m () -- | Revoke the authenticated user's mod status in the given subreddit. -- Caution! abdicateModerator :: MonadReddit m => SubredditName -> m () -- | Invite a user to moderate the subreddit. This action will implicitly -- grant the invitee all moderator permissions on the subreddit. To -- control which specific set of permissions the invitee shall be allowed -- instead, see inviteModeratorWithPerms inviteModerator :: MonadReddit m => SubredditName -> Username -> m () -- | Invite a user to moderate the subreddit with a specific set of -- permissions inviteModeratorWithPerms :: (MonadReddit m, Foldable t) => t ModPermission -> SubredditName -> Username -> m () -- | Get a listing of users invited to moderate the subreddit. This -- endpoint only returns 25 results at a time, and does not use the -- Listing mechanism that prevails elsewhere. You can paginate -- through all invitees by passing previous ModInviteeList results -- to subsequent invocations getInvitees :: MonadReddit m => Maybe ModInviteeList -> SubredditName -> m ModInviteeList -- | Get information about a single invited user getInvitee :: MonadReddit m => SubredditName -> Username -> m (Maybe ModInvitee) -- | Update the permissions granted to the mod invitee updateInvitation :: (MonadReddit m, Foldable t) => Maybe (t ModPermission) -> SubredditName -> Username -> m () -- | Revoke an existing moderator invitation for the given user revokeInvitation :: MonadReddit m => SubredditName -> Username -> m () -- | Accept the invitation issued to the authenticated user to moderate the -- given subreddit acceptInvitation :: MonadReddit m => SubredditName -> m () -- | Get a list of contributors on the subreddit getContributors :: MonadReddit m => SubredditName -> Paginator RelID RelInfo -> m (Listing RelID RelInfo) -- | Get a single contributor, if such a user exists getContributor :: MonadReddit m => SubredditName -> Username -> m (Maybe RelInfo) -- | Give a user contributor status on the subreddit addContributor :: MonadReddit m => SubredditName -> Username -> m () -- | Remove a contributor from the subreddit removeContributor :: MonadReddit m => SubredditName -> Username -> m () -- | AbdicateModerator your contributor status on the given subreddit abdicateContributor :: MonadReddit m => SubredditID -> m () -- | Get a list of wiki contributors on the subreddit getWikiContributors :: MonadReddit m => SubredditName -> Paginator RelID RelInfo -> m (Listing RelID RelInfo) -- | Get a single wiki contributor, if such a user exists getWikiContributor :: MonadReddit m => SubredditName -> Username -> m (Maybe RelInfo) -- | Give a user wiki contributor privileges on the subreddit addWikiContributor :: MonadReddit m => SubredditName -> Username -> m () -- | Revoke wiki contributor privileges on the subreddit removeWikiContributor :: MonadReddit m => SubredditName -> Username -> m () -- | Get the banned users for a given subreddit getBans :: MonadReddit m => SubredditName -> Paginator RelID Ban -> m (Listing RelID Ban) -- | Check to see if a given user is banned on a particular subreddit, -- returning the details of the Ban if so getBan :: MonadReddit m => SubredditName -> Username -> m (Maybe Ban) -- | Issue a ban against a user on the given subreddit, with the provided -- notes and (optional) duration banUser :: MonadReddit m => BanNotes -> SubredditName -> Username -> m () -- | Remove an existing ban on a user unbanUser :: MonadReddit m => SubredditName -> Username -> m () -- | Get a list of users banned on the subreddit wiki getWikibans :: MonadReddit m => SubredditName -> Paginator RelID RelInfo -> m (Listing RelID RelInfo) -- | Get information on a single user banned on the subreddit wiki, if such -- a ban exists getWikiban :: MonadReddit m => SubredditName -> Username -> m (Maybe RelInfo) -- | Ban a user from participating in the wiki wikibanUser :: MonadReddit m => BanNotes -> SubredditName -> Username -> m () -- | Reverse an existing wiki ban for a user wikiUnbanUser :: MonadReddit m => SubredditName -> Username -> m () -- | Get a list of users muted on the subreddit wiki getMuted :: MonadReddit m => SubredditName -> Paginator MuteID MuteInfo -> m (Listing MuteID MuteInfo) -- | Get information on a single user muted on the subreddit wiki, if such -- a ban exists getMutedUser :: MonadReddit m => SubredditName -> Username -> m (Maybe MuteInfo) -- | Unmute a single user on the subreddit unmuteUser :: MonadReddit m => SubredditName -> Username -> m () -- | Mute a single user on the subreddit muteUser :: MonadReddit m => BanNotes -> SubredditName -> Username -> m () -- | Get the configured SubredditSettings for a given subreddit getSubredditSettings :: MonadReddit m => SubredditName -> m SubredditSettings -- | Configure a subreddit with the provided SubredditSettings setSubredditSettings :: MonadReddit m => SubredditSettings -> m () -- | Add a rule to the subreddit. The newly created SubredditRule is -- returned upon success addSubredditRule :: MonadReddit m => SubredditName -> NewSubredditRule -> m SubredditRule -- | Delete the rule identified by the given name from the subreddit deleteSubredditRule :: MonadReddit m => SubredditName -> Name -> m () -- | Update an existing subreddit rule. You must provide the -- shortName of the existing rule as a parameter in order for -- Reddit to identify the rule. The shortName can be changed by -- updating the SubredditRule record, however updateSubredditRule :: MonadReddit m => SubredditName -> Name -> SubredditRule -> m SubredditRule -- | Reorder the subreddit rules reorderSubredditRules :: (MonadReddit m, Foldable t) => SubredditName -> t Name -> m () -- | Get a list of usernames and the flair currently assigned to them getFlairList :: MonadReddit m => SubredditName -> Paginator UserID AssignedFlair -> m (Listing UserID AssignedFlair) -- | Get the UserFlair that corresponds to a Username getUserFlair :: MonadReddit m => SubredditName -> Username -> m (Maybe UserFlair) -- | Set a user's flair. If the CSSClass is provided in the -- FlairChoice, it takes precedence over the FlairID -- contained in that record setUserFlair :: MonadReddit m => FlairSelection -> Username -> m () -- | Set, update, or deleteSRImage the flair of multiple users at once, -- given a container of AssignedFlairs setUserFlairs :: (MonadReddit m, Foldable t) => SubredditName -> t AssignedFlair -> m (Seq FlairResult) -- | Delete a user's flair on the given subreddit deleteUserFlair :: MonadReddit m => SubredditName -> Username -> m () -- | Create a new FlairTemplate for either users or submissions, -- returning the newly created template createFlairTemplate :: MonadReddit m => FlairType -> SubredditName -> FlairTemplate -> m FlairTemplate -- | Update an existing FlairTemplate for either users or -- submissions updateFlairTemplate :: MonadReddit m => FlairType -> SubredditName -> FlairTemplate -> m () -- | Create a new FlairTemplate for users, returning the newly -- created template createUserFlairTemplate :: MonadReddit m => SubredditName -> FlairTemplate -> m FlairTemplate -- | Create a new FlairTemplate for submissions, returning the newly -- created template createSubmissionFlairTemplate :: MonadReddit m => SubredditName -> FlairTemplate -> m FlairTemplate -- | Update an existing FlairTemplate for submissions updateSubmissionFlairTemplate :: MonadReddit m => SubredditName -> FlairTemplate -> m () -- | Update an existing FlairTemplate for users updateUserFlairTemplate :: MonadReddit m => SubredditName -> FlairTemplate -> m () -- | Delete a user or submission flair template given its FlairID deleteFlairTemplate :: MonadReddit m => SubredditName -> FlairID -> m () -- | Clear all of the user flair templates on the subreddit clearUserFlairTemplates :: MonadReddit m => SubredditName -> m () -- | Clear all of the user flair templates on the subreddit clearSubmissionFlairTemplates :: MonadReddit m => SubredditName -> m () -- | Clear all of the user or submission flair templates on the subreddit clearFlairTemplates :: MonadReddit m => FlairType -> SubredditName -> m () -- | Get the Stylesheet that has been configured for the given -- subreddit getStylesheet :: MonadReddit m => SubredditName -> m Stylesheet -- | Update a given subreddit's stylesheet with new contents, which must be -- valid CSS updateStylesheet :: MonadReddit m => SubredditName -> Maybe Text -> Text -> m () -- | Upload an image file to add to the given subreddit's stylesheet uploadImage :: MonadReddit m => Text -> FilePath -> SubredditName -> m () -- | Upload the image header for the given subreddit's stylesheet uploadHeader :: MonadReddit m => Text -> FilePath -> SubredditName -> m () -- | Upload a mobile icon for the given subreddit uploadMobileIcon :: MonadReddit m => Text -> FilePath -> SubredditName -> m () -- | Upload the mobile header for the given subreddit uploadMobileHeader :: MonadReddit m => Text -> FilePath -> SubredditName -> m () -- | Delete the named image from the given subreddit's stylesheet deleteImage :: MonadReddit m => Text -> SubredditName -> m () -- | Delete header image from the given subreddit deleteHeader :: MonadReddit m => SubredditName -> m () -- | Delete the named image from the given subreddit's stylesheet deleteMobileIcon :: MonadReddit m => Text -> SubredditName -> m () -- | Upload a banner for the subreddit (redesign only) uploadBanner :: MonadReddit m => SubredditName -> FilePath -> m () -- | Delete the subreddit banner, even if it does not exist (redesign only) deleteBanner :: MonadReddit m => SubredditName -> m () -- | Upload the additional image banner for the subreddit (redesign only) uploadBannerAdditional :: MonadReddit m => Maybe StyleImageAlignment -> SubredditName -> FilePath -> m () -- | Delete all additional banners, including the hover banner (redesign -- only) deleteBannerAdditional :: MonadReddit m => SubredditName -> m () -- | Upload the banner hover image for the subreddit (redesign only) uploadBannerHover :: MonadReddit m => SubredditName -> FilePath -> m () -- | Delete the subreddit banner hover image (redesign only) deleteBannerHover :: MonadReddit m => SubredditName -> m () -- | Grant editing privileges to the given Username on the -- subreddit's wikipage addWikiEditor :: MonadReddit m => SubredditName -> WikiPageName -> Username -> m () -- | Revoke the given Username's editing privileges on the -- subreddit's wikipage removeWikiEditor :: MonadReddit m => SubredditName -> WikiPageName -> Username -> m () -- | Get the WikiPageSettings for the subreddit's given wikipage getWikiPageSettings :: MonadReddit m => SubredditName -> WikiPageName -> m WikiPageSettings -- | Revert the wikipage to the given revision revertWikiPage :: MonadReddit m => SubredditName -> WikiPageName -> WikiRevisionID -> m () -- | Get all of the authenticated user's modmail. See -- getModmailWithOpts in order to control how modmail is sorted or -- filtered getModmail :: MonadReddit m => m Modmail -- | Get the authenticated user's modmail with the provided -- ModmailOpts getModmailWithOpts :: MonadReddit m => ModmailOpts -> m Modmail -- | Get a single ModmailConversation given its ID getModmailConversation :: MonadReddit m => ModmailID -> m ModmailConversation -- | Get the number of unread modmail conversations according to -- conversation state getUnreadModmailCount :: MonadReddit m => m (HashMap ModmailState Word) -- | Reply to the modmail conversation replyToConversation :: MonadReddit m => ModmailReply -> ModmailID -> m ModmailConversation -- | Archive a modmail conversation archiveConversation :: MonadReddit m => ModmailID -> m () -- | Archive a modmail conversation unarchiveConversation :: MonadReddit m => ModmailID -> m () -- | Highlight a given conversation highlightConversation :: MonadReddit m => ModmailID -> m () -- | Unhighlight a given conversation unhighlightConversation :: MonadReddit m => ModmailID -> m () -- | Mark the conversations corresponding to a container of -- ModmailIDs as read markConversationsRead :: (Foldable t, MonadReddit m) => t ModmailID -> m () -- | Mark the conversation corresponding to a single ModmailID as -- read markConversationRead :: MonadReddit m => ModmailID -> m () -- | Mark the conversations corresponding to a container of -- ModmailIDs as unread markConversationsUnread :: (Foldable t, MonadReddit m) => t ModmailID -> m () -- | Mark the conversation corresponding to a single ModmailID as -- unread markConversationUnread :: MonadReddit m => ModmailID -> m () -- | Mark all mail belonging to the subreddits as read, returning the -- ModmailIDs of the newly read conversations bulkReadConversations :: (MonadReddit m, Foldable t) => Maybe ModmailState -> t SubredditName -> m (Seq ModmailID) -- | Mute the non-moderator user associated with the modmail conversation. -- Valid durations for the days parameter are 3, 7, and 28 muteModmailUser :: MonadReddit m => Word -> ModmailID -> m () -- | Unmute the non-moderator user associated with the modmail conversation unmuteModmailUser :: MonadReddit m => ModmailID -> m () -- | Create a new ModmailConversation createConversation :: MonadReddit m => NewConversation -> m ModmailConversation -- | Delete a widget, given its ID deleteWidget :: MonadReddit m => SubredditName -> WidgetID -> m () -- | Update an existing widget, given its ID. You must wrap the widget type -- in the appropriate Widget constructors, as this action may be -- performed on heterogeneous widget types. The update widget is returned -- upon success updateWidget :: MonadReddit m => SubredditName -> WidgetID -> Widget -> m Widget -- | Reorder the widgets corresponding to a container of widget IDs in the -- given section. At the moment, reddit does not allow for the -- Topbar to be reordered. If you attempt to reorder this section, -- you might receive an InvalidJSON exception reorderWidgets :: (MonadReddit m, Foldable t) => Maybe WidgetSection -> SubredditName -> t WidgetID -> m () -- | Add a button widget. Returns the created widget upon success. See the -- docs for ButtonWidget for the available options addButtonWidget :: MonadReddit m => SubredditName -> ButtonWidget -> m ButtonWidget -- | Add a calendar widget, which requires an active Google account and -- public calendar. Returns the created widget upon success. See the docs -- for CalendarWidget for the available options addCalendarWidget :: MonadReddit m => Maybe Body -> SubredditName -> CalendarWidget -> m CalendarWidget -- | Add a community list widget. Returns the created widget upon success. -- See the docs for CommunityListWidget for the available options addCommunityListWidget :: MonadReddit m => Maybe Body -> SubredditName -> CommunityListWidget -> m CommunityListWidget -- | Add a custom widget. Returns the created widget upon success. See the -- docs for CustomWidget for the available options addCustomWidget :: MonadReddit m => SubredditName -> CustomWidget -> m CustomWidget -- | Add an image widget. Returns the created widget upon success. See the -- docs for ImageWidget for the available options addImageWidget :: MonadReddit m => SubredditName -> ImageWidget -> m ImageWidget -- | Add a menu widget. Returns the created widget upon success. See the -- docs for MenuWidget for the available options addMenuWidget :: MonadReddit m => SubredditName -> MenuWidget -> m MenuWidget -- | Add a post flair widget. Returns the created widget upon success. See -- the docs for PostFlairWidget for the available options along -- with mkPostFlairWidget addPostFlairWidget :: MonadReddit m => SubredditName -> PostFlairWidget -> m PostFlairWidget -- | Add a text area widget. Returns the created widget upon success. See -- the docs for TextAreaWidget for the available options as well -- as mkTextAreaWidget addTextAreaWidget :: MonadReddit m => SubredditName -> TextAreaWidget -> m TextAreaWidget -- | Upload a widget image from a filepath. This returns the URL of the new -- image, which is required for creating certain widgets uploadWidgetImage :: MonadReddit m => SubredditName -> FilePath -> m UploadURL -- | Add a new emoji by uploading an image. See mkEmoji to -- conveniently create new Emojis to add. Also note the -- restrictions on the filepath argument below, which are not currently -- validated by this action. This action can also be used to update the -- image for an existing emoji (see getSubredditEmoji) to get a -- list of emojis for a subreddit addEmoji :: MonadReddit m => SubredditName -> FilePath -> Emoji -> m () -- | Delete a single emoji and associated s3 image deleteEmoji :: MonadReddit m => SubredditName -> EmojiName -> m () -- | Update an emoji. Only the boolean permissions fields will be sent. If -- you would like to change the image associated with the emoji name, use -- addEmoji with an updated filepath updateEmoji :: MonadReddit m => SubredditName -> Emoji -> m () -- | Set the (h, w) dimensions for all custom emojis on the -- subreddit. Both dimensions must be between 16px and 40px. A -- Nothing argument will disable custom sizes setCustomEmojiSize :: MonadReddit m => SubredditName -> Maybe (Int, Int) -> m () -- | Get traffic statistics for the given subreddit getTraffic :: MonadReddit m => SubredditName -> m Traffic -- | The language in which the subreddit is available, as configured in the -- SubredditSettings data LanguageCode pattern ZH :: LanguageCode pattern VI :: LanguageCode pattern UK :: LanguageCode pattern TR :: LanguageCode pattern TH :: LanguageCode pattern TA :: LanguageCode pattern SV :: LanguageCode pattern SR :: LanguageCode pattern SL :: LanguageCode pattern SK :: LanguageCode pattern RU :: LanguageCode pattern RO :: LanguageCode pattern PT :: LanguageCode pattern PL :: LanguageCode pattern NO :: LanguageCode pattern NN :: LanguageCode pattern NL :: LanguageCode pattern MS :: LanguageCode pattern LV :: LanguageCode pattern LA :: LanguageCode pattern KO :: LanguageCode pattern JA :: LanguageCode pattern IT :: LanguageCode pattern IS :: LanguageCode pattern ID :: LanguageCode pattern HY :: LanguageCode pattern HU :: LanguageCode pattern HR :: LanguageCode pattern HI :: LanguageCode pattern HE :: LanguageCode pattern GD :: LanguageCode pattern FR :: LanguageCode pattern FI :: LanguageCode pattern FA :: LanguageCode pattern EU :: LanguageCode pattern ES :: LanguageCode pattern EO :: LanguageCode pattern EN :: LanguageCode pattern EL :: LanguageCode pattern DE :: LanguageCode pattern DA :: LanguageCode pattern CY :: LanguageCode pattern CS :: LanguageCode pattern CA :: LanguageCode pattern BS :: LanguageCode pattern BG :: LanguageCode pattern AR :: LanguageCode pattern AF :: LanguageCode pattern GL :: LanguageCode pattern ET :: LanguageCode pattern LT :: LanguageCode pattern BE :: LanguageCode -- | Traffic statistics for a given subreddit data Traffic Traffic :: Seq TrafficStat -> Seq TrafficStat -> Seq TrafficStat -> Traffic -- | An individual statistic for a subreddit's traffic data TrafficStat TrafficStat :: UTCTime -> Integer -> Integer -> Maybe Integer -> TrafficStat -- | Alignment for certain StructuredStyleImages data StyleImageAlignment LeftAligned :: StyleImageAlignment CenterAligned :: StyleImageAlignment RightAligned :: StyleImageAlignment -- | Represents one of the style images that may be uploaded data StructuredStyleImage BannerBackground :: StructuredStyleImage BannerAdditional :: StructuredStyleImage BannerHover :: StructuredStyleImage -- | Used to upload style assets and images to Reddit's servers with -- moderator privileges data S3ModerationLease S3ModerationLease :: URL -> HashMap Text Text -> Text -> URL -> S3ModerationLease -- | An image belonging to a Stylesheet data SubredditImage SubredditImage :: Name -> Text -> URL -> SubredditImage -- | The CSS stylesheet and images for a subreddit data Stylesheet Stylesheet :: Text -> Seq SubredditImage -> SubredditID -> Stylesheet -- | Classification for ModActions data ModActionType BanUser :: ModActionType UnbanUser :: ModActionType SpamLink :: ModActionType RemoveLink :: ModActionType ApproveLink :: ModActionType SpamComment :: ModActionType RemoveComment :: ModActionType ApproveComment :: ModActionType AddModerator :: ModActionType ShowComment :: ModActionType InviteModerator :: ModActionType UninviteModerator :: ModActionType AcceptModeratorInvite :: ModActionType RemoveModerator :: ModActionType AddContributor :: ModActionType RemoveContributor :: ModActionType EditSettings :: ModActionType EditFlair :: ModActionType Distinguish :: ModActionType MarkNSFW :: ModActionType WikiBanned :: ModActionType WikiContrib :: ModActionType WikiUnbanned :: ModActionType WikiPageListed :: ModActionType RemoveWikiContributor :: ModActionType WikiRevise :: ModActionType WikiPermLevel :: ModActionType IgnoreReports :: ModActionType UnignoreReports :: ModActionType SetPermissions :: ModActionType SetSuggestedSort :: ModActionType Sticky :: ModActionType Unsticky :: ModActionType SetContestMode :: ModActionType UnsetContestMode :: ModActionType Lock :: ModActionType Unlock :: ModActionType MuteUser :: ModActionType UnmuteUser :: ModActionType CreateRule :: ModActionType EditRule :: ModActionType ReorderRules :: ModActionType DeleteRule :: ModActionType Spoiler :: ModActionType Unspoiler :: ModActionType MarkOriginalContent :: ModActionType Collections :: ModActionType Events :: ModActionType DeleteOverriddenClassification :: ModActionType OverrideClassification :: ModActionType ReorderModerators :: ModActionType SnoozeReports :: ModActionType UnsnoozeReports :: ModActionType OtherModAction :: ModActionType -- | Identifier for an issued ModAction data ModActionID -- | Options for filtering/paginating Listings of ModActions data ModActionOpts ModActionOpts :: Maybe ModActionType -> Maybe Username -> ModActionOpts -- | An action issued by a moderator. The various fields prefixed -- target can refer to comments or submissions, where applicable data ModAction ModAction :: ModActionID -> Username -> ModActionType -> UTCTime -> Maybe Body -> Maybe Text -> Maybe ItemID -> Maybe Username -> Maybe Title -> Maybe URL -> ModAction -- | A new, mod-created modmail conversation data NewConversation NewConversation :: Body -> Subject -> Username -> SubredditName -> Bool -> NewConversation -- | A new reply to a ModmailConversation data ModmailReply ModmailReply :: Body -> Bool -> Bool -> ModmailReply -- | The state of the modmail, for use when filtering mail data ModmailState AllModmail :: ModmailState NewModmail :: ModmailState Appeals :: ModmailState Notifications :: ModmailState Inbox :: ModmailState InProgress :: ModmailState ArchivedMail :: ModmailState Highlighted :: ModmailState JoinRequests :: ModmailState ModModmail :: ModmailState -- | Order to sort modmail in data ModmailSort FromUser :: ModmailSort FromMod :: ModmailSort RecentMail :: ModmailSort UnreadMail :: ModmailSort -- | Options for filtering/paginating modmail endpoints. Notably, this is -- an entirely different mechanism than the usual Listings -- elsewhere on Reddit data ModmailOpts ModmailOpts :: Maybe ModmailID -> Maybe [SubredditName] -> Maybe Word -> Maybe ModmailSort -> Maybe ModmailState -> ModmailOpts -- | An author in a ModmailConversation; can be either a mod or a -- non-mod user data ModmailAuthor ModmailAuthor :: Username -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> ModmailAuthor -- | A single message in a ModmailConversation data ModmailMessage ModmailMessage :: Text -> ModmailAuthor -> Body -> Body -> UTCTime -> Bool -> ModmailMessage -- | A mapping to a modmail action to its ID data ModmailObjID ModmailObjID :: Text -> Text -> ModmailObjID -- | The ID of a particular modmail conversation type ModmailID = Text -- | A single modmail conversation data ModmailConversation ModmailConversation :: ModmailID -> Subject -> Seq ModmailMessage -> Integer -> SubredditName -> Maybe ModmailAuthor -> Seq ModmailObjID -> UTCTime -> Maybe UTCTime -> Maybe UTCTime -> Bool -> Bool -> ModmailConversation -- | Moderator mail. Reddit no longer supports the older, message-based -- interface for modmail newtype Modmail Modmail :: Seq ModmailConversation -> Modmail -- | Details of a new ban to apply to a user data BanNotes BanNotes :: Body -> Body -> Maybe Word -> Body -> BanNotes -- | Identifies relationships representing muted users newtype MuteID MuteID :: Text -> MuteID -- | Uniquely identifies a subreddit relationship, excluding mutes (see -- MuteID) newtype RelID RelID :: Text -> RelID -- | Represents an account that has been banned from a particular subreddit data Ban Ban :: RelID -> Username -> UserID -> Maybe Text -> UTCTime -> Maybe Word -> Ban -- | The editing mode for a subreddit's wiki data Wikimode -- | Only mods can edit EditDisabled :: Wikimode -- | Only mods and approved editors can edit ApprovedEdit :: Wikimode -- | Any sub contributor can edit ContributorEdit :: Wikimode -- | The strength of the subreddit's spam filter data SpamFilter LowFilter :: SpamFilter HighFilter :: SpamFilter AllFilter :: SpamFilter -- | Permissible submissions on the subreddit data ContentOptions AnyContent :: ContentOptions LinkOnly :: ContentOptions SelfOnly :: ContentOptions -- | The privacy level for the subreddit data SubredditType Public :: SubredditType Restricted :: SubredditType Private :: SubredditType Archived :: SubredditType GoldRestricted :: SubredditType EmployeesOnly :: SubredditType GoldOnly :: SubredditType UserSubreddit :: SubredditType -- | The setting for crowd controls, from lenient to strict data CrowdControlLevel Zero :: CrowdControlLevel One :: CrowdControlLevel Two :: CrowdControlLevel Three :: CrowdControlLevel -- | The settings that may be configured for a particular subreddit data SubredditSettings SubredditSettings :: SubredditID -> Title -> Body -> Text -> Text -> Text -> LanguageCode -> SubredditType -> ContentOptions -> RGBText -> Wikimode -> Integer -> Integer -> Integer -> SpamFilter -> SpamFilter -> SpamFilter -> CrowdControlLevel -> CrowdControlLevel -> Bool -> Maybe ItemSort -> Maybe Text -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> SubredditSettings -- | Options for Listings of RelInfo. Currently only takes a -- single field, user, to limit the listing to a single user data RelInfoOpts RelInfoOpts :: Maybe Username -> RelInfoOpts -- | Information about a muted user data MuteInfo MuteInfo :: UserID -> MuteID -> Username -> UTCTime -> MuteInfo -- | Information about a contributor on the subreddit data RelInfo RelInfo :: UserID -> RelID -> Username -> UTCTime -> RelInfo -- | Account information about a moderator, similar to a Account, -- but with less information data ModAccount ModAccount :: Username -> UserID -> RelID -> Maybe FlairText -> Maybe CSSClass -> UTCTime -> Maybe (Seq ModPermission) -> ModAccount -- | A list containing users invited to moderate the subreddit. For some -- reason, the endpoints listing moderator invites do not use the same -- Listing mechanism that most other endpoints do data ModInviteeList ModInviteeList :: Seq ModInvitee -> Bool -> Maybe UserID -> Maybe UserID -> ModInviteeList -- | Information about a user who has been invited to moderate the -- subreddit data ModInvitee ModInvitee :: UserID -> Username -> Maybe FlairText -> HashMap ModPermission Bool -> UTCTime -> Integer -> ModInvitee -- | The types of relationships that mods can manipulate data SubredditRelationship Mod :: SubredditRelationship ModInvitation :: SubredditRelationship Contributor :: SubredditRelationship BannedFromWiki :: SubredditRelationship WikiContributor :: SubredditRelationship Banned :: SubredditRelationship Muted :: SubredditRelationship -- | Various permissions that can be afforded to moderators and invitees data ModPermission Access :: ModPermission Flair :: ModPermission Mail :: ModPermission Configuration :: ModPermission ChatConfig :: ModPermission ChatOperator :: ModPermission Posts :: ModPermission Wiki :: ModPermission data NewRemovalReasonID -- | Identifier for a RemovalReason type RemovalReasonID = Text -- | A subreddit-specific reason for item removal data RemovalReason RemovalReason :: RemovalReasonID -> Body -> Title -> RemovalReason -- | Controls how the RemovalMessage will be disseminated data RemovalType -- | Leaves the message as a public comment PublicComment :: RemovalType -- | Leaves moderator note with exposed username PrivateExposed :: RemovalType -- | Leaves mod note with hidden username PrivateHidden :: RemovalType -- | A message to explain/note the removal an Item data RemovalMessage RemovalMessage :: ItemID -> Body -> Title -> RemovalType -> RemovalMessage -- | Options for Listings of ModItems. Only contains one -- field, only to constrain the request to a single type (i.e. -- comments or links) data ModItemOpts ModItemOpts :: Maybe ItemType -> ModItemOpts -- | An Item of interest to moderators (spam, modqueue, etc...) newtype ModItem ModItem :: Item -> ModItem -- | Default options for filtering modmail defaultModmailOpts :: ModmailOpts -- | ModmailReply with default values for boolean fields mkModmailReply :: Body -> ModmailReply module Network.Reddit -- | Create a new Client for API access, given an AuthConfig. -- This client is required to run all actions in this library. -- -- See loadClient if you have a ScriptApp or -- ApplicationOnly app and would like to load your auth details -- from an ini file newClient :: (MonadUnliftIO m, MonadThrow m) => AuthConfig -> m Client -- | Create a new client with an existing refresh token, for WebApps -- and InstalledApps. The initial refresh token is provided with a -- TokenManager that will also handle saving and loading refresh -- tokens over the life of the new Client newClientWithManager :: (MonadUnliftIO m, MonadCatch m) => TokenManager -> AuthConfig -> m Client -- | Load a client from saved credentials, which are stored in an ini file. -- Files should conform to the following formats: -- -- For ScriptApps: -- --
-- [NAME] -- id = <clientID> -- secret = <clientSecret> -- username = <username> -- password = <password> -- agent = <platform>,<appID>,<version>,<author> ---- -- For ApplicationOnly apps without a user context: -- --
-- [NAME] -- id = <clientID> -- secret = <clientSecret> -- agent = <platform>,<appID>,<version>,<author> ---- -- Where NAME corresponds to a ClientSite that you pass to this -- function. You can have various different distinct sites in a single -- ini file. When invoking this function, if the provided client site is -- Nothing, a section labeled [DEFAULT] will be used. -- If none is provided, an exception will be thrown. Note that all -- section labels are case-insensitive. -- -- The following locations are searched for an ini file, in order: -- --
-- >>> tryReddit @APIException c $ getUserFlairTemplates =<< mkSubredditName "haskell"
-- Left (ErrorWithStatus (StatusMessage {statusCode = 403, message = "Forbidden"}))
--
tryReddit :: forall e a m. (Exception e, MonadCatch m, MonadIO m) => Client -> RedditT m a -> m (Either e a)
-- | Get current information on rate limiting, if any
getRateLimits :: MonadReddit m => m (Maybe RateLimits)
-- | Run the provided MonadReddit action with a delay, if
-- rate-limiting information is currently available
withRateLimitDelay :: MonadReddit m => m a -> m a
-- | This is an example TokenManager that can be used to store and
-- retrieve OAUth refresh tokens, which could be used with
-- newClientWithManager. For a real application, you would
-- probably want to use a more sophisticated manager
fileTokenManager :: Exception e => e -> FilePath -> TokenManager
-- | Convenience wrapper for actions taking a Paginator and which
-- return a Listing. This runs the action with a default initial
-- paginator, and extracts the children from the returned
-- Listing. This discards all of the pagination controls that are
-- returned in the Listing. This is useful if you only care
-- about the child contents of the first "page" of results
--
-- For example, to get only the first page of results for a user's
-- comments, you could use the following:
--
-- -- runReddit yourClient . firstPage $ getUserComments someUsername --firstPage :: (MonadReddit m, Paginable a) => (Paginator t a -> m (Listing t a)) -> m (Seq a) -- | Update a Paginator with a Listing to make a query for -- the next "page" of content. If the first argument is Nothing, -- defaults will be used for the options, partially depending on the type -- of paginator -- -- Note: You cannot supply both the before and -- after fields when making requests to API endpoints. If both -- fields are Just in the Paginator you get back from -- this function, the after field will take precedence. If you -- want to use before in such a scenario, make sure to set it to -- Nothing before using the paginator in an action -- -- Example: -- --
-- >>> best1 <- runReddit yourClient $ getBest emptyPaginator -- -- >>> best2 <- runReddit yourClient . getBest $ nextPage Nothing best1 --nextPage :: forall t a. Paginable a => Maybe (Paginator t a) -> Listing t a -> Paginator t a -- | An empty, default Paginator. Includes the default -- PaginateOptions for the type a emptyPaginator :: forall t a. Paginable a => Paginator t a -- | Transform an action producing a Listing of items into an -- infinite stream. Items are pushed to the stream as they are fetched, -- with oldest items yielded first. New items are fetched in 100-item -- batches. If nothing new arrives in the stream, a jittered exponential -- backoff is applied, up to a cap of ~16s, resetting once new items -- arrive again. -- -- For example, to fetch new submissions published to "r/haskell", as -- they are created, and print their IDs to the console: -- --
-- >>> import Conduit -- -- >>> subName <- mkSubredditName "haskell" -- -- >>> action = getNewSubmissions subName -- -- >>> printTitle = liftIO . print . (^. #title) -- -- >>> runReddit c . runConduit $ stream Nothing action .| mapM_C printTitle -- SubmissionID "o6948i" -- SubmissionID "o6b0w0" -- SubmissionID "o6cqof" -- SubmissionID "o6ddl9" -- SubmissionID "o6dlas" -- ... --stream :: forall m t a. (MonadReddit m, Paginable a, t ~ PaginateThing a) => Maybe Bool -> (Paginator t a -> m (Listing t a)) -> ConduitT () a m () -- | Synonym for constraints that RedditT actions must satisfy type MonadReddit m = (MonadUnliftIO m, MonadThrow m, MonadCatch m, MonadReader Client m) -- | The monad tranformer in which Reddit API transactions can be executed data RedditT m a -- | A client facilitating access to Reddit's API data Client Client :: AuthConfig -> Manager -> IORef ClientState -> Maybe TokenManager -> Client -- | Rate limit info data RateLimits RateLimits :: Integer -> Integer -> POSIXTime -> POSIXTime -> RateLimits -- | Certain API endpoints are listings, which can be paginated -- and filtered using a Paginator data Listing t a Listing :: Maybe t -> Maybe t -> Seq a -> Listing t a -- | This represents the protocol that Reddit uses to control paginating -- and filtering entries. These can be applied to Listing -- endpoints. The first four fields below are common parameters that are -- applied to each Listing. The opts field takes extended -- PaginateOptions based on the second type parameter data Paginator t a Paginator :: Maybe t -> Maybe t -> Word -> Bool -> Bool -> PaginateOptions a -> Paginator t a -- | Represents requests that can take additional options in a -- Paginator. This can be used to filter/sort Listing -- endpoints class Paginable a -- | Options that can be applied to comments or submissions, as represented -- by the phantom type parameter data ItemOpts a ItemOpts :: Maybe ItemSort -> Maybe ItemType -> Maybe Time -> Maybe Word -> ItemOpts a -- | Defaults for fetching items, like comments or submissions defaultItemOpts :: ItemOpts a -- | How to sort items in certain Listings. Not every option is -- guaranteed to be accepted by a given endpoint data ItemSort Hot :: ItemSort New :: ItemSort Top :: ItemSort Controversial :: ItemSort Old :: ItemSort Random :: ItemSort QA :: ItemSort Live :: ItemSort Confidence :: ItemSort -- | A user- or moderator-generated report on a submission data ItemReport ItemReport :: Text -> Word -> ItemReport -- | Sigils that a moderator can add to distinguish comments or -- submissions. Note that the Admin and Special -- distinctions require special privileges to use data Distinction -- | Adds "[M]" Moderator :: Distinction -- | Removes an existing distinction when sent Undistinguished :: Distinction -- | Adds "[A]" Admin :: Distinction -- | User-specific distinction Special :: Distinction -- | Time range when fetching comments or submissions data Time Hour :: Time Day :: Time Week :: Time Month :: Time Year :: Time AllTime :: Time -- | Type of comments, for filtering in Listings data ItemType Comments :: ItemType Submissions :: ItemType -- | A URL pointing to a resource hosted by Reddit. These should only be -- obtained by parsing the JSON of existing resources or through -- particular actions that perform the upload transaction and return the -- URL, e.g. uploadWidgetImage data UploadURL -- | Type synonym for bodies of submissions, comments, messages, etc... type Body = Text -- | Type synonym for titles of submissions, etc... type Title = Text -- | Type synonym for URLs type URL = Text -- | Type synonym for subjects of messages, etc... type Subject = Text -- | Type synonym RGB color strings type RGBText = Text -- | Type synonym for names of items type Name = Text -- | Type synonym for domains type Domain = Text -- | Type synonym for fieldLabelModifiers in FromJSON -- instances type Modifier = [Char] -> [Char] -- | Base exception type for Reddit API client data RedditException -- | Exceptions generated within the Reddit API client data ClientException InvalidRequest :: Text -> ClientException InvalidResponse :: Text -> ClientException MalformedCredentials :: Text -> ClientException OtherError :: Text -> ClientException ConfigurationError :: Text -> ClientException -- | Exceptions returned from API endpoints data APIException ErrorWithStatus :: StatusMessage -> APIException ErrorWithMessage :: ErrorMessage -> APIException InvalidCredentials :: OAauthError -> APIException -- | Sent if errors occur when posting JSON InvalidJSON :: JSONError -> APIException -- | With the response body, for further debugging JSONParseError :: Text -> ByteString -> APIException -- | If the API action should not allow automatic redirects, this error -- returns the possible redirected request Redirected :: Maybe Request -> APIException -- | Thrown when exceptions occur during websocket handling WebsocketError :: Text -> SomeException -> APIException -- | When an error occurs uploading media to Reddit's servers UploadFailed :: APIException -- | An error which occurs when attempting to authenticate via OAuth data OAauthError OAauthError :: Text -> Maybe Text -> OAauthError -- | A specific error message data ErrorMessage EmptyError :: ErrorMessage OtherErrorMessage :: [Value] -> ErrorMessage Ratelimited :: Integer -> Text -> ErrorMessage CommentDeleted :: ErrorMessage BadSRName :: ErrorMessage SubredditNotExists :: ErrorMessage SubredditRequired :: ErrorMessage AlreadySubmitted :: ErrorMessage NoURL :: ErrorMessage NoName :: ErrorMessage NoText :: ErrorMessage TooShort :: ErrorMessage BadCaptcha :: ErrorMessage UserRequired :: ErrorMessage -- | Details about a non-200 HTTP response data StatusMessage StatusMessage :: StatusCode -> Text -> StatusMessage -- | Type synonym for status codes in responses type StatusCode = Int -- | Details about a non-200 response when posting JSON data JSONError JSONError :: [Text] -> Text -> Text -> Text -> JSONError -- | Stateful data that may be updated over the course of a Client -- lifetime data ClientState -- | The three forms of application that may use the Reddit API, each -- having different API access patterns data AppType -- | The simplest type of application. May only be used by the developer -- who owns the account. This requires supplying the usernme and password -- associated with the account ScriptApp :: ClientSecret -> PasswordFlow -> AppType -- | For applications running on a server backend WebApp :: ClientSecret -> CodeFlow -> AppType -- | For applications installed on devices that the developer does not own -- (e.g., a mobile application) InstalledApp :: CodeFlow -> AppType ApplicationOnly :: ClientSecret -> AppType -- | A configuration data AuthConfig AuthConfig :: ClientID -> AppType -> UserAgent -> AuthConfig -- | A unique user agent to identify your application; Reddit applies -- rate-limiting to common agents, and actively bans misleading ones data UserAgent UserAgent :: Text -> Text -> Text -> Text -> UserAgent -- | Token received after authentication data AccessToken AccessToken :: Token -> NominalDiffTime -> [Scope] -> Maybe Token -> AccessToken -- | Type synonym for the text of a token type Token = Text -- | Type synonym for the text of codes returned from auth URLs, for -- WebApps and InstalledApps type Code = Text -- | Represents a specific Reddit functionality that must be explicitly -- requested data Scope -- | Corresponds to "account" in text form Accounts :: Scope Creddits :: Scope Edit :: Scope Flair :: Scope History :: Scope Identity :: Scope LiveManage :: Scope ModConfig :: Scope ModContributors :: Scope ModFlair :: Scope ModLog :: Scope ModMail :: Scope ModOthers :: Scope ModPosts :: Scope ModSelf :: Scope ModTraffic :: Scope ModWiki :: Scope MySubreddits :: Scope PrivateMessages :: Scope Read :: Scope Report :: Scope Save :: Scope StructuredStyles :: Scope Submit :: Scope Subscribe :: Scope Vote :: Scope WikiEdit :: Scope WikiRead :: Scope -- | For all scopes, corresponds to "*" Unlimited :: Scope -- | Simple user credentials for authenticating via ScriptApps -- -- Note: These credentials will be kept in memory! data PasswordFlow PasswordFlow :: Text -> Text -> PasswordFlow -- | Details for OAuth "code flow", for WebApps and -- InstalledApps data CodeFlow CodeFlow :: URL -> Code -> CodeFlow -- | Type synonym for client IDs type ClientID = Text -- | Type synonym for client secrets type ClientSecret = Text -- | The duration of the access token for WebApps and -- InstalledApps data TokenDuration -- | Generates one-hour access tokens without a refresh token Temporary :: TokenDuration -- | Generates a one-hour access tokens with a refresh token that can be -- used to indefinitely obtain new access tokens Permanent :: TokenDuration