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

Safe Haskell | None
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
- mkUserParam :: UserParam -> APIQuery
- mkUserListParam :: UserListParam -> APIQuery
- mkListParam :: ListParam -> APIQuery

# Documentation

data UserParam Source #

Constructors

UserIdParam UserId |
ScreenNameParam String |

#### Instances

Instances details

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

data UserListParam Source #

Constructors

UserIdListParam [UserId] |
ScreenNameListParam [String] |

#### Instances

Instances details

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

data ListParam Source #

Constructors

ListIdParam Integer |
ListNameParam String |

#### Instances

Instances details

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

data MediaData Source #

Constructors

MediaFromFile FilePath |
MediaRequestBody FilePath RequestBody |

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")]