| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Web.Telegraph.Types
Description
Type definitions, note that all fields are strict
Synopsis
- data Account = Account {}
- data PageList = PageList {
- totalCount :: Int
- pages :: [Page]
- data Page = Page {}
- newtype PageViews = PageViews {}
- data Node
- data NodeElement = NodeElement {}
- data Result a
- newtype Image = Image {}
- data UploadResult
- = UploadError { }
- | Sources [Image]
- newtype TelegraphError = APICallFailure Text
Documentation
A Telegraph account
Constructors
| Account | |
Fields
| |
Instances
| Eq Account Source # | |
| Show Account Source # | |
| Generic Account Source # | |
| ToJSON Account Source # | |
Defined in Web.Telegraph.Types | |
| FromJSON Account Source # | |
| type Rep Account Source # | |
Defined in Web.Telegraph.Types type Rep Account = D1 ('MetaData "Account" "Web.Telegraph.Types" "telegraph-1.0.0-inplace" 'False) (C1 ('MetaCons "Account" 'PrefixI 'True) ((S1 ('MetaSel ('Just "shortName") 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "authorName") 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "authorUrl") 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "accessToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "authUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "pageCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)))))) | |
A list of Telegraph articles belonging to an account
Most recently created articles first
Constructors
| PageList | |
Fields
| |
Instances
| Eq PageList Source # | |
| Show PageList Source # | |
| Generic PageList Source # | |
| ToJSON PageList Source # | |
Defined in Web.Telegraph.Types | |
| FromJSON PageList Source # | |
| type Rep PageList Source # | |
Defined in Web.Telegraph.Types type Rep PageList = D1 ('MetaData "PageList" "Web.Telegraph.Types" "telegraph-1.0.0-inplace" 'False) (C1 ('MetaCons "PageList" 'PrefixI 'True) (S1 ('MetaSel ('Just "totalCount") 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "pages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Page]))) | |
A page on Telegraph
Constructors
| Page | |
Fields
| |
Instances
The number of page views for a Telegraph article
A DOM Node
Constructors
| Content Text | |
| Element NodeElement |
Instances
| Eq Node Source # | |
| Show Node Source # | |
| Generic Node Source # | |
| ToJSON Node Source # | |
Defined in Web.Telegraph.Types | |
| FromJSON Node Source # | |
| type Rep Node Source # | |
Defined in Web.Telegraph.Types type Rep Node = D1 ('MetaData "Node" "Web.Telegraph.Types" "telegraph-1.0.0-inplace" 'False) (C1 ('MetaCons "Content" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "Element" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 NodeElement))) | |
data NodeElement Source #
A DOM elemen node
Constructors
| NodeElement | |
Fields
| |
Instances
The result of an API call
Instances
| Eq a => Eq (Result a) Source # | |
| Show a => Show (Result a) Source # | |
| Generic (Result a) Source # | |
| FromJSON a => FromJSON (Result a) Source # | |
| type Rep (Result a) Source # | |
Defined in Web.Telegraph.Types type Rep (Result a) = D1 ('MetaData "Result" "Web.Telegraph.Types" "telegraph-1.0.0-inplace" 'False) (C1 ('MetaCons "Error" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "Result" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 a))) | |
An image uploaded to Telegraph
data UploadResult Source #
The result of an image upload
Constructors
| UploadError | |
| Sources [Image] | |
Instances
newtype TelegraphError Source #
Constructors
| APICallFailure Text | An api call has failed, we cannot distinguish between minor errors (such as illformed author urls) and much serious errors, such as invalid accessTokens, so we always throw exceptions |
Instances
| Eq TelegraphError Source # | |
Defined in Web.Telegraph.Types Methods (==) :: TelegraphError -> TelegraphError -> Bool # (/=) :: TelegraphError -> TelegraphError -> Bool # | |
| Show TelegraphError Source # | |
Defined in Web.Telegraph.Types Methods showsPrec :: Int -> TelegraphError -> ShowS # show :: TelegraphError -> String # showList :: [TelegraphError] -> ShowS # | |
| Exception TelegraphError Source # | |
Defined in Web.Telegraph.Types Methods toException :: TelegraphError -> SomeException # | |