Skip to content

Commit

Permalink
Merge pull request #306 from mayeranalytics/master
Browse files Browse the repository at this point in the history
userRepo should be repository
  • Loading branch information
phadej committed Jan 18, 2018
2 parents e592153 + 3470ed9 commit e4bab2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion samples/Repos/ShowRepo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Data.List
import Data.Maybe

main = do
possibleRepo <- Github.userRepo "mike-burns" "trylambda"
possibleRepo <- Github.repository "mike-burns" "trylambda"
case possibleRepo of
(Left error) -> putStrLn $ "Error: " ++ (show error)
(Right repo) -> putStrLn $ formatRepo repo
Expand Down
4 changes: 2 additions & 2 deletions src/GitHub/Endpoints/Repos.hs
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ organizationReposR org publicity =

-- | Details on a specific repo, given the owner and repo name.
--
-- > userRepo "mike-burns" "github"
-- > repository "mike-burns" "github"
repository :: Name Owner -> Name Repo -> IO (Either Error Repo)
repository = repository' Nothing

-- | Details on a specific repo, given the owner and repo name.
-- With authentication.
--
-- > userRepo' (Just (BasicAuth (user, password))) "mike-burns" "github"
-- > repository' (Just (BasicAuth (user, password))) "mike-burns" "github"
repository' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Repo)
repository' auth user repo =
executeRequestMaybe auth $ repositoryR user repo
Expand Down

0 comments on commit e4bab2e

Please sign in to comment.