Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Response responseType
- responseStatus :: forall responseType. Lens' (Response responseType) Status
- responseBody :: forall a b. Lens (Response a) (Response b) a b
- responseHeaders :: forall responseType. Lens' (Response responseType) ResponseHeaders
- data TwitterErrorMessage
- twitterErrorMessage :: Lens' TwitterErrorMessage Text
- twitterErrorCode :: Lens' TwitterErrorMessage Int
- data WithCursor cursorType cursorKey wrapped
- previousCursor :: forall cursorType cursorKey wrapped. Lens' (WithCursor cursorType cursorKey wrapped) (Maybe cursorType)
- nextCursor :: forall cursorType cursorKey wrapped. Lens' (WithCursor cursorType cursorKey wrapped) (Maybe cursorType)
- contents :: forall cursorType cursorKey a b. Lens (WithCursor cursorType cursorKey a) (WithCursor cursorType cursorKey b) [a] [b]
- data TwitterError
- class CursorKey a where
- data IdsCursorKey
- data UsersCursorKey
- data ListsCursorKey
Response
data Response responseType Source #
Instances
Functor Response Source # | |
Foldable Response Source # | |
Defined in Web.Twitter.Conduit.Response fold :: Monoid m => Response m -> m # foldMap :: Monoid m => (a -> m) -> Response a -> m # foldMap' :: Monoid m => (a -> m) -> Response a -> m # foldr :: (a -> b -> b) -> b -> Response a -> b # foldr' :: (a -> b -> b) -> b -> Response a -> b # foldl :: (b -> a -> b) -> b -> Response a -> b # foldl' :: (b -> a -> b) -> b -> Response a -> b # foldr1 :: (a -> a -> a) -> Response a -> a # foldl1 :: (a -> a -> a) -> Response a -> a # elem :: Eq a => a -> Response a -> Bool # maximum :: Ord a => Response a -> a # minimum :: Ord a => Response a -> a # | |
Traversable Response Source # | |
Eq responseType => Eq (Response responseType) Source # | |
Show responseType => Show (Response responseType) Source # | |
responseHeaders :: forall responseType. Lens' (Response responseType) ResponseHeaders Source #
TwitterErrorMessage
data TwitterErrorMessage Source #
Twitter Error Messages
see detail: https://dev.twitter.com/docs/error-codes-responses
Instances
WithCursor
data WithCursor cursorType cursorKey wrapped Source #
A wrapper for API responses which have "next_cursor" field.
The first type parameter of WithCursor
specifies the field name of contents.
>>>
let Just res = decode "{\"previous_cursor\": 0, \"next_cursor\": 1234567890, \"ids\": [1111111111]}" :: Maybe (WithCursor Integer IdsCursorKey UserId)
>>>
nextCursor res
Just 1234567890>>>
contents res
[1111111111]
>>>
let Just res = decode "{\"previous_cursor\": 0, \"next_cursor\": 0, \"users\": [1000]}" :: Maybe (WithCursor Integer UsersCursorKey UserId)
>>>
nextCursor res
Just 0>>>
contents res
[1000]
>>>
let Just res = decode "{\"next_cursor\": \"hogehoge\", \"events\": [1000]}" :: Maybe (WithCursor Text EventsCursorKey UserId)
>>>
nextCursor res
Just "hogehoge">>>
contents res
[1000]
Instances
(Show cursorType, Show wrapped) => Show (WithCursor cursorType cursorKey wrapped) Source # | |
Defined in Web.Twitter.Conduit.Cursor showsPrec :: Int -> WithCursor cursorType cursorKey wrapped -> ShowS # show :: WithCursor cursorType cursorKey wrapped -> String # showList :: [WithCursor cursorType cursorKey wrapped] -> ShowS # | |
(FromJSON wrapped, FromJSON ct, CursorKey c) => FromJSON (WithCursor ct c wrapped) Source # | |
Defined in Web.Twitter.Conduit.Cursor parseJSON :: Value -> Parser (WithCursor ct c wrapped) # parseJSONList :: Value -> Parser [WithCursor ct c wrapped] # |
previousCursor :: forall cursorType cursorKey wrapped. Lens' (WithCursor cursorType cursorKey wrapped) (Maybe cursorType) Source #
nextCursor :: forall cursorType cursorKey wrapped. Lens' (WithCursor cursorType cursorKey wrapped) (Maybe cursorType) Source #
contents :: forall cursorType cursorKey a b. Lens (WithCursor cursorType cursorKey a) (WithCursor cursorType cursorKey b) [a] [b] Source #
Re-exports
data TwitterError Source #
FromJSONError String | |
TwitterErrorResponse Status ResponseHeaders [TwitterErrorMessage] | |
TwitterUnknownErrorResponse Status ResponseHeaders Value | |
TwitterStatusError Status ResponseHeaders Value |
Instances
Eq TwitterError Source # | |
Defined in Web.Twitter.Conduit.Response (==) :: TwitterError -> TwitterError -> Bool # (/=) :: TwitterError -> TwitterError -> Bool # | |
Show TwitterError Source # | |
Defined in Web.Twitter.Conduit.Response showsPrec :: Int -> TwitterError -> ShowS # show :: TwitterError -> String # showList :: [TwitterError] -> ShowS # | |
Exception TwitterError Source # | |
Defined in Web.Twitter.Conduit.Response |
class CursorKey a where Source #
Instances
CursorKey EventsCursorKey Source # | |
Defined in Web.Twitter.Conduit.Cursor cursorKey :: EventsCursorKey -> Key Source # | |
CursorKey ListsCursorKey Source # | |
Defined in Web.Twitter.Conduit.Cursor cursorKey :: ListsCursorKey -> Key Source # | |
CursorKey UsersCursorKey Source # | |
Defined in Web.Twitter.Conduit.Cursor cursorKey :: UsersCursorKey -> Key Source # | |
CursorKey IdsCursorKey Source # | |
Defined in Web.Twitter.Conduit.Cursor cursorKey :: IdsCursorKey -> Key Source # |
data IdsCursorKey Source #
Phantom type to specify the key which point out the content in the response.
Instances
CursorKey IdsCursorKey Source # | |
Defined in Web.Twitter.Conduit.Cursor cursorKey :: IdsCursorKey -> Key Source # |
data UsersCursorKey Source #
Phantom type to specify the key which point out the content in the response.
Instances
CursorKey UsersCursorKey Source # | |
Defined in Web.Twitter.Conduit.Cursor cursorKey :: UsersCursorKey -> Key Source # |
data ListsCursorKey Source #
Phantom type to specify the key which point out the content in the response.
Instances
CursorKey ListsCursorKey Source # | |
Defined in Web.Twitter.Conduit.Cursor cursorKey :: ListsCursorKey -> Key Source # |