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

Description

 
Synopsis

Documentation

data Multireddit Source #

An aggregation of individual Subreddits

Constructors

Multireddit 

Fields

Instances

Instances details
Eq Multireddit Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Show Multireddit Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Generic Multireddit Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Associated Types

type Rep Multireddit :: Type -> Type #

FromJSON Multireddit Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

type Rep Multireddit Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

type Rep Multireddit = D1 ('MetaData "Multireddit" "Network.Reddit.Types.Multireddit" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "Multireddit" 'PrefixI 'True) (((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MultiName) :*: (S1 ('MetaSel ('Just "displayName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "subreddits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq SubredditName)))) :*: (S1 ('MetaSel ('Just "created") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Body) :*: S1 ('MetaSel ('Just "descriptionHTML") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Body)))) :*: ((S1 ('MetaSel ('Just "keyColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RGBText)) :*: (S1 ('MetaSel ('Just "multipath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MultiPath) :*: S1 ('MetaSel ('Just "visibility") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MultiVisibility))) :*: (S1 ('MetaSel ('Just "copiedFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MultiPath)) :*: (S1 ('MetaSel ('Just "canEdit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "over18") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))))))

data MultiName Source #

The name of a Multireddit, which may only contain alphanumeric characters

Instances

Instances details
Eq MultiName Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Show MultiName Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Generic MultiName Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Associated Types

type Rep MultiName :: Type -> Type #

FromJSON MultiName Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

ToHttpApiData MultiName Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

type Rep MultiName Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

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

mkMultiName :: MonadThrow m => Text -> m MultiName Source #

Smart constructor for MultiNames, which may only contain alphanumeric characters

data MultiVisibility Source #

The configured visibility level for a Multireddit

Instances

Instances details
Eq MultiVisibility Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Ord MultiVisibility Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Show MultiVisibility Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Generic MultiVisibility Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Associated Types

type Rep MultiVisibility :: Type -> Type #

ToJSON MultiVisibility Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

FromJSON MultiVisibility Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

type Rep MultiVisibility Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

type Rep MultiVisibility = D1 ('MetaData "MultiVisibility" "Network.Reddit.Types.Multireddit" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "PrivateMulti" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PublicMulti" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HiddenMulti" 'PrefixI 'False) (U1 :: Type -> Type)))

data MultiPath Source #

The path to a Multireddit, of the form /user/USERNAME/m/MULTINAME

Constructors

MultiPath 

Instances

Instances details
Eq MultiPath Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Show MultiPath Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Generic MultiPath Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Associated Types

type Rep MultiPath :: Type -> Type #

FromJSON MultiPath Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

ToHttpApiData MultiPath Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

type Rep MultiPath Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

type Rep MultiPath = D1 ('MetaData "MultiPath" "Network.Reddit.Types.Multireddit" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "MultiPath" 'PrefixI 'True) (S1 ('MetaSel ('Just "username") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Username) :*: S1 ('MetaSel ('Just "multiname") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MultiName)))

data NewMultiF f Source #

Can represent either a new multireddit when parameterized by Identity, or a multireddit update when parameterized by Maybe. In both cases, keyColor is an optional field

Instances

Instances details
Show MultiUpdate Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Show NewMulti Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

ToJSON MultiUpdate Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

ToJSON NewMulti Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Generic (NewMultiF f) Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

Associated Types

type Rep (NewMultiF f) :: Type -> Type #

Methods

from :: NewMultiF f -> Rep (NewMultiF f) x #

to :: Rep (NewMultiF f) x -> NewMultiF f #

type Rep (NewMultiF f) Source # 
Instance details

Defined in Network.Reddit.Types.Multireddit

type Rep (NewMultiF f) = D1 ('MetaData "NewMultiF" "Network.Reddit.Types.Multireddit" "heddit-0.0.1-76ROQ5tOAm3CpLSaFw8ccb" 'False) (C1 ('MetaCons "NewMultiF" 'PrefixI 'True) ((S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HKD f Body)) :*: S1 ('MetaSel ('Just "displayName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HKD f Text))) :*: (S1 ('MetaSel ('Just "subreddits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HKD f (Seq SubredditName))) :*: (S1 ('MetaSel ('Just "visibility") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HKD f MultiVisibility)) :*: S1 ('MetaSel ('Just "keyColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RGBText))))))

type NewMulti = NewMultiF Identity Source #

An new multireddit, where all fields are required

type MultiUpdate = NewMultiF Maybe Source #

An update to a multireddit, where all fields are optional. If a field is not provided, it is omitted during JSON encoding

defaultMultiUpdate :: MultiUpdate Source #

A MultiUpdate with all Nothing fields, for convenience