File: Comments.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 (24 lines) | stat: -rw-r--r-- 764 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
-- | The Github issue comments API from
-- <http://developer.github.com/v3/issues/comments/>.
module Github.Issues.Comments (
 comment
,comments
,module Github.Data
) where

import Github.Data
import Github.Private

-- | A specific comment, by ID.
--
-- > comment "thoughtbot" "paperclip" 1468184
comment :: String -> String -> Int -> IO (Either Error IssueComment)
comment user repoName commentId =
  githubGet ["repos", user, repoName, "issues", "comments", show commentId]

-- | All comments on an issue, by the issue's number.
--
-- > comments "thoughtbot" "paperclip" 635
comments :: String -> String -> Int -> IO (Either Error [IssueComment])
comments user repoName issueNumber =
  githubGet ["repos", user, repoName, "issues", show issueNumber, "comments"]