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

Safe Haskell | None
Language | Haskell2010

Web.Twitter.Conduit.Api

Contents

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

Synopsis

- statusesMentionsTimeline :: APIRequest StatusesMentionsTimeline [Status]
- statusesUserTimeline :: UserParam -> APIRequest StatusesUserTimeline [Status]
- statusesHomeTimeline :: APIRequest StatusesHomeTimeline [Status]
- statusesRetweetsOfMe :: APIRequest StatusesRetweetsOfMe [Status]
- statusesRetweetsId :: StatusId -> APIRequest StatusesRetweetsId [RetweetedStatus]
- statusesShowId :: StatusId -> APIRequest StatusesShowId Status
- statusesDestroyId :: StatusId -> APIRequest StatusesDestroyId Status
- statusesUpdate :: Text -> APIRequest StatusesUpdate Status
- statusesRetweetId :: StatusId -> APIRequest StatusesRetweetId RetweetedStatus
- statusesUpdateWithMedia :: Text -> MediaData -> APIRequest StatusesUpdateWithMedia Status
- statusesLookup :: [StatusId] -> APIRequest StatusesLookup [Status]
- type SearchTweets = '["lang" := Text, "locale" := Text, "count" := Integer, "until" := Day, "since_id" := Integer, "max_id" := Integer, "include_entities" := Bool]
- searchTweets :: Text -> APIRequest SearchTweets (SearchResult [Status])
- search :: Text -> APIRequest SearchTweets (SearchResult [Status])
- type DirectMessages = '["count" := Integer, "include_entities" := Bool, "skip_status" := Bool, "full_text" := Bool, "cursor" := Text]
- directMessages :: APIRequest DirectMessages (WithCursor Text EventsCursorKey DirectMessage)
- type DirectMessagesSent = '["since_id" := Integer, "max_id" := Integer, "count" := Integer, "include_entities" := Bool, "page" := Integer, "skip_status" := Bool, "full_text" := Bool]
- directMessagesSent :: APIRequest DirectMessagesSent [DirectMessage]
- type DirectMessagesShow = '["full_text" := Bool]
- directMessagesShow :: StatusId -> APIRequest DirectMessagesShow DirectMessage
- type DirectMessagesDestroy = EmptyParams
- directMessagesDestroy :: StatusId -> APIRequest DirectMessagesDestroy NoContent
- type DirectMessagesNew = EmptyParams
- directMessagesNew :: RecipientId -> Text -> APIRequest DirectMessagesNew DirectMessagesNewResponse
- type FriendshipsNoRetweetsIds = EmptyParams
- friendshipsNoRetweetsIds :: APIRequest FriendshipsNoRetweetsIds [UserId]
- type FriendsIds = '["count" := Integer, "cursor" := Integer]
- friendsIds :: UserParam -> APIRequest FriendsIds (WithCursor Integer IdsCursorKey UserId)
- type FollowersIds = '["count" := Integer, "cursor" := Integer]
- followersIds :: UserParam -> APIRequest FollowersIds (WithCursor Integer IdsCursorKey UserId)
- type FriendshipsIncoming = '["cursor" := Integer]
- friendshipsIncoming :: APIRequest FriendshipsIncoming (WithCursor Integer IdsCursorKey UserId)
- type FriendshipsOutgoing = '["cursor" := Integer]
- friendshipsOutgoing :: APIRequest FriendshipsOutgoing (WithCursor Integer IdsCursorKey UserId)
- type FriendshipsCreate = '["follow" := Bool]
- friendshipsCreate :: UserParam -> APIRequest FriendshipsCreate User
- type FriendshipsDestroy = EmptyParams
- friendshipsDestroy :: UserParam -> APIRequest FriendshipsDestroy User
- type FriendsList = '["count" := Integer, "cursor" := Integer, "skip_status" := Bool, "include_user_entities" := Bool]
- friendsList :: UserParam -> APIRequest FriendsList (WithCursor Integer UsersCursorKey User)
- type FollowersList = '["count" := Integer, "cursor" := Integer, "skip_status" := Bool, "include_user_entities" := Bool]
- followersList :: UserParam -> APIRequest FollowersList (WithCursor Integer UsersCursorKey User)
- type AccountVerifyCredentials = '["include_entities" := Bool, "skip_status" := Bool, "include_email" := Bool]
- accountVerifyCredentials :: APIRequest AccountVerifyCredentials User
- type AccountUpdateProfile = '["include_entities" := Bool, "skip_status" := Bool, "name" := Text, "url" := URIString, "location" := Text, "description" := Text, "profile_link_color" := Text]
- accountUpdateProfile :: APIRequest AccountUpdateProfile User
- type UsersLookup = '["include_entities" := Bool]
- usersLookup :: UserListParam -> APIRequest UsersLookup [User]
- type UsersShow = '["include_entities" := Bool]
- usersShow :: UserParam -> APIRequest UsersShow User
- type FavoritesList = '["count" := Integer, "since_id" := Integer, "max_id" := Integer, "include_entities" := Bool]
- favoritesList :: Maybe UserParam -> APIRequest FavoritesList [Status]
- type FavoritesDestroy = '["include_entities" := Bool]
- favoritesDestroy :: StatusId -> APIRequest FavoritesDestroy Status
- type FavoritesCreate = '["include_entities" := Bool]
- favoritesCreate :: StatusId -> APIRequest FavoritesCreate Status
- type ListsStatuses = '["since_id" := Integer, "max_id" := Integer, "count" := Integer, "include_entities" := Bool, "include_rts" := Bool]
- listsStatuses :: ListParam -> APIRequest ListsStatuses [Status]
- type ListsMembersDestroy = EmptyParams
- listsMembersDestroy :: ListParam -> UserParam -> APIRequest ListsMembersDestroy List
- type ListsMemberships = '["count" := Integer, "cursor" := Integer]
- listsMemberships :: Maybe UserParam -> APIRequest ListsMemberships (WithCursor Integer ListsCursorKey List)
- type ListsSubscribers = '["count" := Integer, "cursor" := Integer, "skip_status" := Bool]
- listsSubscribers :: ListParam -> APIRequest ListsSubscribers (WithCursor Integer UsersCursorKey User)
- type ListsMembersCreateAll = EmptyParams
- listsMembersCreateAll :: ListParam -> UserListParam -> APIRequest ListsMembersCreateAll List
- type ListsMembers = '["count" := Integer, "cursor" := Integer, "skip_status" := Bool]
- listsMembers :: ListParam -> APIRequest ListsMembers (WithCursor Integer UsersCursorKey User)
- type ListsMembersCreate = EmptyParams
- listsMembersCreate :: ListParam -> UserParam -> APIRequest ListsMembersCreate List
- type ListsDestroy = EmptyParams
- listsDestroy :: ListParam -> APIRequest ListsDestroy List
- type ListsUpdate = EmptyParams
- listsUpdate :: ListParam -> Bool -> Maybe Text -> APIRequest ListsUpdate List
- type ListsCreate = EmptyParams
- listsCreate :: Text -> Bool -> Maybe Text -> APIRequest ListsCreate List
- type ListsShow = EmptyParams
- listsShow :: ListParam -> APIRequest ListsShow List
- type ListsSubscriptions = '["count" := Integer, "cursor" := Integer]
- listsSubscriptions :: Maybe UserParam -> APIRequest ListsSubscriptions (WithCursor Integer ListsCursorKey List)
- type ListsMembersDestroyAll = EmptyParams
- listsMembersDestroyAll :: ListParam -> UserListParam -> APIRequest ListsMembersDestroyAll List
- type ListsOwnerships = '["count" := Integer, "cursor" := Integer]
- listsOwnerships :: Maybe UserParam -> APIRequest ListsOwnerships (WithCursor Integer ListsCursorKey List)
- type MediaUpload = EmptyParams
- mediaUpload :: MediaData -> APIRequest MediaUpload UploadedMedia

# Status

statusesMentionsTimeline :: APIRequest StatusesMentionsTimeline [Status] Source #

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

statusesHomeTimeline :: APIRequest StatusesHomeTimeline [Status] Source #

statusesRetweetsOfMe :: APIRequest StatusesRetweetsOfMe [Status] Source #

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

statusesShowId :: StatusId -> APIRequest StatusesShowId Status Source #

statusesDestroyId :: StatusId -> APIRequest StatusesDestroyId Status Source #

statusesUpdate :: Text -> APIRequest StatusesUpdate Status Source #

statusesRetweetId :: StatusId -> APIRequest StatusesRetweetId RetweetedStatus Source #

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

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

# Search

type SearchTweets = '["lang" := Text, "locale" := Text, "count" := Integer, "until" := Day, "since_id" := Integer, "max_id" := Integer, "include_entities" := Bool] 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"
    APIRequest "GET" "https://api.twitter.com/1.1/search/tweets.json" [("q","search text")]
    >>> searchTweets "search text" & #lang ?~ "ja" & #count ?~ 100
    APIRequest "GET" "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]) |

Deprecated: Please use Web.Twitter.Conduit.searchTweets

Alias of `searchTweets`, for backward compatibility

# Direct Messages

type DirectMessages = '["count" := Integer, "include_entities" := Bool, "skip_status" := Bool, "full_text" := Bool, "cursor" := Text] Source #

directMessages :: APIRequest DirectMessages (WithCursor Text EventsCursorKey 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 ?~ 50

    >>> directMessages
    APIRequest "GET" "https://api.twitter.com/1.1/direct_messages/events/list.json" []
    >>> directMessages & #count ?~ 50
    APIRequest "GET" "https://api.twitter.com/1.1/direct_messages/events/list.json" [("count","50")]

type DirectMessagesSent = '["since_id" := Integer, "max_id" := Integer, "count" := Integer, "include_entities" := Bool, "page" := Integer, "skip_status" := Bool, "full_text" := 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
    APIRequest "GET" "https://api.twitter.com/1.1/direct_messages/sent.json" []
    >>> directMessagesSent & #count ?~ 100
    APIRequest "GET" "https://api.twitter.com/1.1/direct_messages/sent.json" [("count","100")]

type DirectMessagesShow = '["full_text" := 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
    APIRequest "GET" "https://api.twitter.com/1.1/direct_messages/show.json" [("id","1234567890")]

type DirectMessagesDestroy = EmptyParams Source #

directMessagesDestroy :: StatusId -> APIRequest DirectMessagesDestroy NoContent 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
    APIRequest "DELETE" "https://api.twitter.com/1.1/direct_messages/events/destroy.json" [("id","1234567890")]

type DirectMessagesNew = EmptyParams Source #

directMessagesNew :: RecipientId -> Text -> APIRequest DirectMessagesNew DirectMessagesNewResponse 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 69179963 "Hello thimura! by UserId"
    APIRequestJSON "POST" "https://api.twitter.com/1.1/direct_messages/events/new.json" []

# Friends & Followers

type FriendshipsNoRetweetsIds = EmptyParams 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
    APIRequest "GET" "https://api.twitter.com/1.1/friendships/no_retweets/ids.json" []

type FriendsIds = '["count" := Integer, "cursor" := Integer] Source #

friendsIds :: UserParam -> APIRequest FriendsIds (WithCursor Integer 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")
    APIRequest "GET" "https://api.twitter.com/1.1/friends/ids.json" [("screen_name","thimura")]
    >>> friendsIds (ScreenNameParam "thimura") & #count ?~ 5000
    APIRequest "GET" "https://api.twitter.com/1.1/friends/ids.json" [("count","5000"),("screen_name","thimura")]

type FollowersIds = '["count" := Integer, "cursor" := Integer] Source #

followersIds :: UserParam -> APIRequest FollowersIds (WithCursor Integer 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")
    APIRequest "GET" "https://api.twitter.com/1.1/followers/ids.json" [("screen_name","thimura")]
    >>> followersIds (ScreenNameParam "thimura") & #count ?~ 5000
    APIRequest "GET" "https://api.twitter.com/1.1/followers/ids.json" [("count","5000"),("screen_name","thimura")]

type FriendshipsIncoming = '["cursor" := Integer] Source #

friendshipsIncoming :: APIRequest FriendshipsIncoming (WithCursor Integer 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
    APIRequest "GET" "https://api.twitter.com/1.1/friendships/incoming.json" []

type FriendshipsOutgoing = '["cursor" := Integer] Source #

friendshipsOutgoing :: APIRequest FriendshipsOutgoing (WithCursor Integer 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
    APIRequest "GET" "https://api.twitter.com/1.1/friendships/outgoing.json" []

type FriendshipsCreate = '["follow" := 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")
    APIRequest "POST" "https://api.twitter.com/1.1/friendships/create.json" [("screen_name","thimura")]
    >>> friendshipsCreate (UserIdParam 69179963)
    APIRequest "POST" "https://api.twitter.com/1.1/friendships/create.json" [("user_id","69179963")]

type FriendshipsDestroy = EmptyParams 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")
    APIRequest "POST" "https://api.twitter.com/1.1/friendships/destroy.json" [("screen_name","thimura")]
    >>> friendshipsDestroy (UserIdParam 69179963)
    APIRequest "POST" "https://api.twitter.com/1.1/friendships/destroy.json" [("user_id","69179963")]

type FriendsList = '["count" := Integer, "cursor" := Integer, "skip_status" := Bool, "include_user_entities" := Bool] Source #

friendsList :: UserParam -> APIRequest FriendsList (WithCursor Integer 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")
    APIRequest "GET" "https://api.twitter.com/1.1/friends/list.json" [("screen_name","thimura")]
    >>> friendsList (UserIdParam 69179963)
    APIRequest "GET" "https://api.twitter.com/1.1/friends/list.json" [("user_id","69179963")]

type FollowersList = '["count" := Integer, "cursor" := Integer, "skip_status" := Bool, "include_user_entities" := Bool] Source #

followersList :: UserParam -> APIRequest FollowersList (WithCursor Integer 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")
    APIRequest "GET" "https://api.twitter.com/1.1/followers/list.json" [("screen_name","thimura")]
    >>> followersList (UserIdParam 69179963)
    APIRequest "GET" "https://api.twitter.com/1.1/followers/list.json" [("user_id","69179963")]

# Users

type AccountVerifyCredentials = '["include_entities" := Bool, "skip_status" := Bool, "include_email" := 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
    APIRequest "GET" "https://api.twitter.com/1.1/account/verify_credentials.json" []

type AccountUpdateProfile = '["include_entities" := Bool, "skip_status" := Bool, "name" := Text, "url" := URIString, "location" := Text, "description" := Text, "profile_link_color" := Text] 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"
    APIRequest "POST" "https://api.twitter.com/1.1/account/update_profile.json" [("url","http://www.example.com")]

type UsersLookup = '["include_entities" := 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"])
    APIRequest "GET" "https://api.twitter.com/1.1/users/lookup.json" [("screen_name","thimura,twitterapi")]

type UsersShow = '["include_entities" := 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")
    APIRequest "GET" "https://api.twitter.com/1.1/users/show.json" [("screen_name","thimura")]

# Suggested Users

# Favorites

type FavoritesList = '["count" := Integer, "since_id" := Integer, "max_id" := Integer, "include_entities" := 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
    APIRequest "GET" "https://api.twitter.com/1.1/favorites/list.json" []
    >>> favoritesList (Just (ScreenNameParam "thimura"))
    APIRequest "GET" "https://api.twitter.com/1.1/favorites/list.json" [("screen_name","thimura")]
    >>> favoritesList (Just (UserIdParam 69179963))
    APIRequest "GET" "https://api.twitter.com/1.1/favorites/list.json" [("user_id","69179963")]

type FavoritesDestroy = '["include_entities" := 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
    APIRequest "POST" "https://api.twitter.com/1.1/favorites/destroy.json" [("id","1234567890")]

type FavoritesCreate = '["include_entities" := 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
    APIRequest "POST" "https://api.twitter.com/1.1/favorites/create.json" [("id","1234567890")]

# Lists

type ListsStatuses = '["since_id" := Integer, "max_id" := Integer, "count" := Integer, "include_entities" := Bool, "include_rts" := 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")
    APIRequest "GET" "https://api.twitter.com/1.1/lists/statuses.json" [("slug","haskell"),("owner_screen_name","thimura")]
    >>> listsStatuses (ListIdParam 20849097)
    APIRequest "GET" "https://api.twitter.com/1.1/lists/statuses.json" [("list_id","20849097")]

type ListsMembersDestroy = EmptyParams 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")
    APIRequest "POST" "https://api.twitter.com/1.1/lists/members/destroy.json" [("slug","haskell"),("owner_screen_name","thimura"),("screen_name","thimura")]
    >>> listsMembersDestroy (ListIdParam 20849097) (UserIdParam 69179963)
    APIRequest "POST" "https://api.twitter.com/1.1/lists/members/destroy.json" [("list_id","20849097"),("user_id","69179963")]

type ListsMemberships = '["count" := Integer, "cursor" := Integer] Source #

listsMemberships :: Maybe UserParam -> APIRequest ListsMemberships (WithCursor Integer 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
    APIRequest "GET" "https://api.twitter.com/1.1/lists/memberships.json" []
    >>> listsMemberships (Just (ScreenNameParam "thimura"))
    APIRequest "GET" "https://api.twitter.com/1.1/lists/memberships.json" [("screen_name","thimura")]
    >>> listsMemberships (Just (UserIdParam 69179963))
    APIRequest "GET" "https://api.twitter.com/1.1/lists/memberships.json" [("user_id","69179963")]

type ListsSubscribers = '["count" := Integer, "cursor" := Integer, "skip_status" := Bool] Source #

listsSubscribers :: ListParam -> APIRequest ListsSubscribers (WithCursor Integer 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")
    APIRequest "GET" "https://api.twitter.com/1.1/lists/subscribers.json" [("slug","haskell"),("owner_screen_name","thimura")]
    >>> listsSubscribers (ListIdParam 20849097)
    APIRequest "GET" "https://api.twitter.com/1.1/lists/subscribers.json" [("list_id","20849097")]

type ListsMembersCreateAll = EmptyParams 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"])
    APIRequest "POST" "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])
    APIRequest "POST" "https://api.twitter.com/1.1/lists/members/create_all.json" [("list_id","20849097"),("user_id","69179963,6253282")]

type ListsMembers = '["count" := Integer, "cursor" := Integer, "skip_status" := Bool] Source #

listsMembers :: ListParam -> APIRequest ListsMembers (WithCursor Integer 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")
    APIRequest "GET" "https://api.twitter.com/1.1/lists/members.json" [("slug","haskell"),("owner_screen_name","thimura")]
    >>> listsMembers (ListIdParam 20849097)
    APIRequest "GET" "https://api.twitter.com/1.1/lists/members.json" [("list_id","20849097")]

type ListsMembersCreate = EmptyParams 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")
    APIRequest "POST" "https://api.twitter.com/1.1/lists/members/create.json" [("slug","haskell"),("owner_screen_name","thimura"),("screen_name","thimura")]
    >>> listsMembersCreate (ListIdParam 20849097) (UserIdParam 69179963)
    APIRequest "POST" "https://api.twitter.com/1.1/lists/members/create.json" [("list_id","20849097"),("user_id","69179963")]

type ListsDestroy = EmptyParams 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")
    APIRequest "POST" "https://api.twitter.com/1.1/lists/destroy.json" [("slug","haskell"),("owner_screen_name","thimura")]
    >>> listsDestroy (ListIdParam 20849097)
    APIRequest "POST" "https://api.twitter.com/1.1/lists/destroy.json" [("list_id","20849097")]

type ListsUpdate = EmptyParams 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")
    APIRequest "POST" "https://api.twitter.com/1.1/lists/update.json" [("slug","haskell"),("owner_screen_name","thimura"),("description","Haskellers"),("mode","public")]

type ListsCreate = EmptyParams 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
    APIRequest "POST" "https://api.twitter.com/1.1/lists/create.json" [("name","haskell"),("mode","public")]
    >>> listsCreate "haskell" False Nothing
    APIRequest "POST" "https://api.twitter.com/1.1/lists/create.json" [("name","haskell"),("mode","private")]
    >>> listsCreate "haskell" True (Just "Haskellers")
    APIRequest "POST" "https://api.twitter.com/1.1/lists/create.json" [("description","Haskellers"),("name","haskell"),("mode","public")]

type ListsShow = EmptyParams 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")
    APIRequest "GET" "https://api.twitter.com/1.1/lists/show.json" [("slug","haskell"),("owner_screen_name","thimura")]
    >>> listsShow (ListIdParam 20849097)
    APIRequest "GET" "https://api.twitter.com/1.1/lists/show.json" [("list_id","20849097")]

type ListsSubscriptions = '["count" := Integer, "cursor" := Integer] Source #

listsSubscriptions :: Maybe UserParam -> APIRequest ListsSubscriptions (WithCursor Integer 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
    APIRequest "GET" "https://api.twitter.com/1.1/lists/subscriptions.json" []
    >>> listsSubscriptions (Just (ScreenNameParam "thimura"))
    APIRequest "GET" "https://api.twitter.com/1.1/lists/subscriptions.json" [("screen_name","thimura")]
    >>> listsSubscriptions (Just (UserIdParam 69179963))
    APIRequest "GET" "https://api.twitter.com/1.1/lists/subscriptions.json" [("user_id","69179963")]

type ListsMembersDestroyAll = EmptyParams 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"])
    APIRequest "POST" "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])
    APIRequest "POST" "https://api.twitter.com/1.1/lists/members/destroy_all.json" [("list_id","20849097"),("user_id","69179963,6253282")]

type ListsOwnerships = '["count" := Integer, "cursor" := Integer] Source #

listsOwnerships :: Maybe UserParam -> APIRequest ListsOwnerships (WithCursor Integer 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
    APIRequest "GET" "https://api.twitter.com/1.1/lists/ownerships.json" []
    >>> listsOwnerships (Just (ScreenNameParam "thimura"))
    APIRequest "GET" "https://api.twitter.com/1.1/lists/ownerships.json" [("screen_name","thimura")]
    >>> listsOwnerships (Just (UserIdParam 69179963))
    APIRequest "GET" "https://api.twitter.com/1.1/lists/ownerships.json" [("user_id","69179963")]

# Saved Searches

# Places & Geo

# media

type MediaUpload = EmptyParams 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" & #media_ids ?~ [uploadedMediaId res1, uploadedMediaId res2]

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

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