package github

  1. Overview
  2. Docs
GitHub APIv3 OCaml library

Install

Dune Dependency

Authors

Maintainers

Sources

github-unix-4.3.2.tbz
sha256=b6304dce6ec33503e225ade600af194e1fc3976624ea83f546c7ab27ec8cfeb7
sha512=754f0a2bce5a2cb3b2355530708e3dab1d8a32401fa2a300b5eba37bf37e63d75d21d42595e7cd60b9a20beba054dd3b45675d51201a4aa8812ce5db400ab758

doc/github/Github_core/Make/index.html

Module Github_core.MakeSource

Parameters

module Env : Github_s.Env

Signature

API Concepts

Message may be raised by any API call when the GitHub service returns an unexpected response code. Typical reasons for this exception are insufficient permissions or missing resources.

Sourcemodule Response : sig ... end

Functions corresponding to direct API requests return Response.t values inside of Monad.t values so that more information about the request can be made available. Monad.(>>~) is a convenience operator that lets you bind directly to the carried value.

Sourcemodule Monad : sig ... end

All API requests are bound through this monad which encapsulates an Lwt cooperative thread and includes some state which may be set via API functions.

Sourcemodule Endpoint : sig ... end

Each request to GitHub is made to a specific Endpoint in GitHub's REST-like API.

Sourcemodule Stream : sig ... end

The Stream module provides an abstraction to GitHub's paginated endpoints. Stream creation does not initiate any network activity. When requests are made, results are buffered internally. Streams are not mutable.

Sourcetype rate =
  1. | Core
  2. | Search

rate is a type used to indicate which rate-limiting regime is to be used for query quota accounting. rate is used by the function in API.

Sourcetype 'a authorization =
  1. | Result of 'a
  2. | Two_factor of string

Some results may require 2-factor authentication. Result values do not. Two_factor values contain the mode by which a 2FA code will be delivered. This code is required as ?otp to a subsequent invocation of the function which returns this type.

Sourcetype +'a parse = string -> 'a Lwt.t

'a parse is the type of functions which extract meaningful values from GitHub responses.

Sourcetype 'a handler = ((Cohttp.Response.t * string) -> bool) * 'a

'a handler is the type of response handlers which consist of an activation predicate (fst) and a parse function (snd).

Sourceval log_active : bool ref

log_active regulates debug messages. It is true by default when the environment variable GITHUB_DEBUG is set to 1.

Sourcemodule Scope : sig ... end

The Scope module abstracts GitHub's authorization scopes.

Sourcemodule Token : sig ... end

The Token module manipulates authorization tokens. GitHub has two types of tokens: OAuth application tokens and "personal tokens".

Sourcemodule API : sig ... end

The API module contains functionality that relates to the entirety of the GitHub API and these bindings. In particular, this module contains:

Sourcemodule URI : sig ... end

The URI module contains URI generation functions which may be useful for linking on the Web or passing to other GitHub API clients.

Sourcemodule Filter : sig ... end

The Filter module contains types used by search and enumeration interfaces which describe ways to perform result filtering directly in the GitHub API.

API Modules
Sourcemodule Rate_limit : sig ... end

The Rate_limit module contains explicit rate limit API request functions which do not read the rate limit cache but do write to it.

Sourcemodule User : sig ... end

The User module provides basic user information query functions.

Sourcemodule Organization : sig ... end

The Organization module exposes the functionality of the GitHub organization API.

Sourcemodule Team : sig ... end

The Team module contains functionality relating to GitHub's team API.

Sourcemodule Event : sig ... end

The Event module exposes GitHub's event API functionality.

Sourcemodule Repo : sig ... end

The Repo module offers the functionality of GitHub's repository API.

Sourcemodule Stats : sig ... end

The Stats module exposes the functionality of GitHub's repository statistics API which provides historical data regarding the aggregate behavior of a repository.

Sourcemodule Status : sig ... end

The Status module provides the functionality of GitHub's status API.

Sourcemodule Pull : sig ... end

The Pull module contains functionality relating to GitHub's pull request API.

Sourcemodule Issue : sig ... end

The Issue module gives users access to GitHub's issue API.

Sourcemodule Label : sig ... end

The Label module exposes Github's labels API.

Sourcemodule Collaborator : sig ... end

The Collaborator module exposes Github's collaborators API.

Sourcemodule Milestone : sig ... end

The Milestone module exposes GitHub's milestone API.

Sourcemodule Release : sig ... end

The Release module provides access to GitHub's release API features.

Sourcemodule Deploy_key : sig ... end

The Deploy_key module provides the means to manage per-repository deploy keys.

Sourcemodule Gist : sig ... end

The Gist module provides access to the GitHub gist API.

Sourcemodule Emoji : sig ... end

The Emoji module exposes GitHub's emoji API.

The Search module exposes GitHub's search interfaces.

Utility Modules
Sourcemodule Git_obj : sig ... end

The Git_obj module contains utility functions for working with git concepts.

OCaml

Innovation. Community. Security.