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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Web.Twitter.Conduit.Parameters

Synopsis

- data UserParam
  - = UserIdParam UserId
  - | ScreenNameParam String
- data UserListParam
  - = UserIdListParam [UserId]
  - | ScreenNameListParam [String]
- data ListParam
  - = ListIdParam Integer
  - | ListNameParam String
- data MediaData
  - = MediaFromFile FilePath
  - | MediaRequestBody FilePath RequestBody
- data TweetMode = Extended
- mkUserParam :: UserParam -> APIQuery
- mkUserListParam :: UserListParam -> APIQuery
- mkListParam :: ListParam -> APIQuery

# Documentation

data UserParam Source #

Constructors

UserIdParam UserId |
ScreenNameParam String |

#### Instances

Instances details

Show UserParam Source # |
Instance details Defined in Web.Twitter.Conduit.Parameters Methods showsPrec :: Int -> UserParam -> ShowS Source # show :: UserParam -> String Source # showList :: [UserParam] -> ShowS Source #
Eq UserParam Source # |
Instance details Defined in Web.Twitter.Conduit.Parameters Methods (==) :: UserParam -> UserParam -> Bool Source # (/=) :: UserParam -> UserParam -> Bool Source #

data UserListParam Source #

Constructors

UserIdListParam [UserId] |
ScreenNameListParam [String] |

#### Instances

Instances details

Show UserListParam Source # |
Instance details Defined in Web.Twitter.Conduit.Parameters Methods showsPrec :: Int -> UserListParam -> ShowS Source # show :: UserListParam -> String Source # showList :: [UserListParam] -> ShowS Source #
Eq UserListParam Source # |
Instance details Defined in Web.Twitter.Conduit.Parameters Methods (==) :: UserListParam -> UserListParam -> Bool Source # (/=) :: UserListParam -> UserListParam -> Bool Source #

data ListParam Source #

Constructors

ListIdParam Integer |
ListNameParam String |

#### Instances

Instances details

Show ListParam Source # |
Instance details Defined in Web.Twitter.Conduit.Parameters Methods showsPrec :: Int -> ListParam -> ShowS Source # show :: ListParam -> String Source # showList :: [ListParam] -> ShowS Source #
Eq ListParam Source # |
Instance details Defined in Web.Twitter.Conduit.Parameters Methods (==) :: ListParam -> ListParam -> Bool Source # (/=) :: ListParam -> ListParam -> Bool Source #

data MediaData Source #

Constructors

MediaFromFile FilePath |
MediaRequestBody FilePath RequestBody |

data TweetMode Source #

Constructors

Extended |

#### Instances

Instances details

Show TweetMode Source # |
Instance details Defined in Web.Twitter.Conduit.Parameters Methods showsPrec :: Int -> TweetMode -> ShowS Source # show :: TweetMode -> String Source # showList :: [TweetMode] -> ShowS Source #
Eq TweetMode Source # |
Instance details Defined in Web.Twitter.Conduit.Parameters Methods (==) :: TweetMode -> TweetMode -> Bool Source # (/=) :: TweetMode -> TweetMode -> Bool Source #
ParameterValue TweetMode Source # |
Instance details Defined in Web.Twitter.Conduit.Parameters Methods wrap :: TweetMode -> PV Source # unwrap :: PV -> TweetMode Source #

mkUserParam :: UserParam -> APIQuery Source #

converts `UserParam` to `SimpleQuery`.

    >>> makeSimpleQuery . mkUserParam $ UserIdParam 123456
    [("user_id","123456")]
    >>> makeSimpleQuery . mkUserParam $ ScreenNameParam "thimura"
    [("screen_name","thimura")]

mkUserListParam :: UserListParam -> APIQuery Source #

converts `UserListParam` to `SimpleQuery`.

    >>> makeSimpleQuery . mkUserListParam $ UserIdListParam [123456]
    [("user_id","123456")]
    >>> makeSimpleQuery . mkUserListParam $ UserIdListParam [123456, 654321]
    [("user_id","123456,654321")]
    >>> makeSimpleQuery . mkUserListParam $ ScreenNameListParam ["thimura", "NikaidouShinku"]
    [("screen_name","thimura,NikaidouShinku")]

mkListParam :: ListParam -> APIQuery Source #

converts `ListParam` to `SimpleQuery`.

    >>> makeSimpleQuery . mkListParam $ ListIdParam 123123
    [("list_id","123123")]
    >>> makeSimpleQuery . mkListParam $ ListNameParam "thimura/haskell"
    [("slug","haskell"),("owner_screen_name","thimura")]