forked from haskell-github/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUsers.hs
More file actions
23 lines (20 loc) · 693 Bytes
/
Users.hs
File metadata and controls
23 lines (20 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- | The Github Users API, as described at
-- <http://developer.github.com/v3/users/>.
module Github.Users (
userInfoFor
,userInfoFor'
,module Github.Data
) where
import Github.Data
import Github.Private
-- | The information for a single user, by login name.
-- | With authentification
--
-- > userInfoFor' (Just ("github-username", "github-password")) "mike-burns"
userInfoFor' :: Maybe GithubAuth -> String -> IO (Either Error DetailedOwner)
userInfoFor' auth userName = githubGet' auth ["users", userName]
-- | The information for a single user, by login name.
--
-- > userInfoFor "mike-burns"
userInfoFor :: String -> IO (Either Error DetailedOwner)
userInfoFor = userInfoFor' Nothing