github-0.14.0: Access to the Github API, v3.

Safe HaskellNone





data GithubRequest k a where Source

Github request data type.

  • k describes whether authentication is required. It's required for non-GET requests.
  • a is the result type

Note: GithubRequest is not Functor on purpose.

TODO: Add constructor for collection fetches.

Request execution in IO

executeRequest' :: Show a => GithubRequest False a -> IO (Either Error a) Source

Like executeRequest but without authentication.

executeRequestWithMgr' :: Show a => Manager -> GithubRequest False a -> IO (Either Error a) Source

Like executeRequestWithMgr but without authentication.

executeRequestMaybe :: Show a => Maybe GithubAuth -> GithubRequest False a -> IO (Either Error a) Source

Helper for picking between executeRequest and executeRequest'.

The use is discouraged.

unsafeDropAuthRequirements :: GithubRequest True a -> GithubRequest k a Source

Partial function to drop authentication need.


getNextUrl :: Response a -> Maybe URI Source

Get Link rel=next from request headers.