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
Eq Account Source # | |
Show Account Source # | |
ToJSON Account Source # | |
Defined in Web.Telegraph.Types | |
FromJSON Account Source # | |
(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "accessToken" k Account Account a b Source # | |
Defined in Web.Telegraph.Types | |
(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "authUrl" k Account Account a b Source # | |
Defined in Web.Telegraph.Types | |
(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "authorName" k Account Account a b Source # | |
Defined in Web.Telegraph.Types | |
(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "authorUrl" k Account Account a b Source # | |
Defined in Web.Telegraph.Types | |
(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "pageCount" k Account Account a b Source # | |
Defined in Web.Telegraph.Types | |
(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "shortName" k Account Account a b Source # | |
Defined in Web.Telegraph.Types |
A list of Telegraph articles belonging to an account
Most recently created articles first
PageList | |
|
Instances
Eq PageList Source # | |
Show 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 |
A page on Telegraph
Page | |
|
Instances
The number of page views for a Telegraph article
A DOM Node
Instances
Eq Node Source # | |
Show 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 |
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 # | |
FromJSON a => FromJSON (Result a) Source # | |
An image uploaded to Telegraph
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 |