File: Followers.hs

package info (click to toggle)
haskell-github 0.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 452 kB
  • sloc: haskell: 2,286; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- | The user followers API as described on
-- <http://developer.github.com/v3/users/followers/>.
module Github.Users.Followers (
 usersFollowing
,usersFollowedBy
,module Github.Data
) where

import Github.Data
import Github.Private

-- | All the users following the given user.
--
-- > usersFollowing "mike-burns"
usersFollowing :: String -> IO (Either Error [GithubOwner])
usersFollowing userName = githubGet ["users", userName, "followers"]

-- | All the users that the given user follows.
--
-- > usersFollowedBy "mike-burns"
usersFollowedBy :: String -> IO (Either Error [GithubOwner])
usersFollowedBy userName = githubGet ["users", userName, "following"]