heddit-0.2: Reddit API bindings
Copyright(c) 2021 Rory Tyler Hayford
LicenseBSD-3-Clause
Maintainerrory.hayford@protonmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Network.Reddit.Subreddit

Description

 
Synopsis

Actions

getSubreddit :: MonadReddit m => SubredditName -> m Subreddit Source #

Get information about a Subreddit. An ErrorWithStatus will be thrown if attempting to query information on banned or private Subreddits

getPostRequirements :: MonadReddit m => SubredditName -> m PostRequirements Source #

Get the requirements that moderators have configured for all submissions on the given subreddit

getRandomSubmission :: MonadReddit m => SubredditName -> m Submission Source #

Get a random submission from the subreddit. The sub must support this feature, or an ErrorWithStatus exception will be thrown

getStickiedSubmission Source #

Arguments

:: MonadReddit m 
=> Maybe Word

Which sticky to fetch. 1 is at the top of the sticky list, and is the default if this param is Nothing

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

subscribe :: MonadReddit m => SubredditName -> m () Source #

Subscribe to a single subreddit

unsubscribe :: MonadReddit m => SubredditName -> m () Source #

Unsubscribe from a single subreddit

quarantineOptIn :: MonadReddit m => SubredditName -> m () Source #

Allow the authenticated user to access the quarantined subreddit

quarantineOptOut :: MonadReddit m => SubredditName -> m () Source #

Disallow the authenticated user from accessing the quarantined subreddit

Subreddit Listings

These actions return Listings of subreddits site-wide corresponding to various filters

searchSubreddits :: MonadReddit m => Text -> Paginator SubredditID Subreddit -> m (Listing SubredditID Subreddit) Source #

Search through subreddits based on both their names and descriptions

searchSubredditsByName Source #

Arguments

:: MonadReddit m 
=> Maybe Bool

If NSWF subreddits should be included, defaulting to True if Nothing

-> Maybe Bool

Only exactly match the query, defaulting to False if Nothing

-> Text 
-> m (Seq SubredditName) 

Search through subreddits based on both their names

getRecommendedSubreddits Source #

Arguments

:: (MonadReddit m, Foldable t) 
=> Maybe (t SubredditName)

Subreddits to omit from the result

-> t SubredditName

Subreddits to base the recommendations on

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

followCollection :: MonadReddit m => CollectionID -> m () Source #

Follow the collection for the authenticated user

unfollowCollection :: MonadReddit m => CollectionID -> m () Source #

Unfollow the collection for the authenticated user

Collections

getCollections :: MonadReddit m => SubredditID -> m (Seq Collection) Source #

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

getCollectionsWithName :: MonadReddit m => SubredditName -> m (Seq Collection) Source #

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

getCollection :: MonadReddit m => CollectionID -> m Collection Source #

Fetch the specifig Collection, given its ID. This includes its sortedLinks

getCollectionByPermalink :: MonadReddit m => URL -> m Collection Source #

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>

Flair

getUserFlairTemplates :: MonadReddit m => SubredditName -> m (Seq FlairTemplate) Source #

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

getSubmissionFlairTemplates :: MonadReddit m => SubredditName -> m (Seq FlairTemplate) Source #

Get the submission FlairTemplates on the given subreddit

getNewSubmissionFlairChoices :: MonadReddit m => SubredditName -> m (Seq FlairChoice) Source #

Get the available FlairChoices for new submissions on the given subreddit

getUserFlairChoices :: MonadReddit m => SubredditName -> m (Seq FlairChoice) Source #

Get the available FlairChoices for new submissions on the current subreddit

getSubmissionFlairChoices :: MonadReddit m => SubredditName -> SubmissionID -> m (Seq FlairChoice) Source #

Get the available FlairChoices for a particular submission on the given subreddit

Wiki

getWikiPage :: MonadReddit m => SubredditName -> WikiPageName -> m WikiPage Source #

Get the subreddit WikiPage specified by name

getWikiPages :: MonadReddit m => SubredditName -> m (Seq WikiPageName) Source #

Get all of the WikiPages on the subreddit wiki

getWikiPageRevision :: MonadReddit m => SubredditName -> WikiPageName -> WikiRevisionID -> m WikiPage Source #

Get a specific revision of a WikiPage, specified by name and WikiRevisionID

editWikiPage Source #

Arguments

:: MonadReddit m 
=> SubredditName 
-> WikiPageName 
-> Maybe Text

The reason for the edit, if any

-> Body

The new content for the page

-> m () 

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

createWikiPage Source #

Arguments

:: MonadReddit m 
=> SubredditName 
-> WikiPageName 
-> Maybe Text

The reason for creating the page, if any

-> Body

The new content for the page

-> m () 

Create a new wikipage. If a page with the given name already exists, its contents will be replaced

Widgets

getSubredditWidgets :: MonadReddit m => SubredditName -> m SubredditWidgets Source #

Get a given subreddit's widgets

getAllSubredditWidgets :: MonadReddit m => SubredditName -> m (Seq Widget) Source #

Get all of a subreddit's Widgets as a non-hierarchical list

Emojis

getSubredditEmojis :: MonadReddit m => SubredditName -> m (Seq Emoji) Source #

Get all of the emojis for the given subreddit. Note that this does not include the builtin "snoomojis"

Types

data BodyRestriction Source #

Rules concerning the presence of self-text bodies in posts

Instances

Instances details
Eq BodyRestriction Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Show BodyRestriction Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Generic BodyRestriction Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Associated Types

type Rep BodyRestriction :: Type -> Type #

FromJSON BodyRestriction Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep BodyRestriction Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep BodyRestriction = D1 ('MetaData "BodyRestriction" "Network.Reddit.Types.Subreddit" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "BodyRequired" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BodyNotAllowed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoRestriction" 'PrefixI 'False) (U1 :: Type -> Type)))

data PostRequirements Source #

Mod-created requirements for posting in a subreddit

Instances

Instances details
Eq PostRequirements Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Show PostRequirements Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Generic PostRequirements Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Associated Types

type Rep PostRequirements :: Type -> Type #

FromJSON PostRequirements Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep PostRequirements Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep PostRequirements = D1 ('MetaData "PostRequirements" "Network.Reddit.Types.Subreddit" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "PostRequirements" 'PrefixI 'True) (((S1 ('MetaSel ('Just "bodyBlacklistedStrings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "bodyRestrictionPolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BodyRestriction)) :*: (S1 ('MetaSel ('Just "domainBlacklist") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "domainWhitelist") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]))) :*: ((S1 ('MetaSel ('Just "isFlairRequired") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "titleBlacklistedStrings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text])) :*: (S1 ('MetaSel ('Just "titleRequiredStrings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: (S1 ('MetaSel ('Just "titleTextMaxLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Word)) :*: S1 ('MetaSel ('Just "titleTextMinLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Word)))))))

data RuleType Source #

The type of item that a SubredditRule applies to

Constructors

CommentRule 
LinkRule 
AllRule 

Instances

Instances details
Eq RuleType Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Ord RuleType Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Show RuleType Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Generic RuleType Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Associated Types

type Rep RuleType :: Type -> Type #

Methods

from :: RuleType -> Rep RuleType x #

to :: Rep RuleType x -> RuleType #

FromJSON RuleType Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

ToHttpApiData RuleType Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep RuleType Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep RuleType = D1 ('MetaData "RuleType" "Network.Reddit.Types.Subreddit" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "CommentRule" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LinkRule" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AllRule" 'PrefixI 'False) (U1 :: Type -> Type)))

data PostedSubredditRule Source #

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 NewSubredditRule Source #

Represents a new SubredditRule that can be created by moderators

Instances

Instances details
Eq NewSubredditRule Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Show NewSubredditRule Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Generic NewSubredditRule Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Associated Types

type Rep NewSubredditRule :: Type -> Type #

ToForm NewSubredditRule Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep NewSubredditRule Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep NewSubredditRule = D1 ('MetaData "NewSubredditRule" "Network.Reddit.Types.Subreddit" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "NewSubredditRule" 'PrefixI 'True) ((S1 ('MetaSel ('Just "shortName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Just "ruleType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RuleType)) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Body) :*: S1 ('MetaSel ('Just "violationReason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))

data SubredditRule Source #

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

Instances

Instances details
Eq SubredditRule Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Show SubredditRule Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Generic SubredditRule Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Associated Types

type Rep SubredditRule :: Type -> Type #

FromJSON SubredditRule Source #

Depending on the endpoint, the JSON fields are either camel- or snake-cased

Instance details

Defined in Network.Reddit.Types.Subreddit

ToForm SubredditRule Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Methods

toForm :: SubredditRule -> Form #

type Rep SubredditRule Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

newtype SubredditID Source #

Unique site-wide identifier for a subreddit

Constructors

SubredditID Text 

Instances

Instances details
Eq SubredditID Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Show SubredditID Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Generic SubredditID Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Associated Types

type Rep SubredditID :: Type -> Type #

FromJSON SubredditID Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Thing SubredditID Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep SubredditID Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep SubredditID = D1 ('MetaData "SubredditID" "Network.Reddit.Types.Subreddit" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "SubredditID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data SubredditName Source #

The name of a subreddit

Instances

Instances details
Eq SubredditName Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Show SubredditName Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Generic SubredditName Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Associated Types

type Rep SubredditName :: Type -> Type #

ToJSON SubredditName Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

FromJSON SubredditName Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

ToHttpApiData SubredditName Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep SubredditName Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep SubredditName = D1 ('MetaData "SubredditName" "Network.Reddit.Types.Subreddit" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "SubredditName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Subreddit Source #

Information about a subreddit. Fields prefixed with userIs below apply to the currently authenticated user

Instances

Instances details
Eq Subreddit Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Show Subreddit Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Generic Subreddit Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Associated Types

type Rep Subreddit :: Type -> Type #

FromJSON Subreddit Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

Paginable Subreddit Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep Subreddit Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type Rep Subreddit = D1 ('MetaData "Subreddit" "Network.Reddit.Types.Subreddit" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "Subreddit" 'PrefixI 'True) (((((S1 ('MetaSel ('Just "subredditID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubredditID) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubredditName)) :*: (S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Title) :*: S1 ('MetaSel ('Just "created") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime))) :*: ((S1 ('MetaSel ('Just "subredditType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubredditType) :*: S1 ('MetaSel ('Just "subscribers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer)) :*: (S1 ('MetaSel ('Just "publicDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Body) :*: (S1 ('MetaSel ('Just "keyColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RGBText)) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Body))))) :*: (((S1 ('MetaSel ('Just "descriptionHTML") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Body)) :*: S1 ('MetaSel ('Just "submitText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "submitTextHTML") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "submitTextLabel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "iconImg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe URL)) :*: S1 ('MetaSel ('Just "bannerImg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe URL))) :*: (S1 ('MetaSel ('Just "bannerSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Int, Int))) :*: (S1 ('MetaSel ('Just "headerImg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe URL)) :*: S1 ('MetaSel ('Just "headerSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Int, Int)))))))) :*: ((((S1 ('MetaSel ('Just "over18") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "quarantine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "userIsBanned") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "userIsMuted") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "userIsModerator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "userIsContributor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "userIsSubscriber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "allowImages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "allowPolls") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))))) :*: (((S1 ('MetaSel ('Just "allowVideos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "allowVideoGIFs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "freeFormReports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "restrictPosting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "restrictCommenting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "linkFlairEnabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "canAssignLinkFlair") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "canAssignUserFlair") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "spoilersEnabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))))))))
type PaginateOptions Subreddit Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

type PaginateThing Subreddit Source # 
Instance details

Defined in Network.Reddit.Types.Subreddit

mkSubredditName :: MonadThrow m => Text -> m SubredditName Source #

Smart constructor for SubredditName, which must be between 3 and 20 chars, and may only include upper/lowercase alphanumeric chars, underscores, and hyphens

data ForegroundColor Source #

Foreground color for v2 flair

Constructors

Dark 
Light 

Instances

Instances details
Eq ForegroundColor Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show ForegroundColor Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic ForegroundColor Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep ForegroundColor :: Type -> Type #

ToJSON ForegroundColor Source # 
Instance details

Defined in Network.Reddit.Types.Flair

FromJSON ForegroundColor Source # 
Instance details

Defined in Network.Reddit.Types.Flair

ToHttpApiData ForegroundColor Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep ForegroundColor Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep ForegroundColor = D1 ('MetaData "ForegroundColor" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "Dark" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Light" 'PrefixI 'False) (U1 :: Type -> Type))

data FlairContent Source #

The type of content that is allowed in a flair template

Instances

Instances details
Eq FlairContent Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show FlairContent Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic FlairContent Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep FlairContent :: Type -> Type #

FromJSON FlairContent Source # 
Instance details

Defined in Network.Reddit.Types.Flair

ToHttpApiData FlairContent Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairContent Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairContent = D1 ('MetaData "FlairContent" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "AllContent" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EmojisOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TextOnly" 'PrefixI 'False) (U1 :: Type -> Type)))

data FlairType Source #

The type of flair, when creating a new template

Instances

Instances details
Eq FlairType Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show FlairType Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic FlairType Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep FlairType :: Type -> Type #

ToHttpApiData FlairType Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairType Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairType = D1 ('MetaData "FlairType" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "UserFlairType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SubmissionFlairType" 'PrefixI 'False) (U1 :: Type -> Type))

data FlairResult Source #

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

Instances

Instances details
Eq FlairResult Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show FlairResult Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic FlairResult Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep FlairResult :: Type -> Type #

FromJSON FlairResult Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairResult Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairResult = D1 ('MetaData "FlairResult" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "FlairResult" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ok") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "warnings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap Text Text)) :*: S1 ('MetaSel ('Just "errors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap Text Text)))))

data FlairSelection Source #

Select a FlairChoice for a submission or for the user

Instances

Instances details
Eq FlairSelection Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show FlairSelection Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic FlairSelection Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep FlairSelection :: Type -> Type #

type Rep FlairSelection Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairSelection = D1 ('MetaData "FlairSelection" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "FlairSelection" 'PrefixI 'True) (S1 ('MetaSel ('Just "flairChoice") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FlairChoice) :*: (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "subreddit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubredditName))))

data CurrentUserFlair Source #

Wrapper around UserFlair for fetching the current flair. This uses the same endpoint as the FlairChoiceList above

Instances

Instances details
Show CurrentUserFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic CurrentUserFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep CurrentUserFlair :: Type -> Type #

FromJSON CurrentUserFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep CurrentUserFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep CurrentUserFlair = D1 ('MetaData "CurrentUserFlair" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "CurrentUserFlair" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserFlair)))

data UserFlair Source #

Flair that is currently assigned to a user

Instances

Instances details
Eq UserFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show UserFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic UserFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep UserFlair :: Type -> Type #

FromJSON UserFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep UserFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep UserFlair = D1 ('MetaData "UserFlair" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "UserFlair" 'PrefixI 'True) (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FlairText)) :*: S1 ('MetaSel ('Just "cssClass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CSSClass))))

data FlairChoiceList Source #

Instances

Instances details
Show FlairChoiceList Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic FlairChoiceList Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep FlairChoiceList :: Type -> Type #

FromJSON FlairChoiceList Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairChoiceList Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairChoiceList = D1 ('MetaData "FlairChoiceList" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "FlairChoiceList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq FlairChoice))))

data FlairChoice Source #

Information about flair that a user can choose. The templateID corresponds to the flairID field of a FlairTemplate

Instances

Instances details
Eq FlairChoice Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show FlairChoice Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic FlairChoice Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep FlairChoice :: Type -> Type #

FromJSON FlairChoice Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairChoice Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairChoice = D1 ('MetaData "FlairChoice" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "FlairChoice" 'PrefixI 'True) ((S1 ('MetaSel ('Just "templateID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FlairID) :*: S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FlairText)) :*: (S1 ('MetaSel ('Just "textEditable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "cssClass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CSSClass)))))

data PostedFlairTemplate Source #

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 FlairTemplate Source #

Flair "templates" that describe choices for self-assigned flair, for both users and submissions

Instances

Instances details
Eq FlairTemplate Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show FlairTemplate Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic FlairTemplate Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep FlairTemplate :: Type -> Type #

FromJSON FlairTemplate Source # 
Instance details

Defined in Network.Reddit.Types.Flair

ToForm FlairTemplate Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Methods

toForm :: FlairTemplate -> Form #

type Rep FlairTemplate Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type FlairID = Text Source #

An identifier for a FlairTemplate

data FlairList Source #

Reddit strangely does not use their usual Listing mechanism for paginating assigned flairs, but a different data structure

Instances

Instances details
Eq FlairList Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show FlairList Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic FlairList Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep FlairList :: Type -> Type #

FromJSON FlairList Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairList Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairList = D1 ('MetaData "FlairList" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "FlairList" 'PrefixI 'True) (S1 ('MetaSel ('Just "prev") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UserID)) :*: (S1 ('MetaSel ('Just "next") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UserID)) :*: S1 ('MetaSel ('Just "users") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq AssignedFlair)))))

data AssignedFlair Source #

Flair that has been, or will be, assigned to a user

Instances

Instances details
Eq AssignedFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show AssignedFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic AssignedFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep AssignedFlair :: Type -> Type #

FromJSON AssignedFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Paginable AssignedFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep AssignedFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep AssignedFlair = D1 ('MetaData "AssignedFlair" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "AssignedFlair" 'PrefixI 'True) (S1 ('MetaSel ('Just "user") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Username) :*: (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FlairText)) :*: S1 ('MetaSel ('Just "cssClass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CSSClass)))))
type PaginateOptions AssignedFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type PaginateThing AssignedFlair Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type CSSClass = Text Source #

CSS class for flair

data FlairText Source #

The text displayed by the FlairTemplate

Instances

Instances details
Eq FlairText Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Show FlairText Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Generic FlairText Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Associated Types

type Rep FlairText :: Type -> Type #

Semigroup FlairText Source # 
Instance details

Defined in Network.Reddit.Types.Flair

Monoid FlairText Source # 
Instance details

Defined in Network.Reddit.Types.Flair

ToJSON FlairText Source # 
Instance details

Defined in Network.Reddit.Types.Flair

FromJSON FlairText Source # 
Instance details

Defined in Network.Reddit.Types.Flair

ToHttpApiData FlairText Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairText Source # 
Instance details

Defined in Network.Reddit.Types.Flair

type Rep FlairText = D1 ('MetaData "FlairText" "Network.Reddit.Types.Flair" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "FlairText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

mkFlairText :: MonadThrow m => Text -> m FlairText Source #

Smart constructor for FlairText, the length of which not exceed 64 characters

flairlistToListing :: FlairList -> Listing UserID AssignedFlair Source #

Convert a FlairList to a Listing, allowing it to be used with other functions/actions expecting a listing

defaultFlairTemplate :: FlairTemplate Source #

A FlairTemplate with default fields, for convenience when creating new templates

data EmojiName Source #

The name of an individual Emoji

Instances

Instances details
Eq EmojiName Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

Show EmojiName Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

Generic EmojiName Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

Associated Types

type Rep EmojiName :: Type -> Type #

Semigroup EmojiName Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

Monoid EmojiName Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

FromJSON EmojiName Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

ToHttpApiData EmojiName Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

type Rep EmojiName Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

type Rep EmojiName = D1 ('MetaData "EmojiName" "Network.Reddit.Types.Emoji" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "EmojiName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Emoji Source #

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

Instances

Instances details
Eq Emoji Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

Methods

(==) :: Emoji -> Emoji -> Bool #

(/=) :: Emoji -> Emoji -> Bool #

Show Emoji Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

Methods

showsPrec :: Int -> Emoji -> ShowS #

show :: Emoji -> String #

showList :: [Emoji] -> ShowS #

Generic Emoji Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

Associated Types

type Rep Emoji :: Type -> Type #

Methods

from :: Emoji -> Rep Emoji x #

to :: Rep Emoji x -> Emoji #

FromJSON Emoji Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

ToForm Emoji Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

Methods

toForm :: Emoji -> Form #

type Rep Emoji Source # 
Instance details

Defined in Network.Reddit.Types.Emoji

mkEmoji :: EmojiName -> Emoji Source #

Create a new Emoji by providing an EmojiName; default values are provided for all other fields

mkEmojiName :: MonadThrow m => Text -> m EmojiName Source #

Smart constructor for EmojiNames, which may only contain alphanumeric characters, '_', '-', and '&', and may not exceed 24 characters in length

data TextAreaWidget Source #

A widget composed of text. See mkTextAreaWidget for constructing a new widget

Instances

Instances details
Eq TextAreaWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show TextAreaWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic TextAreaWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep TextAreaWidget :: Type -> Type #

ToJSON TextAreaWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON TextAreaWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep TextAreaWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data RulesDisplay Source #

Display style for a RulesWidget

Instances

Instances details
Eq RulesDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show RulesDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic RulesDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep RulesDisplay :: Type -> Type #

ToJSON RulesDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON RulesDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep RulesDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep RulesDisplay = D1 ('MetaData "RulesDisplay" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "FullDisplay" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CompactDisplay" 'PrefixI 'False) (U1 :: Type -> Type))

data RulesWidget Source #

A widget listing subreddit SubredditRules. The rules field cannot be updated through widget endpoints, and are excluded during serialization

Instances

Instances details
Eq RulesWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show RulesWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic RulesWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep RulesWidget :: Type -> Type #

ToJSON RulesWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON RulesWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep RulesWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data PostFlairWidgetDisplay Source #

The display orientation for PostFlairWidgets

Constructors

CloudDisplay 
ListDisplay 

Instances

Instances details
Eq PostFlairWidgetDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show PostFlairWidgetDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic PostFlairWidgetDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep PostFlairWidgetDisplay :: Type -> Type #

ToJSON PostFlairWidgetDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON PostFlairWidgetDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep PostFlairWidgetDisplay Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep PostFlairWidgetDisplay = D1 ('MetaData "PostFlairWidgetDisplay" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "CloudDisplay" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListDisplay" 'PrefixI 'False) (U1 :: Type -> Type))

data PostFlairInfo Source #

Information about submission flair templates in a PostFlairWidget

Instances

Instances details
Eq PostFlairInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show PostFlairInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic PostFlairInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep PostFlairInfo :: Type -> Type #

FromJSON PostFlairInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep PostFlairInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep PostFlairInfo = D1 ('MetaData "PostFlairInfo" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "PostFlairInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "templateID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FlairID) :*: S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "textColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ForegroundColor) :*: S1 ('MetaSel ('Just "backgroundColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RGBText))))

data PostFlairWidget Source #

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

Instances

Instances details
Eq PostFlairWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show PostFlairWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic PostFlairWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep PostFlairWidget :: Type -> Type #

ToJSON PostFlairWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON PostFlairWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep PostFlairWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data ModInfo Source #

Information about a moderator as displayed in a ModeratorsWidget

Instances

Instances details
Eq ModInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Methods

(==) :: ModInfo -> ModInfo -> Bool #

(/=) :: ModInfo -> ModInfo -> Bool #

Show ModInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic ModInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep ModInfo :: Type -> Type #

Methods

from :: ModInfo -> Rep ModInfo x #

to :: Rep ModInfo x -> ModInfo #

ToJSON ModInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON ModInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ModInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ModInfo = D1 ('MetaData "ModInfo" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "ModInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Username) :*: S1 ('MetaSel ('Just "flairText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FlairText))) :*: (S1 ('MetaSel ('Just "flairTextColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ForegroundColor)) :*: S1 ('MetaSel ('Just "flairBackgroundColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RGBText)))))

data ModeratorsWidget Source #

A widget listing the moderators of the subreddit. This widget cannot be created. It can be updated by modifying the styles field only

Instances

Instances details
Eq ModeratorsWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show ModeratorsWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic ModeratorsWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep ModeratorsWidget :: Type -> Type #

ToJSON ModeratorsWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON ModeratorsWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ModeratorsWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ModeratorsWidget = D1 ('MetaData "ModeratorsWidget" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "ModeratorsWidget" 'PrefixI 'True) ((S1 ('MetaSel ('Just "widgetID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe WidgetID)) :*: S1 ('MetaSel ('Just "mods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq ModInfo))) :*: (S1 ('MetaSel ('Just "totalMods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "styles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe WidgetStyles)))))

data MenuLink Source #

A link in a MenuWidget or Submenu

Constructors

MenuLink Text URL 

Instances

data Submenu Source #

A submenu child in a MenuWidget which contains MenuLinks

Constructors

Submenu (Seq MenuLink) Text 

Instances

Instances details
Eq Submenu Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Methods

(==) :: Submenu -> Submenu -> Bool #

(/=) :: Submenu -> Submenu -> Bool #

Show Submenu Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic Submenu Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep Submenu :: Type -> Type #

Methods

from :: Submenu -> Rep Submenu x #

to :: Rep Submenu x -> Submenu #

ToJSON Submenu Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON Submenu Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep Submenu Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep Submenu = D1 ('MetaData "Submenu" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "Submenu" 'PrefixI 'True) (S1 ('MetaSel ('Just "children") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq MenuLink)) :*: S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

data MenuChild Source #

A child widget in a MenuWidget

Instances

Instances details
Eq MenuChild Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show MenuChild Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic MenuChild Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep MenuChild :: Type -> Type #

ToJSON MenuChild Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON MenuChild Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep MenuChild Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep MenuChild = D1 ('MetaData "MenuChild" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "SubmenuChild" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Submenu)) :+: C1 ('MetaCons "MenuLinkChild" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MenuLink)))

data MenuWidget Source #

A widget representing a menu

Instances

Instances details
Eq MenuWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show MenuWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic MenuWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep MenuWidget :: Type -> Type #

ToJSON MenuWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON MenuWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep MenuWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep MenuWidget = D1 ('MetaData "MenuWidget" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "MenuWidget" 'PrefixI 'True) (S1 ('MetaSel ('Just "widgetID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe WidgetID)) :*: S1 ('MetaSel ('Just "children") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq MenuChild))))

data Image Source #

An individual image in an ImageWidget

Instances

Instances details
Eq Image Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Methods

(==) :: Image -> Image -> Bool #

(/=) :: Image -> Image -> Bool #

Show Image Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Methods

showsPrec :: Int -> Image -> ShowS #

show :: Image -> String #

showList :: [Image] -> ShowS #

Generic Image Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep Image :: Type -> Type #

Methods

from :: Image -> Rep Image x #

to :: Rep Image x -> Image #

ToJSON Image Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON Image Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep Image Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data ImageWidget Source #

A widget composed of various Images

Instances

Instances details
Eq ImageWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show ImageWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic ImageWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep ImageWidget :: Type -> Type #

ToJSON ImageWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON ImageWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ImageWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ImageWidget = D1 ('MetaData "ImageWidget" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "ImageWidget" 'PrefixI 'True) ((S1 ('MetaSel ('Just "widgetID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe WidgetID)) :*: S1 ('MetaSel ('Just "shortName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ShortName)) :*: (S1 ('MetaSel ('Just "images") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq Image)) :*: S1 ('MetaSel ('Just "styles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe WidgetStyles)))))

data IDCardWidget Source #

An ID card displaying information about the subreddit

Instances

Instances details
Eq IDCardWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show IDCardWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic IDCardWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep IDCardWidget :: Type -> Type #

ToJSON IDCardWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON IDCardWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep IDCardWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data ImageData Source #

Image data that belongs to a CustomWidget

Instances

Instances details
Eq ImageData Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show ImageData Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic ImageData Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep ImageData :: Type -> Type #

ToJSON ImageData Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON ImageData Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ImageData Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data CustomWidget Source #

A custom widget

Instances

Instances details
Eq CustomWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show CustomWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic CustomWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep CustomWidget :: Type -> Type #

ToJSON CustomWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON CustomWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep CustomWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data CommunityInfo Source #

Information about a single subreddit in a CommunityListWidget. When creating a new widget, only the name field will be serialized

Instances

Instances details
Eq CommunityInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show CommunityInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic CommunityInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep CommunityInfo :: Type -> Type #

ToJSON CommunityInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON CommunityInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep CommunityInfo Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data CommunityListWidget Source #

A widget listing related subreddits

Instances

Instances details
Eq CommunityListWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show CommunityListWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic CommunityListWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep CommunityListWidget :: Type -> Type #

ToJSON CommunityListWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON CommunityListWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep CommunityListWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep CommunityListWidget = D1 ('MetaData "CommunityListWidget" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "CommunityListWidget" 'PrefixI 'True) ((S1 ('MetaSel ('Just "widgetID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe WidgetID)) :*: S1 ('MetaSel ('Just "shortName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ShortName)) :*: (S1 ('MetaSel ('Just "communities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq CommunityInfo)) :*: S1 ('MetaSel ('Just "styles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe WidgetStyles)))))

data CalendarConfig Source #

Configuration options for a CalendarWidget

Instances

Instances details
Eq CalendarConfig Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show CalendarConfig Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic CalendarConfig Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep CalendarConfig :: Type -> Type #

ToJSON CalendarConfig Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON CalendarConfig Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep CalendarConfig Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep CalendarConfig = D1 ('MetaData "CalendarConfig" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "CalendarConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "numEvents") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word) :*: (S1 ('MetaSel ('Just "showDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "showDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))) :*: (S1 ('MetaSel ('Just "showLocation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "showTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "showTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)))))

data CalendarWidget Source #

A widget representing a calendar

Instances

Instances details
Eq CalendarWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show CalendarWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic CalendarWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep CalendarWidget :: Type -> Type #

ToJSON CalendarWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON CalendarWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep CalendarWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data TextHover Source #

The state of a TextButton when hovering over it

Instances

Instances details
Eq TextHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show TextHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic TextHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep TextHover :: Type -> Type #

ToJSON TextHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON TextHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep TextHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data ImageHover Source #

The state of an ImageButton when hovering over it

Instances

Instances details
Eq ImageHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show ImageHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic ImageHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep ImageHover :: Type -> Type #

ToJSON ImageHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON ImageHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ImageHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ImageHover = D1 ('MetaData "ImageHover" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "ImageHover" 'PrefixI 'True) (S1 ('MetaSel ('Just "url") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UploadURL) :*: (S1 ('MetaSel ('Just "height") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "width") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)))))

data ButtonHover Source #

The state of the Button when hovering over it

Instances

Instances details
Eq ButtonHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show ButtonHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic ButtonHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep ButtonHover :: Type -> Type #

ToJSON ButtonHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON ButtonHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ButtonHover Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ButtonHover = D1 ('MetaData "ButtonHover" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "ImageButtonHover" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ImageHover)) :+: C1 ('MetaCons "TextButtonHover" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TextHover)))

data ButtonText Source #

Data for a TextButton

Instances

Instances details
Eq ButtonText Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show ButtonText Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic ButtonText Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep ButtonText :: Type -> Type #

ToJSON ButtonText Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON ButtonText Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ButtonText Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data ButtonImage Source #

Data for an ImageButton

Instances

Instances details
Eq ButtonImage Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show ButtonImage Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic ButtonImage Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep ButtonImage :: Type -> Type #

ToJSON ButtonImage Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON ButtonImage Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ButtonImage Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data Button Source #

An individual button in a ButtonWidget

Instances

Instances details
Eq Button Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Methods

(==) :: Button -> Button -> Bool #

(/=) :: Button -> Button -> Bool #

Show Button Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic Button Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep Button :: Type -> Type #

Methods

from :: Button -> Rep Button x #

to :: Rep Button x -> Button #

ToJSON Button Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON Button Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep Button Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep Button = D1 ('MetaData "Button" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "ImageButton" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ButtonImage)) :+: C1 ('MetaCons "TextButton" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ButtonText)))

data ButtonWidget Source #

A widget containing buttons

Instances

Instances details
Eq ButtonWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show ButtonWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic ButtonWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep ButtonWidget :: Type -> Type #

ToJSON ButtonWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON ButtonWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ButtonWidget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

data WidgetStyles Source #

Style options for an individual widget

Instances

Instances details
Eq WidgetStyles Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show WidgetStyles Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic WidgetStyles Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep WidgetStyles :: Type -> Type #

ToJSON WidgetStyles Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON WidgetStyles Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep WidgetStyles Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep WidgetStyles = D1 ('MetaData "WidgetStyles" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "WidgetStyles" 'PrefixI 'True) (S1 ('MetaSel ('Just "backgroundColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RGBText)) :*: S1 ('MetaSel ('Just "headerColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RGBText))))

data ShortName Source #

A "short name" for any widget. This name must be less than 30 characters long

Instances

Instances details
Eq ShortName Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show ShortName Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic ShortName Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep ShortName :: Type -> Type #

ToJSON ShortName Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON ShortName Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ShortName Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep ShortName = D1 ('MetaData "ShortName" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "ShortName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data WidgetSection Source #

The section in which certain Widgets appear

Constructors

Topbar 
Sidebar 

Instances

Instances details
Eq WidgetSection Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show WidgetSection Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic WidgetSection Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep WidgetSection :: Type -> Type #

ToHttpApiData WidgetSection Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep WidgetSection Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep WidgetSection = D1 ('MetaData "WidgetSection" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "Topbar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Sidebar" 'PrefixI 'False) (U1 :: Type -> Type))

newtype WidgetID Source #

A widget ID. These are usually prefixed with the type of widget it corresponds to, e.g. rules-2qh1i for a RulesWidget

Constructors

WidgetID Text 

Instances

Instances details
Eq WidgetID Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show WidgetID Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic WidgetID Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep WidgetID :: Type -> Type #

Methods

from :: WidgetID -> Rep WidgetID x #

to :: Rep WidgetID x -> WidgetID #

ToJSON WidgetID Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON WidgetID Source # 
Instance details

Defined in Network.Reddit.Types.Widget

ToHttpApiData WidgetID Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep WidgetID Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep WidgetID = D1 ('MetaData "WidgetID" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "WidgetID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Widget Source #

Represents one of various kinds of widgets

Instances

Instances details
Eq Widget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Methods

(==) :: Widget -> Widget -> Bool #

(/=) :: Widget -> Widget -> Bool #

Show Widget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic Widget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep Widget :: Type -> Type #

Methods

from :: Widget -> Rep Widget x #

to :: Rep Widget x -> Widget #

ToJSON Widget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

FromJSON Widget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep Widget Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep Widget = D1 ('MetaData "Widget" "Network.Reddit.Types.Widget" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (((C1 ('MetaCons "Buttons" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ButtonWidget)) :+: C1 ('MetaCons "Calendar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CalendarWidget))) :+: (C1 ('MetaCons "CommunityList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CommunityListWidget)) :+: (C1 ('MetaCons "Custom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomWidget)) :+: C1 ('MetaCons "IDCard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 IDCardWidget))))) :+: ((C1 ('MetaCons "Images" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ImageWidget)) :+: (C1 ('MetaCons "Moderators" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ModeratorsWidget)) :+: C1 ('MetaCons "Menu" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MenuWidget)))) :+: (C1 ('MetaCons "PostFlair" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PostFlairWidget)) :+: (C1 ('MetaCons "Rules" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RulesWidget)) :+: C1 ('MetaCons "TextArea" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TextAreaWidget))))))

data SubredditWidgets Source #

An organized collection of a subreddit's widgets

Instances

Instances details
Eq SubredditWidgets Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Show SubredditWidgets Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Generic SubredditWidgets Source # 
Instance details

Defined in Network.Reddit.Types.Widget

Associated Types

type Rep SubredditWidgets :: Type -> Type #

FromJSON SubredditWidgets Source # 
Instance details

Defined in Network.Reddit.Types.Widget

type Rep SubredditWidgets Source # 
Instance details

Defined in Network.Reddit.Types.Widget

mkShortName :: MonadThrow m => Text -> m ShortName Source #

Smart constructor for ShortNames, which must be <= 30 characters long

defaultCalendarConfig :: CalendarConfig Source #

A calendar config with default values

mkCommunityInfo :: SubredditName -> CommunityInfo Source #

Convenience function for creating a new CommunityInfo, where all but one of the fields should be Nothing

mkPostFlairWidget :: ShortName -> Seq FlairID -> PostFlairWidget Source #

Make a new PostFlairWidget with default values for most fields

mkTextAreaWidget :: ShortName -> Body -> TextAreaWidget Source #

Create a new TextAreaWidget, with default values for most fields

data WikiPermLevel Source #

Editing permission level configured for a single WikiPage

Instances

Instances details
Eq WikiPermLevel Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Ord WikiPermLevel Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Show WikiPermLevel Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Generic WikiPermLevel Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Associated Types

type Rep WikiPermLevel :: Type -> Type #

FromJSON WikiPermLevel Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

ToHttpApiData WikiPermLevel Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiPermLevel Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiPermLevel = D1 ('MetaData "WikiPermLevel" "Network.Reddit.Types.Wiki" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "FollowWikiSettings" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ApprovedEditorsOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ModEditsOnly" 'PrefixI 'False) (U1 :: Type -> Type)))

data WikiPageSettings Source #

The settings that moderators have configured for a single WikiPage

Instances

Instances details
Eq WikiPageSettings Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Show WikiPageSettings Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Generic WikiPageSettings Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Associated Types

type Rep WikiPageSettings :: Type -> Type #

FromJSON WikiPageSettings Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiPageSettings Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiPageSettings = D1 ('MetaData "WikiPageSettings" "Network.Reddit.Types.Wiki" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "WikiPageSettings" 'PrefixI 'True) (S1 ('MetaSel ('Just "permlevel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WikiPermLevel) :*: (S1 ('MetaSel ('Just "listed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "allowedEditors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq Username)))))

data WikiPageListing Source #

Wrapper for listings of WikiPages, which have their own RedditKind

Instances

Instances details
Show WikiPageListing Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Generic WikiPageListing Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Associated Types

type Rep WikiPageListing :: Type -> Type #

FromJSON WikiPageListing Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiPageListing Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiPageListing = D1 ('MetaData "WikiPageListing" "Network.Reddit.Types.Wiki" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "WikiPageListing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq WikiPageName))))

data WikiRevisionID Source #

ID for a wikipage revision

Instances

Instances details
Eq WikiRevisionID Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Show WikiRevisionID Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Generic WikiRevisionID Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Associated Types

type Rep WikiRevisionID :: Type -> Type #

FromJSON WikiRevisionID Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

ToHttpApiData WikiRevisionID Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Thing WikiRevisionID Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiRevisionID Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiRevisionID = D1 ('MetaData "WikiRevisionID" "Network.Reddit.Types.Wiki" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "WikiRevisionID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data WikiRevision Source #

Information regarding a single WikiPage revision

Instances

Instances details
Eq WikiRevision Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Show WikiRevision Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Generic WikiRevision Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Associated Types

type Rep WikiRevision :: Type -> Type #

FromJSON WikiRevision Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Paginable WikiRevision Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiRevision Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type PaginateOptions WikiRevision Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type PaginateThing WikiRevision Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

data WikiPageName Source #

The name of an individual wiki page. The name forms part of the URL, and should not contain spaces or uppercase characters

Instances

Instances details
Eq WikiPageName Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Show WikiPageName Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Generic WikiPageName Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Associated Types

type Rep WikiPageName :: Type -> Type #

FromJSON WikiPageName Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

ToHttpApiData WikiPageName Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiPageName Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiPageName = D1 ('MetaData "WikiPageName" "Network.Reddit.Types.Wiki" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'True) (C1 ('MetaCons "WikiPageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data WikiPage Source #

An individual subreddit wikipage along with its revision information

Instances

Instances details
Eq WikiPage Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Show WikiPage Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Generic WikiPage Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

Associated Types

type Rep WikiPage :: Type -> Type #

Methods

from :: WikiPage -> Rep WikiPage x #

to :: Rep WikiPage x -> WikiPage #

FromJSON WikiPage Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiPage Source # 
Instance details

Defined in Network.Reddit.Types.Wiki

type Rep WikiPage = D1 ('MetaData "WikiPage" "Network.Reddit.Types.Wiki" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "WikiPage" 'PrefixI 'True) ((S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Body) :*: S1 ('MetaSel ('Just "contentHTML") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Body)) :*: (S1 ('MetaSel ('Just "revisionBy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Username) :*: (S1 ('MetaSel ('Just "revisionDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "mayRevise") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))))

mkWikiPageName :: Text -> WikiPageName Source #

Smart constructor for WikiPageNames. Lowercases the contained text, and replaces each space with a single underscore