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

Safe Haskell | None
Language | Haskell2010

Web.Twitter.Conduit.Api

Contents

- Search
- Direct Messages
- Friends & Followers
- Users
- Suggested Users
- Favorites
- Lists
- Saved Searches
- Places & Geo
- media

Synopsis

- data SearchTweets
- searchTweets :: Text -> APIRequest SearchTweets (SearchResult [Status])
- search :: Text -> APIRequest SearchTweets (SearchResult [Status])
- data DirectMessages
- directMessages :: APIRequest DirectMessages [DirectMessage]
- data DirectMessagesSent
- directMessagesSent :: APIRequest DirectMessagesSent [DirectMessage]
- data DirectMessagesShow
- directMessagesShow :: StatusId -> APIRequest DirectMessagesShow DirectMessage
- data DirectMessagesDestroy
- directMessagesDestroy :: StatusId -> APIRequest DirectMessagesDestroy DirectMessage
- data DirectMessagesNew
- directMessagesNew :: UserParam -> Text -> APIRequest DirectMessagesNew DirectMessage
- data FriendshipsNoRetweetsIds
- friendshipsNoRetweetsIds :: APIRequest FriendshipsNoRetweetsIds [UserId]
- data FriendsIds
- friendsIds :: UserParam -> APIRequest FriendsIds (WithCursor IdsCursorKey UserId)
- data FollowersIds
- followersIds :: UserParam -> APIRequest FollowersIds (WithCursor IdsCursorKey UserId)
- data FriendshipsIncoming
- friendshipsIncoming :: APIRequest FriendshipsIncoming (WithCursor IdsCursorKey UserId)
- data FriendshipsOutgoing
- friendshipsOutgoing :: APIRequest FriendshipsOutgoing (WithCursor IdsCursorKey UserId)
- data FriendshipsCreate
- friendshipsCreate :: UserParam -> APIRequest FriendshipsCreate User
- data FriendshipsDestroy
- friendshipsDestroy :: UserParam -> APIRequest FriendshipsDestroy User
- data FriendsList
- friendsList :: UserParam -> APIRequest FriendsList (WithCursor UsersCursorKey User)
- data FollowersList
- followersList :: UserParam -> APIRequest FollowersList (WithCursor UsersCursorKey User)
- data AccountVerifyCredentials
- accountVerifyCredentials :: APIRequest AccountVerifyCredentials User
- data AccountUpdateProfile
- accountUpdateProfile :: APIRequest AccountUpdateProfile User
- data UsersLookup
- usersLookup :: UserListParam -> APIRequest UsersLookup [User]
- data UsersShow
- usersShow :: UserParam -> APIRequest UsersShow User
- data FavoritesList
- favoritesList :: Maybe UserParam -> APIRequest FavoritesList [Status]
- data FavoritesDestroy
- favoritesDestroy :: StatusId -> APIRequest FavoritesDestroy Status
- data FavoritesCreate
- favoritesCreate :: StatusId -> APIRequest FavoritesCreate Status
- data ListsStatuses
- listsStatuses :: ListParam -> APIRequest ListsStatuses [Status]
- data ListsMembersDestroy
- listsMembersDestroy :: ListParam -> UserParam -> APIRequest ListsMembersDestroy List
- data ListsMemberships
- listsMemberships :: Maybe UserParam -> APIRequest ListsMemberships (WithCursor ListsCursorKey List)
- data ListsSubscribers
- listsSubscribers :: ListParam -> APIRequest ListsSubscribers (WithCursor UsersCursorKey User)
- data ListsMembersCreateAll
- listsMembersCreateAll :: ListParam -> UserListParam -> APIRequest ListsMembersCreateAll List
- data ListsMembers
- listsMembers :: ListParam -> APIRequest ListsMembers (WithCursor UsersCursorKey User)
- data ListsMembersCreate
- listsMembersCreate :: ListParam -> UserParam -> APIRequest ListsMembersCreate List
- data ListsDestroy
- listsDestroy :: ListParam -> APIRequest ListsDestroy List
- data ListsUpdate
- listsUpdate :: ListParam -> Bool -> Maybe Text -> APIRequest ListsUpdate List
- data ListsCreate
- listsCreate :: Text -> Bool -> Maybe Text -> APIRequest ListsCreate List
- data ListsShow
- listsShow :: ListParam -> APIRequest ListsShow List
- data ListsSubscriptions
- listsSubscriptions :: Maybe UserParam -> APIRequest ListsSubscriptions (WithCursor ListsCursorKey List)
- data ListsMembersDestroyAll
- listsMembersDestroyAll :: ListParam -> UserListParam -> APIRequest ListsMembersDestroyAll List
- data ListsOwnerships
- listsOwnerships :: Maybe UserParam -> APIRequest ListsOwnerships (WithCursor ListsCursorKey List)
- data MediaUpload
- mediaUpload :: MediaData -> APIRequest MediaUpload UploadedMedia

# Search

data SearchTweets Source #

Instances

HasCountParam (APIRequest SearchTweets a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest SearchTweets a) (Maybe Integer) Source #
HasSinceIdParam (APIRequest SearchTweets a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods sinceId :: Lens' (APIRequest SearchTweets a) (Maybe Integer) Source #
HasMaxIdParam (APIRequest SearchTweets a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods maxId :: Lens' (APIRequest SearchTweets a) (Maybe Integer) Source #
HasIncludeEntitiesParam (APIRequest SearchTweets a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest SearchTweets a) (Maybe Bool) Source #
HasLangParam (APIRequest SearchTweets a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods lang :: Lens' (APIRequest SearchTweets a) (Maybe Text) Source #
HasLocaleParam (APIRequest SearchTweets a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods locale :: Lens' (APIRequest SearchTweets a) (Maybe Text) Source #
HasUntilParam (APIRequest SearchTweets a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods until :: Lens' (APIRequest SearchTweets a) (Maybe Day) Source #

searchTweets Source #

Arguments

:: Text | search string
-> APIRequest SearchTweets (SearchResult [Status]) |

Returns search query.

You can perform a search query using `call`:

    res <- call (searchTweets "search text")
    print $ res ^. searchResultStatuses

    >>> searchTweets "search text"
    APIRequestGet "https://api.twitter.com/1.1/search/tweets.json" [("q","search text")]
    >>> searchTweets "search text" & lang ?~ "ja" & count ?~ 100
    APIRequestGet "https://api.twitter.com/1.1/search/tweets.json" [("count","100"),("lang","ja"),("q","search text")]

search Source #

Arguments

:: Text | search string
-> APIRequest SearchTweets (SearchResult [Status]) |

Alias of `searchTweets`, for backward compatibility

# Direct Messages

data DirectMessages Source #

Instances

HasCountParam (APIRequest DirectMessages a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest DirectMessages a) (Maybe Integer) Source #
HasSinceIdParam (APIRequest DirectMessages a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods sinceId :: Lens' (APIRequest DirectMessages a) (Maybe Integer) Source #
HasMaxIdParam (APIRequest DirectMessages a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods maxId :: Lens' (APIRequest DirectMessages a) (Maybe Integer) Source #
HasIncludeEntitiesParam (APIRequest DirectMessages a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest DirectMessages a) (Maybe Bool) Source #
HasSkipStatusParam (APIRequest DirectMessages a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods skipStatus :: Lens' (APIRequest DirectMessages a) (Maybe Bool) Source #
HasFullTextParam (APIRequest DirectMessages a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods fullText :: Lens' (APIRequest DirectMessages a) (Maybe Bool) Source #

directMessages :: APIRequest DirectMessages [DirectMessage] Source #

Returns query data which asks recent direct messages sent to the authenticating user.

You can perform a query using `call`:

    res <- call twInfo mgr $ directMessages & count ?~ 100

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

data DirectMessagesSent Source #

Instances

HasCountParam (APIRequest DirectMessagesSent a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest DirectMessagesSent a) (Maybe Integer) Source #
HasSinceIdParam (APIRequest DirectMessagesSent a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods sinceId :: Lens' (APIRequest DirectMessagesSent a) (Maybe Integer) Source #
HasMaxIdParam (APIRequest DirectMessagesSent a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods maxId :: Lens' (APIRequest DirectMessagesSent a) (Maybe Integer) Source #
HasPageParam (APIRequest DirectMessagesSent a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods page :: Lens' (APIRequest DirectMessagesSent a) (Maybe Integer) Source #
HasIncludeEntitiesParam (APIRequest DirectMessagesSent a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest DirectMessagesSent a) (Maybe Bool) Source #
HasSkipStatusParam (APIRequest DirectMessagesSent a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods skipStatus :: Lens' (APIRequest DirectMessagesSent a) (Maybe Bool) Source #
HasFullTextParam (APIRequest DirectMessagesSent a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods fullText :: Lens' (APIRequest DirectMessagesSent a) (Maybe Bool) Source #

directMessagesSent :: APIRequest DirectMessagesSent [DirectMessage] Source #

Returns query data which asks recent direct messages sent by the authenticating user.

You can perform a query using `call`:

    res <- call twInfo mgr $ directMessagesSent & count ?~ 100

    >>> directMessagesSent
    APIRequestGet "https://api.twitter.com/1.1/direct_messages/sent.json" []
    >>> directMessagesSent & count ?~ 100
    APIRequestGet "https://api.twitter.com/1.1/direct_messages/sent.json" [("count","100")]

data DirectMessagesShow Source #

Instances

HasFullTextParam (APIRequest DirectMessagesShow a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods fullText :: Lens' (APIRequest DirectMessagesShow a) (Maybe Bool) Source #

directMessagesShow :: StatusId -> APIRequest DirectMessagesShow DirectMessage Source #

Returns query data which asks a single direct message, specified by an id parameter.

You can perform a query using `call`:

    res <- call twInfo mgr $ directMessagesShow 1234567890

    >>> directMessagesShow 1234567890
    APIRequestGet "https://api.twitter.com/1.1/direct_messages/show.json" [("id","1234567890")]

data DirectMessagesDestroy Source #

Instances

HasIncludeEntitiesParam (APIRequest DirectMessagesDestroy a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest DirectMessagesDestroy a) (Maybe Bool) Source #

directMessagesDestroy :: StatusId -> APIRequest DirectMessagesDestroy DirectMessage Source #

Returns post data which destroys the direct message specified in the required ID parameter.

You can perform a query using `call`:

    res <- call twInfo mgr $ directMessagesDestroy 1234567890

    >>> directMessagesDestroy 1234567890
    APIRequestPost "https://api.twitter.com/1.1/direct_messages/destroy.json" [("id","1234567890")]

data DirectMessagesNew Source #

directMessagesNew :: UserParam -> Text -> APIRequest DirectMessagesNew DirectMessage Source #

Returns post data which sends a new direct message to the specified user from the authenticating user.

You can perform a post using `call`:

    res <- call twInfo mgr $ directMessagesNew (ScreenNameParam "thimura") "Hello DM"

    >>> directMessagesNew (ScreenNameParam "thimura") "Hello DM"
    APIRequestPost "https://api.twitter.com/1.1/direct_messages/new.json" [("text","Hello DM"),("screen_name","thimura")]
    >>> directMessagesNew (UserIdParam 69179963) "Hello thimura! by UserId"
    APIRequestPost "https://api.twitter.com/1.1/direct_messages/new.json" [("text","Hello thimura! by UserId"),("user_id","69179963")]

# Friends & Followers

data FriendshipsNoRetweetsIds Source #

friendshipsNoRetweetsIds :: APIRequest FriendshipsNoRetweetsIds [UserId] Source #

Returns a collection of user_ids that the currently authenticated user does not want to receive retweets from.

You can perform a request using `call`:

    res <- call twInfo mgr $ friendshipsNoRetweetsIds

    >>> friendshipsNoRetweetsIds
    APIRequestGet "https://api.twitter.com/1.1/friendships/no_retweets/ids.json" []

data FriendsIds Source #

Instances

HasCountParam (APIRequest FriendsIds a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest FriendsIds a) (Maybe Integer) Source #
HasCursorParam (APIRequest FriendsIds a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest FriendsIds a) (Maybe Integer) Source #

friendsIds :: UserParam -> APIRequest FriendsIds (WithCursor IdsCursorKey UserId) Source #

Returns query data which asks a collection of user IDs for every user the specified user is following.

You can perform a query using `call`:

    res <- call twInfo mgr $ friendsIds (ScreenNameParam "thimura")

Or, you can iterate with `sourceWithCursor`:

    sourceWithCursor (friendsIds (ScreenNameParam "thimura")) $$ CL.consume

    >>> friendsIds (ScreenNameParam "thimura")
    APIRequestGet "https://api.twitter.com/1.1/friends/ids.json" [("screen_name","thimura")]
    >>> friendsIds (ScreenNameParam "thimura") & count ?~ 5000
    APIRequestGet "https://api.twitter.com/1.1/friends/ids.json" [("count","5000"),("screen_name","thimura")]

data FollowersIds Source #

Instances

HasCountParam (APIRequest FollowersIds a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest FollowersIds a) (Maybe Integer) Source #
HasCursorParam (APIRequest FollowersIds a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest FollowersIds a) (Maybe Integer) Source #

followersIds :: UserParam -> APIRequest FollowersIds (WithCursor IdsCursorKey UserId) Source #

Returns query data which asks a collection of user IDs for every user following the specified user.

You can perform a query using `call`:

    res <- call twInfo mgr $ followersIds (ScreenNameParam "thimura")

Or, you can iterate with `sourceWithCursor`:

    sourceWithCursor (followersIds (ScreenNameParam "thimura")) $$ CL.consume

    >>> followersIds (ScreenNameParam "thimura")
    APIRequestGet "https://api.twitter.com/1.1/followers/ids.json" [("screen_name","thimura")]
    >>> followersIds (ScreenNameParam "thimura") & count ?~ 5000
    APIRequestGet "https://api.twitter.com/1.1/followers/ids.json" [("count","5000"),("screen_name","thimura")]

data FriendshipsIncoming Source #

Instances

HasCursorParam (APIRequest FriendshipsIncoming a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest FriendshipsIncoming a) (Maybe Integer) Source #

friendshipsIncoming :: APIRequest FriendshipsIncoming (WithCursor IdsCursorKey UserId) Source #

Returns a collection of numeric IDs for every user who has a pending request to follow the authenticating user.

You can perform a request by using `call`:

    res <- call twInfo mgr $ friendshipsIncoming

Or, you can iterate with `sourceWithCursor`:

    sourceWithCursor friendshipsIncoming $$ CL.consume

    >>> friendshipsIncoming
    APIRequestGet "https://api.twitter.com/1.1/friendships/incoming.json" []

data FriendshipsOutgoing Source #

Instances

HasCursorParam (APIRequest FriendshipsOutgoing a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest FriendshipsOutgoing a) (Maybe Integer) Source #

friendshipsOutgoing :: APIRequest FriendshipsOutgoing (WithCursor IdsCursorKey UserId) Source #

Returns a collection of numeric IDs for every protected user for whom the authenticating user has a pending follow request.

You can perform a request by using `call`:

    res <- call twInfo mgr $ friendshipsOutgoing

Or, you can iterate with `sourceWithCursor`:

    sourceWithCursor friendshipsOutgoing $$ CL.consume

    >>> friendshipsOutgoing
    APIRequestGet "https://api.twitter.com/1.1/friendships/outgoing.json" []

data FriendshipsCreate Source #

Instances

HasFollowParam (APIRequest FriendshipsCreate a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods follow :: Lens' (APIRequest FriendshipsCreate a) (Maybe Bool) Source #

friendshipsCreate :: UserParam -> APIRequest FriendshipsCreate User Source #

Returns post data which follows the user specified in the ID parameter.

You can perform request by using `call`:

    res <- call twInfo mgr $ friendshipsCreate (ScreenNameParam "thimura")

    >>> friendshipsCreate (ScreenNameParam "thimura")
    APIRequestPost "https://api.twitter.com/1.1/friendships/create.json" [("screen_name","thimura")]
    >>> friendshipsCreate (UserIdParam 69179963)
    APIRequestPost "https://api.twitter.com/1.1/friendships/create.json" [("user_id","69179963")]

data FriendshipsDestroy Source #

friendshipsDestroy :: UserParam -> APIRequest FriendshipsDestroy User Source #

Returns post data which unfollows the user specified in the ID parameter.

You can perform request by using `call`:

    res <- call twInfo mgr $ friendshipsDestroy (ScreenNameParam "thimura")

    >>> friendshipsDestroy (ScreenNameParam "thimura")
    APIRequestPost "https://api.twitter.com/1.1/friendships/destroy.json" [("screen_name","thimura")]
    >>> friendshipsDestroy (UserIdParam 69179963)
    APIRequestPost "https://api.twitter.com/1.1/friendships/destroy.json" [("user_id","69179963")]

data FriendsList Source #

Instances

HasCountParam (APIRequest FriendsList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest FriendsList a) (Maybe Integer) Source #
HasCursorParam (APIRequest FriendsList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest FriendsList a) (Maybe Integer) Source #
HasIncludeUserEntitiesParam (APIRequest FriendsList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeUserEntities :: Lens' (APIRequest FriendsList a) (Maybe Bool) Source #
HasSkipStatusParam (APIRequest FriendsList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods skipStatus :: Lens' (APIRequest FriendsList a) (Maybe Bool) Source #

friendsList :: UserParam -> APIRequest FriendsList (WithCursor UsersCursorKey User) Source #

Returns query data which asks a cursored collection of user objects for every user the specified users is following.

You can perform request by using `call`:

    res <- call twInfo mgr $ friendsList (ScreenNameParam "thimura")

Or, you can iterate with `sourceWithCursor`:

    sourceWithCursor (friendsList (ScreenNameParam "thimura")) $$ CL.consume

    >>> friendsList (ScreenNameParam "thimura")
    APIRequestGet "https://api.twitter.com/1.1/friends/list.json" [("screen_name","thimura")]
    >>> friendsList (UserIdParam 69179963)
    APIRequestGet "https://api.twitter.com/1.1/friends/list.json" [("user_id","69179963")]

data FollowersList Source #

Instances

HasCountParam (APIRequest FollowersList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest FollowersList a) (Maybe Integer) Source #
HasCursorParam (APIRequest FollowersList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest FollowersList a) (Maybe Integer) Source #
HasIncludeUserEntitiesParam (APIRequest FollowersList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeUserEntities :: Lens' (APIRequest FollowersList a) (Maybe Bool) Source #
HasSkipStatusParam (APIRequest FollowersList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods skipStatus :: Lens' (APIRequest FollowersList a) (Maybe Bool) Source #

followersList :: UserParam -> APIRequest FollowersList (WithCursor UsersCursorKey User) Source #

Returns query data which asks a cursored collection of user objects for users following the specified user.

You can perform request by using `call`:

    res <- call twInfo mgr $ followersList (ScreenNameParam "thimura")

Or, you can iterate with `sourceWithCursor`:

    sourceWithCursor (followersList (ScreenNameParam "thimura")) $$ CL.consume

    >>> followersList (ScreenNameParam "thimura")
    APIRequestGet "https://api.twitter.com/1.1/followers/list.json" [("screen_name","thimura")]
    >>> followersList (UserIdParam 69179963)
    APIRequestGet "https://api.twitter.com/1.1/followers/list.json" [("user_id","69179963")]

# Users

data AccountVerifyCredentials Source #

Instances

HasIncludeEntitiesParam (APIRequest AccountVerifyCredentials a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest AccountVerifyCredentials a) (Maybe Bool) Source #
HasIncludeEmailParam (APIRequest AccountVerifyCredentials a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEmail :: Lens' (APIRequest AccountVerifyCredentials a) (Maybe Bool) Source #
HasSkipStatusParam (APIRequest AccountVerifyCredentials a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods skipStatus :: Lens' (APIRequest AccountVerifyCredentials a) (Maybe Bool) Source #

accountVerifyCredentials :: APIRequest AccountVerifyCredentials User Source #

Returns query data asks that the credential is valid.

You can perform request by using `call`:

    res <- call twInfo mgr $ accountVerifyCredentials

    >>> accountVerifyCredentials
    APIRequestGet "https://api.twitter.com/1.1/account/verify_credentials.json" []

data AccountUpdateProfile Source #

Instances

HasIncludeEntitiesParam (APIRequest AccountUpdateProfile a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest AccountUpdateProfile a) (Maybe Bool) Source #
HasSkipStatusParam (APIRequest AccountUpdateProfile a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods skipStatus :: Lens' (APIRequest AccountUpdateProfile a) (Maybe Bool) Source #
HasDescriptionParam (APIRequest AccountUpdateProfile a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods description :: Lens' (APIRequest AccountUpdateProfile a) (Maybe Text) Source #
HasNameParam (APIRequest AccountUpdateProfile a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods name :: Lens' (APIRequest AccountUpdateProfile a) (Maybe Text) Source #
HasProfileLinkColorParam (APIRequest AccountUpdateProfile a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods profileLinkColor :: Lens' (APIRequest AccountUpdateProfile a) (Maybe Text) Source #
HasLocationParam (APIRequest AccountUpdateProfile a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods location :: Lens' (APIRequest AccountUpdateProfile a) (Maybe Text) Source #
HasUrlParam (APIRequest AccountUpdateProfile a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods url :: Lens' (APIRequest AccountUpdateProfile a) (Maybe URIString) Source #

accountUpdateProfile :: APIRequest AccountUpdateProfile User Source #

Returns user object with updated fields. Note that while no specific parameter is required, you need to provide at least one parameter before executing the query.

You can perform request by using `call`:

    res <- call twInfo mgr $ accountUpdateProfile & url ?~ "http://www.example.com"

    >>> accountUpdateProfile & url ?~ "http://www.example.com"
    APIRequestPost "https://api.twitter.com/1.1/account/update_profile.json" [("url","http://www.example.com")]

data UsersLookup Source #

Instances

HasIncludeEntitiesParam (APIRequest UsersLookup a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest UsersLookup a) (Maybe Bool) Source #

usersLookup :: UserListParam -> APIRequest UsersLookup [User] Source #

Returns query data asks user objects.

You can perform request by using `call`:

    res <- call twInfo mgr $ usersLookup (ScreenNameListParam ["thimura", "twitterapi"])

    >>> usersLookup (ScreenNameListParam ["thimura", "twitterapi"])
    APIRequestGet "https://api.twitter.com/1.1/users/lookup.json" [("screen_name","thimura,twitterapi")]

data UsersShow Source #

Instances

HasIncludeEntitiesParam (APIRequest UsersShow a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest UsersShow a) (Maybe Bool) Source #

usersShow :: UserParam -> APIRequest UsersShow User Source #

Returns query data asks the user specified by user id or screen name parameter.

You can perform request by using `call`:

    res <- call twInfo mgr $ usersShow (ScreenNameParam "thimura")

    >>> usersShow (ScreenNameParam "thimura")
    APIRequestGet "https://api.twitter.com/1.1/users/show.json" [("screen_name","thimura")]

# Suggested Users

# Favorites

data FavoritesList Source #

Instances

HasCountParam (APIRequest FavoritesList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest FavoritesList a) (Maybe Integer) Source #
HasSinceIdParam (APIRequest FavoritesList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods sinceId :: Lens' (APIRequest FavoritesList a) (Maybe Integer) Source #
HasMaxIdParam (APIRequest FavoritesList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods maxId :: Lens' (APIRequest FavoritesList a) (Maybe Integer) Source #
HasIncludeEntitiesParam (APIRequest FavoritesList a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest FavoritesList a) (Maybe Bool) Source #

favoritesList :: Maybe UserParam -> APIRequest FavoritesList [Status] Source #

Returns the 20 most recent Tweets favorited by the specified user.

You can perform request by using `call`:

    res <- call twInfo mgr $ favoritesList (ScreenNameParam "thimura")

    >>> favoritesList Nothing
    APIRequestGet "https://api.twitter.com/1.1/favorites/list.json" []
    >>> favoritesList (Just (ScreenNameParam "thimura"))
    APIRequestGet "https://api.twitter.com/1.1/favorites/list.json" [("screen_name","thimura")]
    >>> favoritesList (Just (UserIdParam 69179963))
    APIRequestGet "https://api.twitter.com/1.1/favorites/list.json" [("user_id","69179963")]

data FavoritesDestroy Source #

Instances

HasIncludeEntitiesParam (APIRequest FavoritesDestroy a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest FavoritesDestroy a) (Maybe Bool) Source #

favoritesDestroy :: StatusId -> APIRequest FavoritesDestroy Status Source #

Returns post data unfavorites the status specified in the ID paramter as the authenticating user.

You can perform request by using `call`:

    res <- call twInfo mgr $ favoritesDestroy 1234567890

    >>> favoritesDestroy 1234567890
    APIRequestPost "https://api.twitter.com/1.1/favorites/destroy.json" [("id","1234567890")]

data FavoritesCreate Source #

Instances

HasIncludeEntitiesParam (APIRequest FavoritesCreate a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest FavoritesCreate a) (Maybe Bool) Source #

favoritesCreate :: StatusId -> APIRequest FavoritesCreate Status Source #

Returns post data which favorites the status specified in the ID parameter as the authenticating user.

You can perform request by using `call`:

    res <- call twInfo mgr $ favoritesCreate 1234567890

    >>> favoritesCreate 1234567890
    APIRequestPost "https://api.twitter.com/1.1/favorites/create.json" [("id","1234567890")]

# Lists

data ListsStatuses Source #

Instances

HasCountParam (APIRequest ListsStatuses a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest ListsStatuses a) (Maybe Integer) Source #
HasSinceIdParam (APIRequest ListsStatuses a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods sinceId :: Lens' (APIRequest ListsStatuses a) (Maybe Integer) Source #
HasMaxIdParam (APIRequest ListsStatuses a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods maxId :: Lens' (APIRequest ListsStatuses a) (Maybe Integer) Source #
HasIncludeEntitiesParam (APIRequest ListsStatuses a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeEntities :: Lens' (APIRequest ListsStatuses a) (Maybe Bool) Source #
HasIncludeRtsParam (APIRequest ListsStatuses a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods includeRts :: Lens' (APIRequest ListsStatuses a) (Maybe Bool) Source #

listsStatuses :: ListParam -> APIRequest ListsStatuses [Status] Source #

Returns the query parameter which fetches a timeline of tweets authored by members of the specified list.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsStatuses (ListNameParam "thimura/haskell")

If you need more statuses, you can obtain those by using `sourceWithMaxId`: `res <- sourceWithMaxId (`listsStatuses` (`ListNameParam` "thimura/haskell") & count ?~ 200) $$ CL.take 1000`

    >>> listsStatuses (ListNameParam "thimura/haskell")
    APIRequestGet "https://api.twitter.com/1.1/lists/statuses.json" [("slug","haskell"),("owner_screen_name","thimura")]
    >>> listsStatuses (ListIdParam 20849097)
    APIRequestGet "https://api.twitter.com/1.1/lists/statuses.json" [("list_id","20849097")]

data ListsMembersDestroy Source #

listsMembersDestroy :: ListParam -> UserParam -> APIRequest ListsMembersDestroy List Source #

Returns the post parameter which removes the specified member from the list.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsMembersDestroy (ListNameParam "thimura/haskell") (ScreenNameParam "thimura")

    >>> listsMembersDestroy (ListNameParam "thimura/haskell") (ScreenNameParam "thimura")
    APIRequestPost "https://api.twitter.com/1.1/lists/members/destroy.json" [("slug","haskell"),("owner_screen_name","thimura"),("screen_name","thimura")]
    >>> listsMembersDestroy (ListIdParam 20849097) (UserIdParam 69179963)
    APIRequestPost "https://api.twitter.com/1.1/lists/members/destroy.json" [("list_id","20849097"),("user_id","69179963")]

data ListsMemberships Source #

Instances

HasCountParam (APIRequest ListsMemberships a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest ListsMemberships a) (Maybe Integer) Source #
HasCursorParam (APIRequest ListsMemberships a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest ListsMemberships a) (Maybe Integer) Source #

listsMemberships :: Maybe UserParam -> APIRequest ListsMemberships (WithCursor ListsCursorKey List) Source #

Returns the request parameters which asks the lists the specified user has been added to. If `UserParam` are not provided, the memberships for the authenticating user are returned.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsMemberships (ListNameParam "thimura/haskell")

    >>> listsMemberships Nothing
    APIRequestGet "https://api.twitter.com/1.1/lists/memberships.json" []
    >>> listsMemberships (Just (ScreenNameParam "thimura"))
    APIRequestGet "https://api.twitter.com/1.1/lists/memberships.json" [("screen_name","thimura")]
    >>> listsMemberships (Just (UserIdParam 69179963))
    APIRequestGet "https://api.twitter.com/1.1/lists/memberships.json" [("user_id","69179963")]

data ListsSubscribers Source #

Instances

HasCountParam (APIRequest ListsSubscribers a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest ListsSubscribers a) (Maybe Integer) Source #
HasCursorParam (APIRequest ListsSubscribers a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest ListsSubscribers a) (Maybe Integer) Source #
HasSkipStatusParam (APIRequest ListsSubscribers a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods skipStatus :: Lens' (APIRequest ListsSubscribers a) (Maybe Bool) Source #

listsSubscribers :: ListParam -> APIRequest ListsSubscribers (WithCursor UsersCursorKey User) Source #

Returns the request parameter which asks the subscribers of the specified list.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsSubscribers (ListNameParam "thimura/haskell")

    >>> listsSubscribers (ListNameParam "thimura/haskell")
    APIRequestGet "https://api.twitter.com/1.1/lists/subscribers.json" [("slug","haskell"),("owner_screen_name","thimura")]
    >>> listsSubscribers (ListIdParam 20849097)
    APIRequestGet "https://api.twitter.com/1.1/lists/subscribers.json" [("list_id","20849097")]

data ListsMembersCreateAll Source #

listsMembersCreateAll :: ListParam -> UserListParam -> APIRequest ListsMembersCreateAll List Source #

Adds multiple members to a list.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsMembersCreateAll (ListNameParam "thimura/haskell") (ScreenNameListParam ["thimura", "twitterapi"])

    >>> listsMembersCreateAll (ListNameParam "thimura/haskell") (ScreenNameListParam ["thimura", "twitterapi"])
    APIRequestPost "https://api.twitter.com/1.1/lists/members/create_all.json" [("slug","haskell"),("owner_screen_name","thimura"),("screen_name","thimura,twitterapi")]
    >>> listsMembersCreateAll (ListIdParam 20849097) (UserIdListParam [69179963, 6253282])
    APIRequestPost "https://api.twitter.com/1.1/lists/members/create_all.json" [("list_id","20849097"),("user_id","69179963,6253282")]

data ListsMembers Source #

Instances

HasCountParam (APIRequest ListsMembers a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest ListsMembers a) (Maybe Integer) Source #
HasCursorParam (APIRequest ListsMembers a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest ListsMembers a) (Maybe Integer) Source #
HasSkipStatusParam (APIRequest ListsMembers a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods skipStatus :: Lens' (APIRequest ListsMembers a) (Maybe Bool) Source #

listsMembers :: ListParam -> APIRequest ListsMembers (WithCursor UsersCursorKey User) Source #

Returns query data asks the members of the specified list.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsMembers (ListNameParam "thimura/haskell")

    >>> listsMembers (ListNameParam "thimura/haskell")
    APIRequestGet "https://api.twitter.com/1.1/lists/members.json" [("slug","haskell"),("owner_screen_name","thimura")]
    >>> listsMembers (ListIdParam 20849097)
    APIRequestGet "https://api.twitter.com/1.1/lists/members.json" [("list_id","20849097")]

data ListsMembersCreate Source #

listsMembersCreate :: ListParam -> UserParam -> APIRequest ListsMembersCreate List Source #

Returns the post parameter which adds a member to a list.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsMembersCreate (ListNameParam "thimura/haskell") (ScreenNameParam "thimura")

    >>> listsMembersCreate (ListNameParam "thimura/haskell") (ScreenNameParam "thimura")
    APIRequestPost "https://api.twitter.com/1.1/lists/members/create.json" [("slug","haskell"),("owner_screen_name","thimura"),("screen_name","thimura")]
    >>> listsMembersCreate (ListIdParam 20849097) (UserIdParam 69179963)
    APIRequestPost "https://api.twitter.com/1.1/lists/members/create.json" [("list_id","20849097"),("user_id","69179963")]

data ListsDestroy Source #

listsDestroy :: ListParam -> APIRequest ListsDestroy List Source #

Returns the post parameter which deletes the specified list.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsDestroy (ListNameParam "thimura/haskell")

    >>> listsDestroy (ListNameParam "thimura/haskell")
    APIRequestPost "https://api.twitter.com/1.1/lists/destroy.json" [("slug","haskell"),("owner_screen_name","thimura")]
    >>> listsDestroy (ListIdParam 20849097)
    APIRequestPost "https://api.twitter.com/1.1/lists/destroy.json" [("list_id","20849097")]

data ListsUpdate Source #

listsUpdate Source #

Arguments

:: ListParam |
-> Bool | is public
-> Maybe Text | description
-> APIRequest ListsUpdate List |

Returns the post parameter which updates the specified list.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsUpdate (ListNameParam "thimura/haskell") True (Just Haskellers)

    >>> listsUpdate (ListNameParam "thimura/haskell") True (Just "Haskellers")
    APIRequestPost "https://api.twitter.com/1.1/lists/update.json" [("slug","haskell"),("owner_screen_name","thimura"),("description","Haskellers"),("mode","public")]

data ListsCreate Source #

listsCreate Source #

Arguments

:: Text | list name
-> Bool | whether public(True) or private(False)
-> Maybe Text | the description to give the list
-> APIRequest ListsCreate List |

Returns the post parameter which creates a new list for the authenticated user.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsCreate (ListNameParam "thimura/haskell")

    >>> listsCreate "haskell" True Nothing
    APIRequestPost "https://api.twitter.com/1.1/lists/create.json" [("name","haskell"),("mode","public")]
    >>> listsCreate "haskell" False Nothing
    APIRequestPost "https://api.twitter.com/1.1/lists/create.json" [("name","haskell"),("mode","private")]
    >>> listsCreate "haskell" True (Just "Haskellers")
    APIRequestPost "https://api.twitter.com/1.1/lists/create.json" [("description","Haskellers"),("name","haskell"),("mode","public")]

data ListsShow Source #

listsShow :: ListParam -> APIRequest ListsShow List Source #

Returns the request parameter which asks the specified list.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsShow (ListNameParam "thimura/haskell")

    >>> listsShow (ListNameParam "thimura/haskell")
    APIRequestGet "https://api.twitter.com/1.1/lists/show.json" [("slug","haskell"),("owner_screen_name","thimura")]
    >>> listsShow (ListIdParam 20849097)
    APIRequestGet "https://api.twitter.com/1.1/lists/show.json" [("list_id","20849097")]

data ListsSubscriptions Source #

Instances

HasCountParam (APIRequest ListsSubscriptions a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest ListsSubscriptions a) (Maybe Integer) Source #
HasCursorParam (APIRequest ListsSubscriptions a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest ListsSubscriptions a) (Maybe Integer) Source #

listsSubscriptions :: Maybe UserParam -> APIRequest ListsSubscriptions (WithCursor ListsCursorKey List) Source #

Returns the request parameter which obtains a collection of the lists the specified user is subscribed to.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsSubscriptions (ListNameParam "thimura/haskell")

    >>> listsSubscriptions Nothing
    APIRequestGet "https://api.twitter.com/1.1/lists/subscriptions.json" []
    >>> listsSubscriptions (Just (ScreenNameParam "thimura"))
    APIRequestGet "https://api.twitter.com/1.1/lists/subscriptions.json" [("screen_name","thimura")]
    >>> listsSubscriptions (Just (UserIdParam 69179963))
    APIRequestGet "https://api.twitter.com/1.1/lists/subscriptions.json" [("user_id","69179963")]

data ListsMembersDestroyAll Source #

listsMembersDestroyAll :: ListParam -> UserListParam -> APIRequest ListsMembersDestroyAll List Source #

Adds multiple members to a list.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsMembersDestroyAll (ListNameParam "thimura/haskell") (ScreenNameListParam ["thimura", "twitterapi"])

    >>> listsMembersDestroyAll (ListNameParam "thimura/haskell") (ScreenNameListParam ["thimura", "twitterapi"])
    APIRequestPost "https://api.twitter.com/1.1/lists/members/destroy_all.json" [("slug","haskell"),("owner_screen_name","thimura"),("screen_name","thimura,twitterapi")]
    >>> listsMembersDestroyAll (ListIdParam 20849097) (UserIdListParam [69179963, 6253282])
    APIRequestPost "https://api.twitter.com/1.1/lists/members/destroy_all.json" [("list_id","20849097"),("user_id","69179963,6253282")]

data ListsOwnerships Source #

Instances

HasCountParam (APIRequest ListsOwnerships a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods count :: Lens' (APIRequest ListsOwnerships a) (Maybe Integer) Source #
HasCursorParam (APIRequest ListsOwnerships a) Source # |
Instance details Defined in Web.Twitter.Conduit.Api Methods cursor :: Lens' (APIRequest ListsOwnerships a) (Maybe Integer) Source #

listsOwnerships :: Maybe UserParam -> APIRequest ListsOwnerships (WithCursor ListsCursorKey List) Source #

Returns the request parameter which asks the lists owned by the specified Twitter user.

You can perform request by using `call`:

    res <- call twInfo mgr $ listsOwnerships (ListNameParam "thimura/haskell")

    >>> listsOwnerships Nothing
    APIRequestGet "https://api.twitter.com/1.1/lists/ownerships.json" []
    >>> listsOwnerships (Just (ScreenNameParam "thimura"))
    APIRequestGet "https://api.twitter.com/1.1/lists/ownerships.json" [("screen_name","thimura")]
    >>> listsOwnerships (Just (UserIdParam 69179963))
    APIRequestGet "https://api.twitter.com/1.1/lists/ownerships.json" [("user_id","69179963")]

# Saved Searches

# Places & Geo

# media

data MediaUpload Source #

mediaUpload :: MediaData -> APIRequest MediaUpload UploadedMedia Source #

Upload media and returns the media data.

You can update your status with multiple media by calling `mediaUpload` and `update` successively.

First, you should upload media with `mediaUpload`:

    res1 <- call twInfo mgr $ mediaUpload (MediaFromFile "/path/to/upload/file1.png")
    res2 <- call twInfo mgr $ mediaUpload (MediaRequestBody "file2.png" "[.. file body ..]")

and then collect the resulting media IDs and update your status by calling `update`:

    call twInfo mgr $ update "Hello World" & mediaIds ?~ [mediaId res1, mediaId res2]

See: https://dev.twitter.com/docs/api/multiple-media-extended-entities

    >>> mediaUpload (MediaFromFile "/home/test/test.png")
    APIRequestPostMultipart "https://upload.twitter.com/1.1/media/upload.json" []