Skip to content

Commit 449ee12

Browse files
committed
show-users-2
1 parent c6e8ed6 commit 449ee12

6 files changed

Lines changed: 59 additions & 10 deletions

File tree

Github/All.hs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
-- License : BSD-3-Clause
44
-- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi>
55
--
6-
-- This module re-exports all request constructrors and
7-
-- data definitions from this package.
6+
-- This module re-exports all request constructrors and data definitions from
7+
-- this package.
88
--
9-
-- The missing endpoints lists are exhausive, they indicate endpoints we know are missing.
9+
-- See 'Github.Request' module for executing 'GithubRequest', or other modules
10+
-- of this package (e.g. 'Github.Users') for already composed versions.
11+
--
12+
-- The missing endpoints lists show which endpoints we know are missing, there
13+
-- might be more.
1014
module Github.All (
1115
-- * Activity
1216
-- | See <https://developer.github.com/v3/activity/>

github.cabal

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
Name: github
22
Version: 0.14.0
33
Synopsis: Access to the Github API, v3.
4-
Description: The Github API provides programmatic access to the full
5-
Github Web site, from Issues to Gists to repos down to the underlying git data
6-
like references and trees. This library wraps all of that, exposing a basic but
7-
Haskell-friendly set of functions and data structures.
8-
.
9-
For more of an overview please see the README: <https://github.com/phadej/github/blob/master/README.md>
4+
Description:
5+
The Github API provides programmatic access to the full
6+
Github Web site, from Issues to Gists to repos down to the underlying git data
7+
like references and trees. This library wraps all of that, exposing a basic but
8+
Haskell-friendly set of functions and data structures.
9+
.
10+
For supported endpoints see "Github.All" module.
11+
.
12+
>{-# LANGUAGE OverloadedStrings #-}
13+
>module Main (main) where
14+
>
15+
>import qualified Github.All as GH
16+
>
17+
>main :: IO ()
18+
>main = do
19+
> possibleUser <- GH.executeRequest' $ GH.userInfoR "phadej"
20+
> print possibleUser
21+
.
22+
For more of an overview please see the README: <https://github.com/phadej/github/blob/master/README.md>
1023
License: BSD3
1124
License-file: LICENSE
1225
Author: Mike Burns, John Wiegley, Oleg Grenrus

samples/Users/ShowUser2.hs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{-# LANGUAGE OverloadedStrings #-}
2+
module Main (main) where
3+
4+
import qualified Github.All as GH
5+
6+
main :: IO ()
7+
main = do
8+
possibleUser <- GH.executeRequest' $ GH.userInfoForR "phadej"
9+
print possibleUser

samples/github-samples.cabal

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ executable github-show-user
8686
other-modules:
8787
Followers.ListFollowers
8888
Followers.ListFollowing
89+
ShowUser2
8990
default-language: Haskell2010
9091

9192
executable github-list-following
@@ -192,6 +193,23 @@ executable github-delete-team
192193
TeamInfoFor
193194
default-language: Haskell2010
194195

196+
executable github-show-user-2
197+
main-is: ShowUser2.hs
198+
hs-source-dirs:
199+
Users
200+
ghc-options: -Wall
201+
build-depends:
202+
base
203+
, base-compat
204+
, github
205+
, text
206+
, github-samples
207+
other-modules:
208+
Followers.ListFollowers
209+
Followers.ListFollowing
210+
ShowUser
211+
default-language: Haskell2010
212+
195213
executable github-teaminfo-for
196214
main-is: TeamInfoFor.hs
197215
hs-source-dirs:

samples/package.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ executables:
1717
source-dirs: Users
1818
dependencies:
1919
- github-samples
20+
github-show-user-2:
21+
main: ShowUser2.hs
22+
source-dirs: Users
23+
dependencies:
24+
- github-samples
2025
github-list-followers:
2126
main: ListFollowers.hs
2227
source-dirs: Users/Followers

travis-script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ case $BUILD in
66
stack --no-terminal build github-samples
77

88
# TODO: get executables from info
9-
for testbin in show-user list-followers list-following; do
9+
for testbin in show-user list-followers list-following operational; do
1010
echo "Running " $testbin
1111
stack exec github-$testbin
1212
done

0 commit comments

Comments
 (0)