lts-10.0 |
|
---|---|
Linux & OSX | |
Windows |
Complete Haskell types and instances for decoding GitHub API Webhook payloads.
- Best-in-class JSON decoding via aeson.
- Unicode string support via text.
- Suitable for large data payloads using vector.
- Type-safe encoding of optional data.
- Type-safe event action encodings with support for future API changes.
- Instances for Typeable, Data, Generic and NFData.
- Strongly typed utility classes EventHasSender, EventHasRepo et al.
- Strict data types suitable for high performance streaming operations.
- Full support for these event types.
github-webhooks
is available via installation on Hackage and Stackage.
Minimal working example:
$ stack ghci bytestring aeson github-webhooks
import qualified Data.ByteString.Lazy as BSL
import Data.Aeson ( eitherDecode' )
json <- BSL.readFile "fixtures/watch-event.json"
eitherDecode' json :: Either String WatchEvent
Some practical integration examples are also provided:
- Servant Integration (Simple)
Minimal working example of integrating this package with servant and servant-github-webhook. - Servant Integration (Typical)
This example demonstrates more advanced use-cases with servant by decoding multiple different types of payloads on the same endpoint. - Scotty Integration
Minimal working example of integrating this package with scotty.
See CHANGELOG.md for a summary of changes in each release.
See ROADMAP.md for the project timeline and feature estimation of future releases.
See AUTHORS for a list of significant authors.
See LICENSE for a bundled copy of the MIT license.