Skip to content

Commit da6c366

Browse files
committed
Initial project.
0 parents  commit da6c366

File tree

5 files changed

+140
-0
lines changed

5 files changed

+140
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
*swp

LICENSE

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Copyright (c)2011, ???
2+
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above
12+
copyright notice, this list of conditions and the following
13+
disclaimer in the documentation and/or other materials provided
14+
with the distribution.
15+
16+
* Neither the name of ??? nor the names of other
17+
contributors may be used to endorse or promote products derived
18+
from this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Github
2+
------
3+
4+
The Github API v3 for Haskell.
5+
6+
Installation
7+
============
8+
9+
In your project's cabal file:
10+
11+
-- Packages needed in order to build this package.
12+
Build-depends: github
13+
14+
Or from the command line:
15+
16+
cabal install github
17+
18+
Example Usage
19+
=============
20+
21+
import qualified Github.Repos.Commits as Github
22+
23+
main = do
24+
commits <- Github.commitsFor "thoughtbot" "paperclip"
25+
putStrLn $ map formatCommit commits
26+
27+
formatCommit :: Commit -> String
28+
formatCommit commit =
29+
"commit " ++ (Github.commitSha commit) ++
30+
"\nAuthor: " ++ (formatAuthor $ Github.commitAuthor commit) ++
31+
"\nDate: " ++ (show $ Github.commitCommiterDate commit) ++
32+
"\n\n\t" ++ (Github.commitMessage commit)
33+
34+
formatAuthor :: Author -> String
35+
formatAuthor author =
36+
(Github.authorName author) ++ " <" ++ (Github.authorEmail) ++ ">
37+
38+
Documentation
39+
=============
40+
41+
For details see the reference documentation on Hackage.
42+
43+
Copyright
44+
=========
45+
46+
Copyright 2011 Mike Burns.
47+
48+
Available under the BSD 3-clause license.

Setup.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import Distribution.Simple
2+
main = defaultMain

github.cabal

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
-- github.cabal auto-generated by cabal init. For additional options,
2+
-- see
3+
-- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr.
4+
-- The name of the package.
5+
Name: github
6+
7+
-- The package version. See the Haskell package versioning policy
8+
-- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
9+
-- standards guiding when and how versions should be incremented.
10+
Version: 0.1
11+
12+
-- A short (one-line) description of the package.
13+
Synopsis: Access to the Github API, v3.
14+
15+
-- A longer description of the package.
16+
-- Description:
17+
18+
-- The license under which the package is released.
19+
License: BSD3
20+
21+
-- The file containing the license text.
22+
License-file: LICENSE
23+
24+
-- The package author(s).
25+
Author: Mike Burns
26+
27+
-- An email address to which users can send suggestions, bug reports,
28+
-- and patches.
29+
Maintainer: [email protected]
30+
31+
-- A copyright notice.
32+
Copyright: Copyright 2011 Mike Burns
33+
34+
Category: Network APIs
35+
36+
Build-type: Simple
37+
38+
-- Extra files to be distributed with the package, such as examples or
39+
-- a README.
40+
Extra-source-files: README.md
41+
42+
-- Constraint on the version of Cabal needed to build this package.
43+
Cabal-version: >=1.2
44+
45+
46+
Library
47+
-- Modules exported by the library.
48+
Exposed-modules: Github.Repos.Commits
49+
50+
-- Packages needed in order to build this package.
51+
-- Build-depends:
52+
53+
-- Modules not exported by this package.
54+
-- Other-modules:
55+
56+
-- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.
57+
-- Build-tools:
58+

0 commit comments

Comments
 (0)