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

Network.Reddit.Types.Submission

Description

 
Synopsis

Documentation

data Submission Source #

A submitted self-text post or link

Instances

Instances details
Eq Submission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show Submission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic Submission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep Submission :: Type -> Type #

FromJSON Submission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Paginable Submission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

FromJSON (PostedItem Submission) Source # 
Instance details

Defined in Network.Reddit.Types.Item

type Rep Submission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep Submission = D1 ('MetaData "Submission" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "Submission" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "submissionID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubmissionID) :*: (S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Title) :*: S1 ('MetaSel ('Just "author") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Username))) :*: (S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubmissionContent) :*: (S1 ('MetaSel ('Just "subreddit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubredditName) :*: S1 ('MetaSel ('Just "created") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime)))) :*: ((S1 ('MetaSel ('Just "edited") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UTCTime)) :*: (S1 ('MetaSel ('Just "permalink") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 URL) :*: S1 ('MetaSel ('Just "domain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Domain))) :*: (S1 ('MetaSel ('Just "numComments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer) :*: (S1 ('MetaSel ('Just "score") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer) :*: S1 ('MetaSel ('Just "ups") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)))))) :*: (((S1 ('MetaSel ('Just "downs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "upvoteRatio") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Rational)) :*: S1 ('MetaSel ('Just "gilded") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer))) :*: (S1 ('MetaSel ('Just "userReports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq ItemReport)) :*: (S1 ('MetaSel ('Just "modReports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq ItemReport)) :*: S1 ('MetaSel ('Just "numReports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer))))) :*: ((S1 ('MetaSel ('Just "distinguished") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Distinction)) :*: (S1 ('MetaSel ('Just "isOC") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "clicked") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "over18") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "locked") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "spoiler") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "pollData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PollData))))))))
type PaginateOptions Submission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type PaginateThing Submission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

newtype SubmissionID Source #

Unique, site-wide ID for a Submission

Constructors

SubmissionID Text 

Instances

Instances details
Eq SubmissionID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show SubmissionID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic SubmissionID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep SubmissionID :: Type -> Type #

FromJSON SubmissionID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

ToHttpApiData SubmissionID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Thing SubmissionID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep SubmissionID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep SubmissionID = D1 ('MetaData "SubmissionID" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'True) (C1 ('MetaCons "SubmissionID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data SubmissionContent Source #

The contents of the Submission. Can be a self-post with a plaintext and HTML body, an external link, or entirely empty

data PollData Source #

Data from an existing submission containing a poll. See Poll for submitting a new post with a poll

Constructors

PollData 

Fields

Instances

Instances details
Eq PollData Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show PollData Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic PollData Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep PollData :: Type -> Type #

Methods

from :: PollData -> Rep PollData x #

to :: Rep PollData x -> PollData #

FromJSON PollData Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep PollData Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep PollData = D1 ('MetaData "PollData" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "PollData" 'PrefixI 'True) ((S1 ('MetaSel ('Just "options") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq PollOption)) :*: S1 ('MetaSel ('Just "totalVoteCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer)) :*: (S1 ('MetaSel ('Just "votingEnds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "userSelection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PollOptionID)))))

data PollOption Source #

Single option in existing PollData

Constructors

PollOption 

Fields

Instances

Instances details
Eq PollOption Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show PollOption Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic PollOption Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep PollOption :: Type -> Type #

FromJSON PollOption Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep PollOption Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep PollOption = D1 ('MetaData "PollOption" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "PollOption" 'PrefixI 'True) (S1 ('MetaSel ('Just "pollOptionID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PollOptionID) :*: (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Body) :*: S1 ('MetaSel ('Just "voteCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer))))

type PollOptionID = Text Source #

Identifier for a PollOption

Collections

data Collection Source #

Represents a Reddit collection

Constructors

Collection 

Fields

Instances

Instances details
Eq Collection Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show Collection Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic Collection Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep Collection :: Type -> Type #

FromJSON Collection Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep Collection Source # 
Instance details

Defined in Network.Reddit.Types.Submission

data CollectionLayout Source #

The layout of the Collection on the redesigned site

Constructors

Gallery 
Timeline 

Instances

Instances details
Eq CollectionLayout Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show CollectionLayout Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic CollectionLayout Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep CollectionLayout :: Type -> Type #

FromJSON CollectionLayout Source # 
Instance details

Defined in Network.Reddit.Types.Submission

ToHttpApiData CollectionLayout Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep CollectionLayout Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep CollectionLayout = D1 ('MetaData "CollectionLayout" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "Gallery" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Timeline" 'PrefixI 'False) (U1 :: Type -> Type))

type CollectionID = Text Source #

A UUID identifier for a Collection

data NewCollection Source #

Data to create a new Collection as a moderator action

Instances

Instances details
Eq NewCollection Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show NewCollection Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic NewCollection Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep NewCollection :: Type -> Type #

ToForm NewCollection Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Methods

toForm :: NewCollection -> Form #

type Rep NewCollection Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep NewCollection = D1 ('MetaData "NewCollection" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "NewCollection" 'PrefixI 'True) ((S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Title) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Body)) :*: (S1 ('MetaSel ('Just "subredditID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubredditID) :*: S1 ('MetaSel ('Just "layout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CollectionLayout)))))

Creating submissions

data SubmissionOptions Source #

Components to create a new submission

Constructors

SubmissionOptions 

Fields

Instances

Instances details
Eq SubmissionOptions Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show SubmissionOptions Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic SubmissionOptions Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep SubmissionOptions :: Type -> Type #

ToForm SubmissionOptions Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep SubmissionOptions Source # 
Instance details

Defined in Network.Reddit.Types.Submission

mkSubmissionOptions :: SubredditName -> Title -> SubmissionOptions Source #

Create a SubmissionOptions with default values for most fields

data NewSubmission Source #

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

Constructors

SelfPost Body SubmissionOptions 
WithInlineMedia Fancypants SubmissionOptions

The body should be generated using InlineMedia and converted to "fancypants" style markdown. Please see submitWithInlineMedia, which handles this

Link URL SubmissionOptions 
ImagePost UploadURL SubmissionOptions

Please see submitImage in order to create an image submission. The URL must point to a valid image hosted by Reddit

VideoPost UploadURL UploadURL Bool SubmissionOptions

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

Instances

Instances details
Eq NewSubmission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show NewSubmission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic NewSubmission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep NewSubmission :: Type -> Type #

ToForm NewSubmission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Methods

toForm :: NewSubmission -> Form #

type Rep NewSubmission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep NewSubmission = D1 ('MetaData "NewSubmission" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) ((C1 ('MetaCons "SelfPost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Body) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubmissionOptions)) :+: C1 ('MetaCons "WithInlineMedia" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Fancypants) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubmissionOptions))) :+: (C1 ('MetaCons "Link" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 URL) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubmissionOptions)) :+: (C1 ('MetaCons "ImagePost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UploadURL) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubmissionOptions)) :+: C1 ('MetaCons "VideoPost" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UploadURL) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UploadURL)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubmissionOptions))))))

data S3UploadLease Source #

Used to upload style assets and images to Reddit's servers when submitting content

Constructors

S3UploadLease 

Fields

Instances

Instances details
Eq S3UploadLease Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show S3UploadLease Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic S3UploadLease Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep S3UploadLease :: Type -> Type #

FromJSON S3UploadLease Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep S3UploadLease Source # 
Instance details

Defined in Network.Reddit.Types.Submission

data UploadType Source #

Used to distinguish upload types when creating submissions with media

Instances

Instances details
Eq UploadType Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show UploadType Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic UploadType Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep UploadType :: Type -> Type #

type Rep UploadType Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep UploadType = D1 ('MetaData "UploadType" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "SelfPostUpload" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LinkUpload" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GalleryUpload" 'PrefixI 'False) (U1 :: Type -> Type)))

data UploadResult Source #

Result issued from a websocket connection after uploading media

Constructors

UploadResult 

Instances

Instances details
Eq UploadResult Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show UploadResult Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic UploadResult Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep UploadResult :: Type -> Type #

FromJSON UploadResult Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep UploadResult Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep UploadResult = D1 ('MetaData "UploadResult" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "UploadResult" 'PrefixI 'True) (S1 ('MetaSel ('Just "resultType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "redirectURL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 URL)))

data CrosspostOptions Source #

Options for crossposting a submission

Constructors

CrosspostOptions 

Fields

Instances

Instances details
Eq CrosspostOptions Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show CrosspostOptions Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic CrosspostOptions Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep CrosspostOptions :: Type -> Type #

ToForm CrosspostOptions Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep CrosspostOptions Source # 
Instance details

Defined in Network.Reddit.Types.Submission

mkCrosspostOptions :: SubredditName -> Title -> CrosspostOptions Source #

CrosspostOptions with default values for most fields

data PostedCrosspost Source #

Wrapper for getting the submission ID after completing a crosspost

Instances

Instances details
Show PostedCrosspost Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic PostedCrosspost Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep PostedCrosspost :: Type -> Type #

FromJSON PostedCrosspost Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep PostedCrosspost Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep PostedCrosspost = D1 ('MetaData "PostedCrosspost" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'True) (C1 ('MetaCons "PostedCrosspost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SubmissionID)))

data Poll t Source #

A Reddit poll. See mkPoll to create a new one satisfying Reddit constraints on poll options and duration

Constructors

Poll 

Fields

Instances

Instances details
Eq (t Text) => Eq (Poll t) Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Methods

(==) :: Poll t -> Poll t -> Bool #

(/=) :: Poll t -> Poll t -> Bool #

Show (t Text) => Show (Poll t) Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Methods

showsPrec :: Int -> Poll t -> ShowS #

show :: Poll t -> String #

showList :: [Poll t] -> ShowS #

Generic (Poll t) Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep (Poll t) :: Type -> Type #

Methods

from :: Poll t -> Rep (Poll t) x #

to :: Rep (Poll t) x -> Poll t #

type Rep (Poll t) Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep (Poll t) = D1 ('MetaData "Poll" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "Poll" 'PrefixI 'True) (S1 ('MetaSel ('Just "options") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (t Text)) :*: (S1 ('MetaSel ('Just "duration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word) :*: S1 ('MetaSel ('Just "selftext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Body)))))

data PollSubmission t Source #

Wrapper providing a single ToJSON instance for Polls and SubmissionOptionss together

Instances

Instances details
Generic (PollSubmission t) Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep (PollSubmission t) :: Type -> Type #

Foldable t => ToJSON (PollSubmission t) Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep (PollSubmission t) Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep (PollSubmission t) = D1 ('MetaData "PollSubmission" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "PollSubmission" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Poll t)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SubmissionOptions)))

mkPoll :: (Foldable t, MonadThrow m) => t Text -> Word -> m (Poll t) Source #

Create a new Poll, validating the following constraints: * The duration is between 1 and 7 * The number of options is between 2 and 6

data GalleryImage Source #

A single image in a gallery submission

Constructors

GalleryImage 

Fields

Instances

Instances details
Eq GalleryImage Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show GalleryImage Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic GalleryImage Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep GalleryImage :: Type -> Type #

type Rep GalleryImage Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep GalleryImage = D1 ('MetaData "GalleryImage" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "GalleryImage" 'PrefixI 'True) (S1 ('MetaSel ('Just "imagePath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FilePath) :*: (S1 ('MetaSel ('Just "caption") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Body)) :*: S1 ('MetaSel ('Just "outboundURL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe URL)))))

mkGalleryImage :: FilePath -> GalleryImage Source #

Create a GalleryImage with default values for the caption and outboundURL fields

galleryImageToUpload :: GalleryImage -> UploadURL -> GalleryUploadImage Source #

Convert a GalleryImage to to GalleryUploadImage after obtaining the UploadURL

data GallerySubmission t Source #

Wrapper providing a single ToJSON instance for a container of GalleryUploadImages and SubmissionOptionss together

Constructors

GallerySubmission (t GalleryUploadImage) SubmissionOptions 

data InlineMedia Source #

A piece of inline media that can be added to a self-text post

Constructors

InlineMedia 

Fields

  • mediaType :: InlineMediaType
     
  • mediaPath :: FilePath

    The path must be valid and the file type must correspond to the provided mediaType field

  • key :: Text

    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

  • caption :: Maybe Body

    Optional caption for the media

Instances

Instances details
Eq InlineMedia Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show InlineMedia Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic InlineMedia Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep InlineMedia :: Type -> Type #

type Rep InlineMedia Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep InlineMedia = D1 ('MetaData "InlineMedia" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "InlineMedia" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mediaType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 InlineMediaType) :*: S1 ('MetaSel ('Just "mediaPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FilePath)) :*: (S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "caption") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Body)))))

data InlineMediaType Source #

The type of inline media

Instances

Instances details
Eq InlineMediaType Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show InlineMediaType Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic InlineMediaType Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep InlineMediaType :: Type -> Type #

ToHttpApiData InlineMediaType Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep InlineMediaType Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep InlineMediaType = D1 ('MetaData "InlineMediaType" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "InlineImage" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InlineGIF" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InlineVideo" 'PrefixI 'False) (U1 :: Type -> Type)))

data InlineMediaUpload Source #

As an InlineMedia, but after obtaining the URL for the Reddit-hosted image

data Fancypants Source #

Represents richtext JSON object. This should be generated through an API endpoint

Instances

Instances details
Eq Fancypants Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show Fancypants Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic Fancypants Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep Fancypants :: Type -> Type #

ToJSON Fancypants Source # 
Instance details

Defined in Network.Reddit.Types.Submission

FromJSON Fancypants Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep Fancypants Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep Fancypants = D1 ('MetaData "Fancypants" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'True) (C1 ('MetaCons "Fancypants" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Object)))

data PostedSubmission Source #

Wrapper for getting the URL from the JSON object that is returned when posting a new submissions

Instances

Instances details
Show PostedSubmission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic PostedSubmission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep PostedSubmission :: Type -> Type #

FromJSON PostedSubmission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep PostedSubmission Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep PostedSubmission = D1 ('MetaData "PostedSubmission" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'True) (C1 ('MetaCons "PostedSubmission" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 URL)))

Search

data Search Source #

The text to search, along with an optional SubredditName

Constructors

Search 

Fields

Instances

Instances details
Eq Search Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Methods

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

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

Show Search Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic Search Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep Search :: Type -> Type #

Methods

from :: Search -> Rep Search x #

to :: Rep Search x -> Search #

ToForm Search Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Methods

toForm :: Search -> Form #

Paginable Search Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep Search Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep Search = D1 ('MetaData "Search" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "Search" 'PrefixI 'True) (S1 ('MetaSel ('Just "q") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "subreddit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SubredditName)) :*: S1 ('MetaSel ('Just "syntax") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SearchSyntax)))))
type PaginateOptions Search Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type PaginateThing Search Source # 
Instance details

Defined in Network.Reddit.Types.Submission

data SearchSort Source #

The sort order for Searches

Instances

Instances details
Eq SearchSort Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show SearchSort Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic SearchSort Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep SearchSort :: Type -> Type #

ToHttpApiData SearchSort Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep SearchSort Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep SearchSort = D1 ('MetaData "SearchSort" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) ((C1 ('MetaCons "ByRelevance" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ByNew" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ByHot" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ByTop" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ByComments" 'PrefixI 'False) (U1 :: Type -> Type))))

data SearchCategory Source #

The category for the Search

Instances

Instances details
Eq SearchCategory Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show SearchCategory Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic SearchCategory Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep SearchCategory :: Type -> Type #

type Rep SearchCategory Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep SearchCategory = D1 ('MetaData "SearchCategory" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'True) (C1 ('MetaCons "SearchCategory" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

mkSearchCategory :: MonadThrow m => Text -> m SearchCategory Source #

Create a SearchCategory from Text, the length of which must not exceed 5 characters

data SearchOpts Source #

Options for paginating and filtering Searches

Instances

Instances details
Eq SearchOpts Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show SearchOpts Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic SearchOpts Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep SearchOpts :: Type -> Type #

ToForm SearchOpts Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Methods

toForm :: SearchOpts -> Form #

type Rep SearchOpts Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep SearchOpts = D1 ('MetaData "SearchOpts" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "SearchOpts" 'PrefixI 'True) (S1 ('MetaSel ('Just "searchSort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SearchSort) :*: (S1 ('MetaSel ('Just "searchTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Time) :*: S1 ('MetaSel ('Just "category") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SearchCategory)))))

newtype ResultID Source #

A wrapper around SubmissionIDs that allows Listing ResultID a to be distinguished from Listing SubmissionID a

Constructors

ResultID SubmissionID 

Instances

Instances details
Show ResultID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic ResultID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep ResultID :: Type -> Type #

Methods

from :: ResultID -> Rep ResultID x #

to :: Rep ResultID x -> ResultID #

FromJSON ResultID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Thing ResultID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep ResultID Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep ResultID = D1 ('MetaData "ResultID" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'True) (C1 ('MetaCons "ResultID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SubmissionID)))

data SearchSyntax Source #

The syntax to use in the Search

Instances

Instances details
Eq SearchSyntax Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Show SearchSyntax Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Generic SearchSyntax Source # 
Instance details

Defined in Network.Reddit.Types.Submission

Associated Types

type Rep SearchSyntax :: Type -> Type #

ToHttpApiData SearchSyntax Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep SearchSyntax Source # 
Instance details

Defined in Network.Reddit.Types.Submission

type Rep SearchSyntax = D1 ('MetaData "SearchSyntax" "Network.Reddit.Types.Submission" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "Lucene" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Cloudsearch" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PlainSyntax" 'PrefixI 'False) (U1 :: Type -> Type)))

mkSearch :: Text -> Search Source #

Create a new Search by providing the query, with defaults for the other fields