Safe Haskell | None |
---|
Web.Twitter.Conduit.Types
- data Response responseType = Response {
- responseStatus :: Status
- responseHeaders :: ResponseHeaders
- responseBody :: responseType
- data TwitterError
- data TwitterErrorMessage = TwitterErrorMessage {}
- class CursorKey a where
- data IdsCursorKey
- data UsersCursorKey
- data WithCursor cursorKey wrapped = WithCursor {
- previousCursor :: Integer
- nextCursor :: Integer
- contents :: [wrapped]
- data MediaData
Documentation
data Response responseType Source
Constructors
Response | |
Fields
|
data TwitterError Source
data TwitterErrorMessage Source
Twitter Error Messages
see detail: https://dev.twitter.com/docs/error-codes-responses
Constructors
TwitterErrorMessage | |
Fields |
Instances
data IdsCursorKey Source
Phantom type to specify the key which point out the content in the response.
Instances
data UsersCursorKey Source
Phantom type to specify the key which point out the content in the response.
Instances
data WithCursor 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 IdsCursorKey UserId)
>>>
nextCursor res
1234567890>>>
contents res
[1111111111]
>>>
let Just res = decode "{\"previous_cursor\": 0, \"next_cursor\": 0, \"users\": [1000]}" :: Maybe (WithCursor UsersCursorKey UserId)
>>>
nextCursor res
0>>>
contents res
[1000]
Constructors
WithCursor | |
Fields
|
Instances
Show wrapped => Show (WithCursor cursorKey wrapped) | |
(FromJSON wrapped, CursorKey c) => FromJSON (WithCursor c wrapped) |
Constructors
MediaFromFile FilePath | |
MediaRequestBody FilePath RequestBody |