forked from haskell-github/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request haskell-github#415 from phadej/github-convinience-…
…function Add github and github' convinience functions
- Loading branch information
Showing
62 changed files
with
287 additions
and
2,051 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ import qualified Github.RateLimit as Github | |
main = do | ||
x <- Github.rateLimit | ||
print x | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
module Main (main) where | ||
|
||
import qualified GitHub.Data.DeployKeys as DK | ||
import qualified GitHub.Endpoints.Repos.DeployKeys as DK | ||
import qualified GitHub.Auth as Auth | ||
import qualified GitHub as GH | ||
import Data.Text (Text) | ||
|
||
main :: IO () | ||
main = do | ||
let auth = Auth.OAuth "auth_token" | ||
eDeployKey <- DK.createRepoDeployKey' auth "your_owner" "your_repo" newDeployKey | ||
let auth = GH.OAuth "auth_token" | ||
eDeployKey <- GH.github auth GH.createRepoDeployKeyR "your_owner" "your_repo" newDeployKey | ||
case eDeployKey of | ||
(Left err) -> putStrLn $ "Error: " ++ (show err) | ||
(Right deployKey) -> putStrLn $ show deployKey | ||
Left err -> putStrLn $ "Error: " ++ show err | ||
Right deployKey -> print deployKey | ||
|
||
newDeployKey :: DK.NewRepoDeployKey | ||
newDeployKey = DK.NewRepoDeployKey publicKey "test-key" True | ||
newDeployKey :: GH.NewRepoDeployKey | ||
newDeployKey = GH.NewRepoDeployKey publicKey "test-key" True | ||
where | ||
publicKey :: Text | ||
publicKey = "your_public_key" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.