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

Safe Haskell | None
Language | Haskell2010

Web.Twitter.Conduit.Stream

Contents

- StreamingAPI

Synopsis

- data Userstream
- userstream :: APIRequest Userstream StreamingAPI
- data StatusesFilter
- data FilterParameter
  - = Follow [UserId]
  - | Track [Text]
- statusesFilter :: [FilterParameter] -> APIRequest StatusesFilter StreamingAPI
- statusesFilterByFollow :: [UserId] -> APIRequest StatusesFilter StreamingAPI
- statusesFilterByTrack :: Text -> APIRequest StatusesFilter StreamingAPI
- stream :: (MonadResource m, FromJSON responseType, MonadThrow m) => TWInfo -> Manager -> APIRequest apiName responseType -> m (ConduitM () responseType m ())
- stream' :: (MonadResource m, FromJSON value, MonadThrow m) => TWInfo -> Manager -> APIRequest apiName responseType -> m (ConduitM () value m ())

# StreamingAPI

data Userstream Source #

Instances

HasLanguageParam (APIRequest Userstream a) Source # |
Instance details Defined in Web.Twitter.Conduit.Stream Methods language :: Lens' (APIRequest Userstream a) (Maybe Text) Source #
HasFilterLevelParam (APIRequest Userstream a) Source # |
Instance details Defined in Web.Twitter.Conduit.Stream Methods filterLevel :: Lens' (APIRequest Userstream a) (Maybe Text) Source #
HasStallWarningsParam (APIRequest Userstream a) Source # |
Instance details Defined in Web.Twitter.Conduit.Stream Methods stallWarnings :: Lens' (APIRequest Userstream a) (Maybe Bool) Source #
HasRepliesParam (APIRequest Userstream a) Source # |
Instance details Defined in Web.Twitter.Conduit.Stream Methods replies :: Lens' (APIRequest Userstream a) (Maybe Text) Source #

userstream :: APIRequest Userstream StreamingAPI Source #

data StatusesFilter Source #

Instances

HasLanguageParam (APIRequest StatusesFilter a) Source # |
Instance details Defined in Web.Twitter.Conduit.Stream Methods language :: Lens' (APIRequest StatusesFilter a) (Maybe Text) Source #
HasFilterLevelParam (APIRequest StatusesFilter a) Source # |
Instance details Defined in Web.Twitter.Conduit.Stream Methods filterLevel :: Lens' (APIRequest StatusesFilter a) (Maybe Text) Source #
HasStallWarningsParam (APIRequest StatusesFilter a) Source # |
Instance details Defined in Web.Twitter.Conduit.Stream Methods stallWarnings :: Lens' (APIRequest StatusesFilter a) (Maybe Bool) Source #

data FilterParameter Source #

Constructors

Follow [UserId] |
Track [Text] |

statusesFilter :: [FilterParameter] -> APIRequest StatusesFilter StreamingAPI Source #

Returns statuses/filter.json API query data.

    >>> statusesFilter [Follow [1,2,3]]
    APIRequestPost "https://stream.twitter.com/1.1/statuses/filter.json" [("follow","1,2,3")]
    >>> statusesFilter [Track ["haskell","functional"]]
    APIRequestPost "https://stream.twitter.com/1.1/statuses/filter.json" [("track","haskell,functional")]
    >>> statusesFilter [Follow [1,2,3],Track ["haskell","functional"]]
    APIRequestPost "https://stream.twitter.com/1.1/statuses/filter.json" [("follow","1,2,3"),("track","haskell,functional")]

statusesFilterByFollow :: [UserId] -> APIRequest StatusesFilter StreamingAPI Source #

Returns statuses/filter.json API query data.

    >>> statusesFilterByFollow [1,2,3]
    APIRequestPost "https://stream.twitter.com/1.1/statuses/filter.json" [("follow","1,2,3")]

statusesFilterByTrack Source #

Arguments

:: Text | keyword
-> APIRequest StatusesFilter StreamingAPI |

Returns statuses/filter.json API query data.

    >>> statusesFilterByTrack "haskell"
    APIRequestPost "https://stream.twitter.com/1.1/statuses/filter.json" [("track","haskell")]

stream :: (MonadResource m, FromJSON responseType, MonadThrow m) => TWInfo -> Manager -> APIRequest apiName responseType -> m (ConduitM () responseType m ()) Source #

stream' :: (MonadResource m, FromJSON value, MonadThrow m) => TWInfo -> Manager -> APIRequest apiName responseType -> m (ConduitM () value m ()) Source #