Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
Account | |
|
Instances
A list of Telegraph articles belonging to an account
Most recently created articles first
PageList | |
|
Instances
Eq PageList Source # | |
Show PageList Source # | |
Generic PageList Source # | |
ToJSON PageList Source # | |
Defined in Web.Telegraph.Types | |
FromJSON PageList Source # | |
(k ~ A_Lens, a ~ [Page], b ~ [Page]) => LabelOptic "pages" k PageList PageList a b Source # | |
Defined in Web.Telegraph.Types | |
(k ~ A_Lens, a ~ Int, b ~ Int) => LabelOptic "totalCount" k PageList PageList a b Source # | |
Defined in Web.Telegraph.Types | |
type Rep PageList Source # | |
Defined in Web.Telegraph.Types type Rep PageList = D1 ('MetaData "PageList" "Web.Telegraph.Types" "telegraph-1.1.1-AO7JtOnzfnv1glu1YCJAla" '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
Page | |
|
Instances
The number of page views for a Telegraph article
Instances
Eq PageViews Source # | |
Show PageViews Source # | |
Generic PageViews Source # | |
ToJSON PageViews Source # | |
Defined in Web.Telegraph.Types | |
FromJSON PageViews Source # | |
(k ~ An_Iso, a ~ Int, b ~ Int) => LabelOptic "views" k PageViews PageViews a b Source # | |
Defined in Web.Telegraph.Types | |
type Rep PageViews Source # | |
Defined in Web.Telegraph.Types |
A DOM Node
Instances
Eq Node Source # | |
Show Node Source # | |
Generic Node Source # | |
ToJSON Node Source # | |
Defined in Web.Telegraph.Types | |
FromJSON Node Source # | |
(k ~ A_Prism, a ~ Text, b ~ Text) => LabelOptic "_Content" k Node Node a b Source # | |
Defined in Web.Telegraph.Types | |
(k ~ A_Prism, a ~ NodeElement, b ~ NodeElement) => LabelOptic "_Element" k Node Node a b Source # | |
Defined in Web.Telegraph.Types | |
type Rep Node Source # | |
Defined in Web.Telegraph.Types type Rep Node = D1 ('MetaData "Node" "Web.Telegraph.Types" "telegraph-1.1.1-AO7JtOnzfnv1glu1YCJAla" '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
NodeElement | |
|
Instances
The result of an API call
Instances
(k ~ A_Prism, a1 ~ Text, b ~ Text) => LabelOptic "_Error" k (Result a2) (Result a2) a1 b Source # | |
Defined in Web.Telegraph.Types | |
(k ~ A_Prism, a1 ~ a2, b ~ a3) => LabelOptic "_Result" k (Result a2) (Result a3) a1 b Source # | |
Defined in Web.Telegraph.Types | |
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.1.1-AO7JtOnzfnv1glu1YCJAla" '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
Instances
Eq Image Source # | |
Show Image Source # | |
Generic Image Source # | |
ToJSON Image Source # | |
Defined in Web.Telegraph.Types | |
FromJSON Image Source # | |
(k ~ An_Iso, a ~ Text, b ~ Text) => LabelOptic "src" k Image Image a b Source # | |
Defined in Web.Telegraph.Types | |
type Rep Image Source # | |
Defined in Web.Telegraph.Types |
data UploadResult Source #
The result of an image upload
Instances
newtype TelegraphError Source #
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 (==) :: TelegraphError -> TelegraphError -> Bool # (/=) :: TelegraphError -> TelegraphError -> Bool # | |
Show TelegraphError Source # | |
Defined in Web.Telegraph.Types showsPrec :: Int -> TelegraphError -> ShowS # show :: TelegraphError -> String # showList :: [TelegraphError] -> ShowS # | |
Exception TelegraphError Source # | |
Defined in Web.Telegraph.Types |