twitter-conduit-0.5.0: Twitter API package with conduit interface and Streaming API support.

Safe Haskell | None
Language | Haskell2010

Web.Twitter.Conduit.Response

Synopsis

- data Response responseType = Response {
  - responseStatus :: Status
  - responseHeaders :: ResponseHeaders
  - responseBody :: responseType
  }
- data TwitterError
  - = FromJSONError String
  - | TwitterErrorResponse Status ResponseHeaders [TwitterErrorMessage]
  - | TwitterUnknownErrorResponse Status ResponseHeaders Value
  - | TwitterStatusError Status ResponseHeaders Value
- data TwitterErrorMessage = TwitterErrorMessage {
  - twitterErrorCode :: Int
  - twitterErrorMessage :: Text
  }

# Documentation

data Response responseType Source #

Constructors

Response |

Fields

- responseStatus :: Status
- responseHeaders :: ResponseHeaders
- responseBody :: responseType

#### Instances

Instances details

Functor Response Source # |
Instance details Defined in Web.Twitter.Conduit.Response Methods fmap :: (a -> b) -> Response a -> Response b (<$) :: a -> Response b -> Response a
Foldable Response Source # |

Instance details

Defined in Web.Twitter.Conduit.Response

Methods

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

toList :: Response a -> [a]

null :: Response a -> Bool

length :: Response a -> Int

elem :: Eq a => a -> Response a -> Bool

maximum :: Ord a => Response a -> a

minimum :: Ord a => Response a -> a

sum :: Num a => Response a -> a

product :: Num a => Response a -> a

Traversable Response Source # |
Instance details Defined in Web.Twitter.Conduit.Response Methods traverse :: Applicative f => (a -> f b) -> Response a -> f (Response b) # sequenceA :: Applicative f => Response (f a) -> f (Response a) mapM :: Monad m => (a -> m b) -> Response a -> m (Response b) sequence :: Monad m => Response (m a) -> m (Response a)
Eq responseType => Eq (Response responseType) Source # |
Instance details Defined in Web.Twitter.Conduit.Response Methods (==) :: Response responseType -> Response responseType -> Bool (/=) :: Response responseType -> Response responseType -> Bool
Show responseType => Show (Response responseType) Source # |
Instance details Defined in Web.Twitter.Conduit.Response Methods showsPrec :: Int -> Response responseType -> ShowS show :: Response responseType -> String showList :: [Response responseType] -> ShowS

data TwitterError Source #

Constructors

FromJSONError String |
TwitterErrorResponse Status ResponseHeaders [TwitterErrorMessage] |
TwitterUnknownErrorResponse Status ResponseHeaders Value |
TwitterStatusError Status ResponseHeaders Value |

#### Instances

Instances details

Eq TwitterError Source # |
Instance details Defined in Web.Twitter.Conduit.Response Methods (==) :: TwitterError -> TwitterError -> Bool (/=) :: TwitterError -> TwitterError -> Bool
Show TwitterError Source # |
Instance details Defined in Web.Twitter.Conduit.Response Methods showsPrec :: Int -> TwitterError -> ShowS show :: TwitterError -> String showList :: [TwitterError] -> ShowS
Exception TwitterError Source # |
Instance details Defined in Web.Twitter.Conduit.Response Methods toException :: TwitterError -> SomeException # fromException :: SomeException -> Maybe TwitterError # displayException :: TwitterError -> String #

data TwitterErrorMessage Source #

Twitter Error Messages

see detail: https://dev.twitter.com/docs/error-codes-responses

Constructors

TwitterErrorMessage |

Fields

- twitterErrorCode :: Int
- twitterErrorMessage :: Text

#### Instances

Instances details

Enum TwitterErrorMessage Source # |

Instance details

Defined in Web.Twitter.Conduit.Response

Methods

succ :: TwitterErrorMessage -> TwitterErrorMessage

pred :: TwitterErrorMessage -> TwitterErrorMessage

toEnum :: Int -> TwitterErrorMessage

fromEnum :: TwitterErrorMessage -> Int

enumFrom :: TwitterErrorMessage -> [TwitterErrorMessage]

enumFromThen :: TwitterErrorMessage -> TwitterErrorMessage -> [TwitterErrorMessage]

enumFromTo :: TwitterErrorMessage -> TwitterErrorMessage -> [TwitterErrorMessage]

enumFromThenTo :: TwitterErrorMessage -> TwitterErrorMessage -> TwitterErrorMessage -> [TwitterErrorMessage]

Eq TwitterErrorMessage Source # |
Instance details Defined in Web.Twitter.Conduit.Response Methods (==) :: TwitterErrorMessage -> TwitterErrorMessage -> Bool (/=) :: TwitterErrorMessage -> TwitterErrorMessage -> Bool
Data TwitterErrorMessage Source # |

Instance details

Defined in Web.Twitter.Conduit.Response

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TwitterErrorMessage -> c TwitterErrorMessage

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TwitterErrorMessage

toConstr :: TwitterErrorMessage -> Constr

dataTypeOf :: TwitterErrorMessage -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TwitterErrorMessage)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TwitterErrorMessage)

gmapT :: (forall b. Data b => b -> b) -> TwitterErrorMessage -> TwitterErrorMessage

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TwitterErrorMessage -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TwitterErrorMessage -> r

gmapQ :: (forall d. Data d => d -> u) -> TwitterErrorMessage -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> TwitterErrorMessage -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TwitterErrorMessage -> m TwitterErrorMessage

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TwitterErrorMessage -> m TwitterErrorMessage

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TwitterErrorMessage -> m TwitterErrorMessage

Ord TwitterErrorMessage Source # |

Instance details

Defined in Web.Twitter.Conduit.Response

Methods

compare :: TwitterErrorMessage -> TwitterErrorMessage -> Ordering

(<) :: TwitterErrorMessage -> TwitterErrorMessage -> Bool

(<=) :: TwitterErrorMessage -> TwitterErrorMessage -> Bool

(>) :: TwitterErrorMessage -> TwitterErrorMessage -> Bool

(>=) :: TwitterErrorMessage -> TwitterErrorMessage -> Bool

max :: TwitterErrorMessage -> TwitterErrorMessage -> TwitterErrorMessage

min :: TwitterErrorMessage -> TwitterErrorMessage -> TwitterErrorMessage

Show TwitterErrorMessage Source # |
Instance details Defined in Web.Twitter.Conduit.Response Methods showsPrec :: Int -> TwitterErrorMessage -> ShowS show :: TwitterErrorMessage -> String showList :: [TwitterErrorMessage] -> ShowS
FromJSON TwitterErrorMessage Source # |
Instance details Defined in Web.Twitter.Conduit.Response Methods parseJSON :: Value -> Parser TwitterErrorMessage Source # parseJSONList :: Value -> Parser [TwitterErrorMessage] Source #