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.Types.Award

Description

 
Synopsis

Documentation

data Awarding Source #

Information about a Reddit award that has been granted. This can be a "global" award that may be granted site-wide, or a "community" award that is limited to a single subreddit

Instances

Instances details
Eq Awarding Source # 
Instance details

Defined in Network.Reddit.Types.Award

Show Awarding Source # 
Instance details

Defined in Network.Reddit.Types.Award

Generic Awarding Source # 
Instance details

Defined in Network.Reddit.Types.Award

Associated Types

type Rep Awarding :: Type -> Type #

Methods

from :: Awarding -> Rep Awarding x #

to :: Rep Awarding x -> Awarding #

FromJSON Awarding Source # 
Instance details

Defined in Network.Reddit.Types.Award

type Rep Awarding Source # 
Instance details

Defined in Network.Reddit.Types.Award

newtype AwardID Source #

The ID for an award, which users can grant each other. If you want to create a new AwardID, see the bundled pattern synonyms for this type, which include various common awards. Also see "doc/awards.org" in this repository for a list of awards and their IDs.

Note: Most newer awards are composed of a UUID identifier and an "award_" prefix. If you construct this type directly, you should omit the prefix, which will be added for you when making API requests

Constructors

AwardID Text 

Bundled Patterns

pattern Silver :: AwardID 
pattern Gold :: AwardID 
pattern Platinum :: AwardID 
pattern Argentium :: AwardID 
pattern Ternion :: AwardID 

Instances

Instances details
Eq AwardID Source # 
Instance details

Defined in Network.Reddit.Types.Award

Methods

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

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

Show AwardID Source # 
Instance details

Defined in Network.Reddit.Types.Award

Generic AwardID Source # 
Instance details

Defined in Network.Reddit.Types.Award

Associated Types

type Rep AwardID :: Type -> Type #

Methods

from :: AwardID -> Rep AwardID x #

to :: Rep AwardID x -> AwardID #

Hashable AwardID Source # 
Instance details

Defined in Network.Reddit.Types.Award

Methods

hashWithSalt :: Int -> AwardID -> Int #

hash :: AwardID -> Int #

FromJSON AwardID Source # 
Instance details

Defined in Network.Reddit.Types.Award

FromJSONKey AwardID Source # 
Instance details

Defined in Network.Reddit.Types.Award

ToHttpApiData AwardID Source # 
Instance details

Defined in Network.Reddit.Types.Award

type Rep AwardID Source # 
Instance details

Defined in Network.Reddit.Types.Award

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

data AwardType Source #

The type of the Awarding, either site-wide ("global") or limited to a "community"

Constructors

Global 
Community 

Instances

Instances details
Eq AwardType Source # 
Instance details

Defined in Network.Reddit.Types.Award

Show AwardType Source # 
Instance details

Defined in Network.Reddit.Types.Award

Generic AwardType Source # 
Instance details

Defined in Network.Reddit.Types.Award

Associated Types

type Rep AwardType :: Type -> Type #

FromJSON AwardType Source # 
Instance details

Defined in Network.Reddit.Types.Award

type Rep AwardType Source # 
Instance details

Defined in Network.Reddit.Types.Award

type Rep AwardType = D1 ('MetaData "AwardType" "Network.Reddit.Types.Award" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "Global" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Community" 'PrefixI 'False) (U1 :: Type -> Type))

data Award Source #

Options for awarding an item

Constructors

Award 

Fields

Instances

Instances details
Eq Award Source # 
Instance details

Defined in Network.Reddit.Types.Award

Methods

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

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

Show Award Source # 
Instance details

Defined in Network.Reddit.Types.Award

Methods

showsPrec :: Int -> Award -> ShowS #

show :: Award -> String #

showList :: [Award] -> ShowS #

Generic Award Source # 
Instance details

Defined in Network.Reddit.Types.Award

Associated Types

type Rep Award :: Type -> Type #

Methods

from :: Award -> Rep Award x #

to :: Rep Award x -> Award #

ToForm Award Source # 
Instance details

Defined in Network.Reddit.Types.Award

Methods

toForm :: Award -> Form #

type Rep Award Source # 
Instance details

Defined in Network.Reddit.Types.Award

type Rep Award = D1 ('MetaData "Award" "Network.Reddit.Types.Award" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "Award" 'PrefixI 'True) (S1 ('MetaSel ('Just "awardID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AwardID) :*: (S1 ('MetaSel ('Just "isAnonymous") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Body)))))

mkAward :: AwardID -> Award Source #

Create a new anonymous Awarding without a message, given an AwardID

data Trophy Source #

A Reddit trophy, such as the "one-year club", that the Reddit grants users. Redditors cannot gift each other these trophies

Instances

Instances details
Eq Trophy Source # 
Instance details

Defined in Network.Reddit.Types.Award

Methods

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

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

Show Trophy Source # 
Instance details

Defined in Network.Reddit.Types.Award

Generic Trophy Source # 
Instance details

Defined in Network.Reddit.Types.Award

Associated Types

type Rep Trophy :: Type -> Type #

Methods

from :: Trophy -> Rep Trophy x #

to :: Rep Trophy x -> Trophy #

FromJSON Trophy Source # 
Instance details

Defined in Network.Reddit.Types.Award

type Rep Trophy Source # 
Instance details

Defined in Network.Reddit.Types.Award

type TrophyID = Text Source #

The ID of a Trophy

data TrophyList Source #

Wrapper for parsing JSON objects listing Trophys

Instances

Instances details
Show TrophyList Source # 
Instance details

Defined in Network.Reddit.Types.Award

Generic TrophyList Source # 
Instance details

Defined in Network.Reddit.Types.Award

Associated Types

type Rep TrophyList :: Type -> Type #

FromJSON TrophyList Source # 
Instance details

Defined in Network.Reddit.Types.Award

type Rep TrophyList Source # 
Instance details

Defined in Network.Reddit.Types.Award

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

data AwardingsSummary Source #

A summary of your Awardings, returned after you have awarded an item

Constructors

AwardingsSummary 

Fields

Instances

Instances details
Eq AwardingsSummary Source # 
Instance details

Defined in Network.Reddit.Types.Award

Show AwardingsSummary Source # 
Instance details

Defined in Network.Reddit.Types.Award

Generic AwardingsSummary Source # 
Instance details

Defined in Network.Reddit.Types.Award

Associated Types

type Rep AwardingsSummary :: Type -> Type #

FromJSON AwardingsSummary Source # 
Instance details

Defined in Network.Reddit.Types.Award

type Rep AwardingsSummary Source # 
Instance details

Defined in Network.Reddit.Types.Award

type Rep AwardingsSummary = D1 ('MetaData "AwardingsSummary" "Network.Reddit.Types.Award" "heddit-0.2-6CPbqZeiNUj1PM6nX368ZU" 'False) (C1 ('MetaCons "AwardingsSummary" 'PrefixI 'True) (S1 ('MetaSel ('Just "allAwardings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq Awarding)) :*: (S1 ('MetaSel ('Just "gildings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap AwardID Integer)) :*: S1 ('MetaSel ('Just "coins") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Integer))))