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

Safe Haskell | None
Language | Haskell2010

Web.Twitter.Conduit.Status

Contents

- Timelines
- Tweets

Synopsis

- data StatusesMentionsTimeline
- mentionsTimeline :: APIRequest StatusesMentionsTimeline [Status]
- data StatusesUserTimeline
- userTimeline :: UserParam -> APIRequest StatusesUserTimeline [Status]
- data StatusesHomeTimeline
- homeTimeline :: APIRequest StatusesHomeTimeline [Status]
- data StatusesRetweetsOfMe
- retweetsOfMe :: APIRequest StatusesRetweetsOfMe [Status]
- data StatusesRetweetsId
- retweetsId :: StatusId -> APIRequest StatusesRetweetsId [RetweetedStatus]
- data StatusesShowId
- showId :: StatusId -> APIRequest StatusesShowId Status
- data StatusesDestroyId
- destroyId :: StatusId -> APIRequest StatusesDestroyId Status
- data StatusesUpdate
- update :: Text -> APIRequest StatusesUpdate Status
- data StatusesRetweetId
- retweetId :: StatusId -> APIRequest StatusesRetweetId RetweetedStatus
- data MediaData
  - = MediaFromFile FilePath
  - | MediaRequestBody FilePath RequestBody
- data StatusesUpdateWithMedia
- updateWithMedia :: Text -> MediaData -> APIRequest StatusesUpdateWithMedia Status
- data StatusesLookup
- lookup :: [StatusId] -> APIRequest StatusesLookup [Status]

# Timelines

data StatusesMentionsTimeline Source #

Instances

HasCountParam (APIRequest StatusesMentionsTimeline a0) Source # |
Methods count :: Lens' (APIRequest StatusesMentionsTimeline a0) (Maybe Integer) Source #
HasSinceIdParam (APIRequest StatusesMentionsTimeline a0) Source # |
Methods sinceId :: Lens' (APIRequest StatusesMentionsTimeline a0) (Maybe Integer) Source #
HasMaxIdParam (APIRequest StatusesMentionsTimeline a0) Source # |
Methods maxId :: Lens' (APIRequest StatusesMentionsTimeline a0) (Maybe Integer) Source #
HasTrimUserParam (APIRequest StatusesMentionsTimeline a0) Source # |
Methods trimUser :: Lens' (APIRequest StatusesMentionsTimeline a0) (Maybe Bool) Source #
HasContributorDetailsParam (APIRequest StatusesMentionsTimeline a0) Source # |
Methods contributorDetails :: Lens' (APIRequest StatusesMentionsTimeline a0) (Maybe Bool) Source #
HasIncludeEntitiesParam (APIRequest StatusesMentionsTimeline a0) Source # |
Methods includeEntities :: Lens' (APIRequest StatusesMentionsTimeline a0) (Maybe Bool) Source #

mentionsTimeline :: APIRequest StatusesMentionsTimeline [Status] Source #

Returns query data asks the most recent mentions for the authenticating user.

You can perform a query using `call`:

    res <- call mentionsTimeline

    >>> mentionsTimeline
    APIRequestGet "https://api.twitter.com/1.1/statuses/mentions_timeline.json" []

data StatusesUserTimeline Source #

Instances

HasCountParam (APIRequest StatusesUserTimeline a0) Source # |
Methods count :: Lens' (APIRequest StatusesUserTimeline a0) (Maybe Integer) Source #
HasSinceIdParam (APIRequest StatusesUserTimeline a0) Source # |
Methods sinceId :: Lens' (APIRequest StatusesUserTimeline a0) (Maybe Integer) Source #
HasMaxIdParam (APIRequest StatusesUserTimeline a0) Source # |
Methods maxId :: Lens' (APIRequest StatusesUserTimeline a0) (Maybe Integer) Source #
HasTrimUserParam (APIRequest StatusesUserTimeline a0) Source # |
Methods trimUser :: Lens' (APIRequest StatusesUserTimeline a0) (Maybe Bool) Source #
HasExcludeRepliesParam (APIRequest StatusesUserTimeline a0) Source # |
Methods excludeReplies :: Lens' (APIRequest StatusesUserTimeline a0) (Maybe Bool) Source #
HasContributorDetailsParam (APIRequest StatusesUserTimeline a0) Source # |
Methods contributorDetails :: Lens' (APIRequest StatusesUserTimeline a0) (Maybe Bool) Source #
HasIncludeRtsParam (APIRequest StatusesUserTimeline a0) Source # |
Methods includeRts :: Lens' (APIRequest StatusesUserTimeline a0) (Maybe Bool) Source #

userTimeline :: UserParam -> APIRequest StatusesUserTimeline [Status] Source #

Returns query data asks a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters.

You can perform a search query using `call`:

    res <- call $ userTimeline (ScreenNameParam "thimura")

    >>> userTimeline (ScreenNameParam "thimura")
    APIRequestGet "https://api.twitter.com/1.1/statuses/user_timeline.json" [("screen_name","thimura")]
    >>> userTimeline (ScreenNameParam "thimura") & includeRts ?~ True & count ?~ 200
    APIRequestGet "https://api.twitter.com/1.1/statuses/user_timeline.json" [("count","200"),("include_rts","true"),("screen_name","thimura")]

data StatusesHomeTimeline Source #

Instances

HasCountParam (APIRequest StatusesHomeTimeline a0) Source # |
Methods count :: Lens' (APIRequest StatusesHomeTimeline a0) (Maybe Integer) Source #
HasSinceIdParam (APIRequest StatusesHomeTimeline a0) Source # |
Methods sinceId :: Lens' (APIRequest StatusesHomeTimeline a0) (Maybe Integer) Source #
HasMaxIdParam (APIRequest StatusesHomeTimeline a0) Source # |
Methods maxId :: Lens' (APIRequest StatusesHomeTimeline a0) (Maybe Integer) Source #
HasTrimUserParam (APIRequest StatusesHomeTimeline a0) Source # |
Methods trimUser :: Lens' (APIRequest StatusesHomeTimeline a0) (Maybe Bool) Source #
HasExcludeRepliesParam (APIRequest StatusesHomeTimeline a0) Source # |
Methods excludeReplies :: Lens' (APIRequest StatusesHomeTimeline a0) (Maybe Bool) Source #
HasContributorDetailsParam (APIRequest StatusesHomeTimeline a0) Source # |
Methods contributorDetails :: Lens' (APIRequest StatusesHomeTimeline a0) (Maybe Bool) Source #
HasIncludeEntitiesParam (APIRequest StatusesHomeTimeline a0) Source # |
Methods includeEntities :: Lens' (APIRequest StatusesHomeTimeline a0) (Maybe Bool) Source #

homeTimeline :: APIRequest StatusesHomeTimeline [Status] Source #

Returns query data asks a collection of the most recentTweets and retweets posted by the authenticating user and the users they follow.

You can perform a search query using `call`:

    res <- call homeTimeline

    >>> homeTimeline
    APIRequestGet "https://api.twitter.com/1.1/statuses/home_timeline.json" []
    >>> homeTimeline & count ?~ 200
    APIRequestGet "https://api.twitter.com/1.1/statuses/home_timeline.json" [("count","200")]

data StatusesRetweetsOfMe Source #

Instances

HasCountParam (APIRequest StatusesRetweetsOfMe a0) Source # |
Methods count :: Lens' (APIRequest StatusesRetweetsOfMe a0) (Maybe Integer) Source #
HasSinceIdParam (APIRequest StatusesRetweetsOfMe a0) Source # |
Methods sinceId :: Lens' (APIRequest StatusesRetweetsOfMe a0) (Maybe Integer) Source #
HasMaxIdParam (APIRequest StatusesRetweetsOfMe a0) Source # |
Methods maxId :: Lens' (APIRequest StatusesRetweetsOfMe a0) (Maybe Integer) Source #
HasTrimUserParam (APIRequest StatusesRetweetsOfMe a0) Source # |
Methods trimUser :: Lens' (APIRequest StatusesRetweetsOfMe a0) (Maybe Bool) Source #
HasIncludeEntitiesParam (APIRequest StatusesRetweetsOfMe a0) Source # |
Methods includeEntities :: Lens' (APIRequest StatusesRetweetsOfMe a0) (Maybe Bool) Source #
HasIncludeUserEntitiesParam (APIRequest StatusesRetweetsOfMe a0) Source # |
Methods includeUserEntities :: Lens' (APIRequest StatusesRetweetsOfMe a0) (Maybe Bool) Source #

retweetsOfMe :: APIRequest StatusesRetweetsOfMe [Status] Source #

Returns query data asks the most recent tweets authored by the authenticating user that have been retweeted by others.

You can perform a search query using `call`:

    res <- call retweetsOfMe

    >>> retweetsOfMe
    APIRequestGet "https://api.twitter.com/1.1/statuses/retweets_of_me.json" []
    >>> retweetsOfMe & count ?~ 100
    APIRequestGet "https://api.twitter.com/1.1/statuses/retweets_of_me.json" [("count","100")]

# Tweets

data StatusesRetweetsId Source #

Instances

HasCountParam (APIRequest StatusesRetweetsId a0) Source # |
Methods count :: Lens' (APIRequest StatusesRetweetsId a0) (Maybe Integer) Source #
HasTrimUserParam (APIRequest StatusesRetweetsId a0) Source # |
Methods trimUser :: Lens' (APIRequest StatusesRetweetsId a0) (Maybe Bool) Source #

retweetsId :: StatusId -> APIRequest StatusesRetweetsId [RetweetedStatus] Source #

Returns query data that asks for the most recent retweets of the specified tweet

You can perform a search query using `call`:

    res <- call twInfo mgr $ retweetsId 1234567890

    >>> retweetsId 1234567890
    APIRequestGet "https://api.twitter.com/1.1/statuses/retweets/1234567890.json" []
    >>> retweetsId 1234567890 & count ?~ 100
    APIRequestGet "https://api.twitter.com/1.1/statuses/retweets/1234567890.json" [("count","100")]

data StatusesShowId Source #

Instances

HasTrimUserParam (APIRequest StatusesShowId a0) Source # |
Methods trimUser :: Lens' (APIRequest StatusesShowId a0) (Maybe Bool) Source #
HasIncludeEntitiesParam (APIRequest StatusesShowId a0) Source # |
Methods includeEntities :: Lens' (APIRequest StatusesShowId a0) (Maybe Bool) Source #
HasIncludeMyRetweetParam (APIRequest StatusesShowId a0) Source # |
Methods includeMyRetweet :: Lens' (APIRequest StatusesShowId a0) (Maybe Bool) Source #
HasIncludeExtAltTextParam (APIRequest StatusesShowId a0) Source # |
Methods includeExtAltText :: Lens' (APIRequest StatusesShowId a0) (Maybe Bool) Source #

showId :: StatusId -> APIRequest StatusesShowId Status Source #

Returns query data asks a single Tweet, specified by the id parameter.

You can perform a search query using `call`:

    res <- call twInfo mgr $ showId 1234567890

    >>> showId 1234567890
    APIRequestGet "https://api.twitter.com/1.1/statuses/show/1234567890.json" []
    >>> showId 1234567890 & includeMyRetweet ?~ True
    APIRequestGet "https://api.twitter.com/1.1/statuses/show/1234567890.json" [("include_my_retweet","true")]

data StatusesDestroyId Source #

Instances

HasTrimUserParam (APIRequest StatusesDestroyId a0) Source # |
Methods trimUser :: Lens' (APIRequest StatusesDestroyId a0) (Maybe Bool) Source #

destroyId :: StatusId -> APIRequest StatusesDestroyId Status Source #

Returns post data which destroys the status specified by the require ID parameter.

You can perform a search query using `call`:

    res <- call twInfo mgr $ destroyId 1234567890

    >>> destroyId 1234567890
    APIRequestPost "https://api.twitter.com/1.1/statuses/destroy/1234567890.json" []

data StatusesUpdate Source #

Instances

HasTrimUserParam (APIRequest StatusesUpdate a0) Source # |
Methods trimUser :: Lens' (APIRequest StatusesUpdate a0) (Maybe Bool) Source #
HasInReplyToStatusIdParam (APIRequest StatusesUpdate a0) Source # |
Methods inReplyToStatusId :: Lens' (APIRequest StatusesUpdate a0) (Maybe Integer) Source #
HasDisplayCoordinatesParam (APIRequest StatusesUpdate a0) Source # |
Methods displayCoordinates :: Lens' (APIRequest StatusesUpdate a0) (Maybe Bool) Source #
HasMediaIdsParam (APIRequest StatusesUpdate a0) Source # |
Methods mediaIds :: Lens' (APIRequest StatusesUpdate a0) (Maybe [Integer]) Source #

update :: Text -> APIRequest StatusesUpdate Status Source #

Returns post data which updates the authenticating user's current status. To upload an image to accompany the tweet, use `updateWithMedia`.

You can perform a search query using `call`:

    res <- call twInfo mgr $ update "Hello World"

    >>> update "Hello World"
    APIRequestPost "https://api.twitter.com/1.1/statuses/update.json" [("status","Hello World")]
    >>> update "Hello World" & inReplyToStatusId ?~ 1234567890
    APIRequestPost "https://api.twitter.com/1.1/statuses/update.json" [("in_reply_to_status_id","1234567890"),("status","Hello World")]

data StatusesRetweetId Source #

Instances

HasTrimUserParam (APIRequest StatusesRetweetId a0) Source # |
Methods trimUser :: Lens' (APIRequest StatusesRetweetId a0) (Maybe Bool) Source #

retweetId :: StatusId -> APIRequest StatusesRetweetId RetweetedStatus Source #

Returns post data which retweets a tweet, specified by ID.

You can perform a search query using `call`:

    res <- call twInfo mgr $ retweetId 1234567890

    >>> retweetId 1234567890
    APIRequestPost "https://api.twitter.com/1.1/statuses/retweet/1234567890.json" []

data MediaData Source #

Constructors

MediaFromFile FilePath |
MediaRequestBody FilePath RequestBody |

data StatusesUpdateWithMedia Source #

Instances

HasInReplyToStatusIdParam (APIRequest StatusesUpdateWithMedia a0) Source # |
Methods inReplyToStatusId :: Lens' (APIRequest StatusesUpdateWithMedia a0) (Maybe Integer) Source #
HasDisplayCoordinatesParam (APIRequest StatusesUpdateWithMedia a0) Source # |
Methods displayCoordinates :: Lens' (APIRequest StatusesUpdateWithMedia a0) (Maybe Bool) Source #
HasPossiblySensitiveParam (APIRequest StatusesUpdateWithMedia a0) Source # |
Methods possiblySensitive :: Lens' (APIRequest StatusesUpdateWithMedia a0) (Maybe Bool) Source #

updateWithMedia :: Text -> MediaData -> APIRequest StatusesUpdateWithMedia Status Source #

Returns post data which updates the authenticating user's current status and attaches media for upload.

You can perform a search query using `call`:

    res <- call twInfo mgr $ updateWithMedia "Hello World" (MediaFromFile "homethimura/test.jpeg")

    >>> updateWithMedia "Hello World" (MediaFromFile "/home/fuga/test.jpeg")
    APIRequestPostMultipart "https://api.twitter.com/1.1/statuses/update_with_media.json" [("status","Hello World")]

data StatusesLookup Source #

Instances

HasTrimUserParam (APIRequest StatusesLookup a0) Source # |
Methods trimUser :: Lens' (APIRequest StatusesLookup a0) (Maybe Bool) Source #
HasIncludeEntitiesParam (APIRequest StatusesLookup a0) Source # |
Methods includeEntities :: Lens' (APIRequest StatusesLookup a0) (Maybe Bool) Source #
HasMapParam (APIRequest StatusesLookup a0) Source # |
Methods map :: Lens' (APIRequest StatusesLookup a0) (Maybe Bool) Source #

lookup :: [StatusId] -> APIRequest StatusesLookup [Status] Source #

Returns fully-hydrated tweet objects for up to 100 tweets per request, as specified by comma-separated values passed to the id parameter.

You can perform a request using `call`:

    res <- call twInfo mgr $ lookup [20, 432656548536401920]

    >>> lookup [10]
    APIRequestGet "https://api.twitter.com/1.1/statuses/lookup.json" [("id","10")]
    >>> lookup [10, 432656548536401920]
    APIRequestGet "https://api.twitter.com/1.1/statuses/lookup.json" [("id","10,432656548536401920")]
    >>> lookup [10, 432656548536401920] & includeEntities ?~ True
    APIRequestGet "https://api.twitter.com/1.1/statuses/lookup.json" [("include_entities","true"),("id","10,432656548536401920")]