File: Forks.hs

package info (click to toggle)
haskell-github 0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 444 kB
  • sloc: haskell: 2,572; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 731 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- | Hot forking action, as described at
-- <http://developer.github.com/v3/repos/forks/>.
module Github.Repos.Forks (
 forksFor
,forksFor'
,module Github.Data
) where

import Github.Data
import Github.Private

-- | All the repos that are forked off the given repo.
--
-- > forksFor "thoughtbot" "paperclip"
forksFor :: String -> String -> IO (Either Error [Repo])
forksFor = forksFor' Nothing

-- | All the repos that are forked off the given repo.
-- | With authentication
--
-- > forksFor' (Just (GithubUser (user, password))) "thoughtbot" "paperclip"
forksFor' :: Maybe GithubAuth -> String -> String -> IO (Either Error [Repo])
forksFor' auth userName reqRepoName =
  githubGet' auth ["repos", userName, reqRepoName, "forks"]