package github

  1. Overview
  2. Docs

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.

module 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.

module 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.

module Endpoint : sig ... end

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

module 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.

type 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.

type '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.

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

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

type 'a handler = ((Cohttp.Response.t * Cohttp_lwt.Body.t) -> bool) * 'a

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

val log_active : bool ref

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

module Scope : sig ... end

The Scope module abstracts GitHub's authorization scopes.

module Token : sig ... end

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

module 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:

module 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.

module 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
module 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.

module User : sig ... end

The User module provides basic user information query functions.

module Organization : sig ... end

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

module Team : sig ... end

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

module Event : sig ... end

The Event module exposes GitHub's event API functionality.

module Repo : sig ... end

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

module 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.

module Status : sig ... end

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

module Pull : sig ... end

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

module Issue : sig ... end

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

module Label : sig ... end

The Label module exposes Github's labels API.

module Collaborator : sig ... end

The Collaborator module exposes Github's collaborators API.

module Milestone : sig ... end

The Milestone module exposes GitHub's milestone API.

module Release : sig ... end

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

module Deploy_key : sig ... end

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

module Gist : sig ... end

The Gist module provides access to the GitHub gist API.

module Emoji : sig ... end

The Emoji module exposes GitHub's emoji API.

The Search module exposes GitHub's search interfaces.

Utility Modules
module Git_obj : sig ... end

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

OCaml

Innovation. Community. Security.