haskell-github/github
Fork: 192 Star: 411 (更新于 2024-11-17 00:11:59)
license: BSD-3-Clause
Language: Haskell .
The github API for Haskell
GitHub
The GitHub API v3 for Haskell.
Some functions are missing; these are functions where the GitHub API did not work as expected. The full GitHub API is in beta and constantly improving.
Installation
In your project's cabal file:
Build-depends: github
Or from the command line:
cabal v1-install github
Example Usage
See the samples in the samples/ directory.
Note: some samples might be outdated.
Documentation
For details see the reference documentation on Hackage.
Each module lines up with the hierarchy of documentation from the GitHub API.
Request functions (ending with R
) construct a data type which can be executed
in IO
by executeRequest
functions. They are all listed in the root GitHub
module.
IO functions produce an IO (Either Error a)
, where a
is the actual thing
you want. You must call the function using IO goodness, then dispatch on the
possible error message. Here's an example from the samples:
Many function have samples under
samples/
directory.
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
import Prelude.Compat
import Data.Text (Text, pack)
import Data.Text.IO as T (putStrLn)
import Data.Monoid ((<>))
import GitHub (github')
import qualified GitHub
main :: IO ()
main = do
possibleUsers <- github' GitHub.usersFollowingR "phadej"
T.putStrLn $ either (("Error: " <>) . pack . show)
(foldMap ((<> "\n") . formatUser))
possibleUsers
formatUser :: GitHub.SimpleUser -> Text
formatUser = GitHub.untagName . GitHub.simpleUserLogin
Contributions
Please see CONTRIBUTING.md for details on how you can help.
Copyright
Copyright 2011-2012 Mike Burns. Copyright 2013-2015 John Wiegley. Copyright 2016-2019 Oleg Grenrus.
Available under the BSD 3-clause license.
Alternative
Library github-rest
also provides an interface to the GitHub API.
It compares itself to github
here:
https://github.com/LeapYear/github-rest#comparison-to-other-libraries
最近版本更新:(数据更新于 1970-01-01 00:00:00)
主题(topics):
github-api, haskell, rest-api
haskell-github/github同语言 Haskell最近更新仓库
2024-08-22 12:09:58 ivanperez-keera/dunai
2024-05-25 09:59:31 reflex-frp/reflex-vty
2023-11-11 06:13:10 clash-lang/clash-compiler
2022-08-13 21:55:30 HeinrichApfelmus/reactive-banana
2016-10-03 14:00:16 z0w0/helm
1970-01-01 00:00:00 gelisam/frp-zoo